Integrate Waveapps with Magento 2

Waveapps is effective free management software which allows businesses, especially small businesses to manage their invoices, billing, receipts and keep track of their businesses health. To enhance the store management system on Magento 2 platform, Mageplaza develops Webhook extension to integrate Waveapps with Magento 2. As a result, you can manage customers, invoices, etc of your store more easily and conveniently.

What Is Webhook?

Webhook is a helpful tool which allows online stores to configure to send an API request to a configurable destination (URL) such as other servers or applications in cases trigger events including new order, customer login, abandoned carts, etc occur. As a result, store owners can instantly update important notifications and have suitable activities shortly.


Webhook

Webhook Extension for Magento 2

Unlock the power of Magento 2 Webhook today and enhance the flexibility and interactivity of your website!

Check it out!


These entities of Magento which Webhook supports:

  • Customer
  • Order
  • Invoice
  • Shipment
  • Credit Memo
  • Product
  • Category
  • Abandoned Cart

These entities which Waveapps supports:

  • Account
  • Application
  • Business
  • Currency
  • Customer
  • Email Preference
  • Geography
  • Invoice
  • Product
  • Receipts
  • Reminders
  • Sales Tax
  • User

How To Integrate Waveapps With Magento 2 With Webhook

Instructions For Registering And Using Waveapps

Access to here, enter your email and password > Click the Create your free account button to register a new account or Sign up with Google

Instructions For Registering And Using Waveapps1

Next, you need to verify you are a real person by clicking on the I’m not a robot checkbox.

Instructions For Registering And Using Waveapps2

Then you need to fill your business information in the below form > click the Let’s go button

Instructions For Registering And Using Waveapps3

You can choose the field where you want to start with Waveapps

Instructions For Registering And Using Waveapps4

After registering successfully, you can see the working interface of Waveapps with Business which you choose in the above step.

Instructions For Registering And Using Waveapps5

You can see your Business_id by clicking Settings > User management, as below image:

Instructions For Registering And Using Waveapps6

To create an app, you need to access here, then click Manage Applications

Instructions For Registering And Using Waveapps7

Click the Create an App button, enter information about your app, and tick the Yes, I agree checkbox after reading Terms of Use

Instructions For Registering And Using Waveapps8

Click the Create your application button to create your app successfully. Then click to this app > Click to the Create token button to create the token.

Instructions For Registering And Using Waveapps9

These Fields Of Waveapps:

To view the latest fields of Waveapps, you can click here

Instructions For Creating Hook

How to create a new customer in Waveapps via Magento 2

  • Required fields:
    • name
  • Optional fields:
    • account_number
    • first_name
    • last_name
    • email
    • fax_number
    • mobile_number
    • phone_number
    • toll_free_number
    • website
    • currency
    • address1
    • address2
    • city
    • province
    • country
    • postal_code

In this part, I will give detail instructions on how to configure Webhook which helps Magento 2 integrate with Waveapps.

From the Admin Panel, go to System > Webhook > Manage Hooks, select Add New on the right corner, then you will see many options including New Order, New Customer, Update Customer, Delete Customer, etc.

Step 1: Fill all information in the General Information tab

Instructions For Creating Hook1

Step 2: Enter the data on the Action tab

Instructions For Creating Hook2 Instructions For Creating Hook2

Note:

  • Payload URL: https://api.waveapps.com/endpoint, with endpoint you can view here
    • For example: With the GET and POST method and Customer Endpoints:
      • GET /businesses/{business_id}/customers/ : list all the customers of business
      • POST /businesses/{business_id}/customers/ : create customers for business
  • Header:
    • Name: Authorization
    • Value: Bearer ACCESS_TOKEN, with ACCESS_TOKEN is the token of the app which you created above.
  • Body: With POST or PUT method, you need to add content on the Content section to send the request. Click Insert Variable to choose variable.
    • For example, if you want a new customer will be added compatibly in Waveapps when you have a new_customer hook in Magento 2, you need to insert the following content into the body section:
{
   "name": "Layla Harris",
   "email": "[email protected]",
     }

Note: If you want to get any data field, you need to change the value of this data field with variable coming from Insert Variable.

The results of creating a hook:

The results of creating a hook1

Once some events of Store such as add new customer, new order, etc occurs, the data will be saved on Hook Logs:

The results of creating a hook2

Click Select > View to redirect to View log page where you can view the data information.

The results of creating a hook3

The Result Shown In Waveapps

The Result Shown In Waveapps

These Available Body Templates:

New Invoices

Endpoint: POST /businesses/{business_id}/invoices/

  • Required fields:
    • customer
  • Optional fields:
    • due_date
    • disable_credit_card_payments
    • disable_bank_payments
    • exchange_rate
    • footer
    • invoice_date
    • invoice_number
    • invoice_number_label
    • memo
    • po_so_number
    • status
    • subhead
    • invoice_currency
    • items
    • item_title
    • item_title
    • quantity_title
    • price_title
    • amount_title
    • hide_item
    • hide_description
    • hide_quantity
    • hide_price
    • hide_amount

Body Template:

{
         "customer": {
             "id": 33
         }
  }

New Products

Endpoint: POST /businesses/{business_id}/products/

  • Required fields:
    • name
  • Optional fields:
    • price
    • description
    • is_sold
    • is_bought
    • income_account
    • expense_account
    • default_sales_taxes

Body Template:

{
    "name": "Volumetric pipet",
    "description": "Used for exact volume measurements of liquids.",
    "price": 12.00,
    "is_bought": true,
    "expense_account": {
        "id": 27
    },
    "default_sales_taxes": [
        { "id": 32 },
    ]
  }

Note: If you want to get any data field, you need to change the null value with variable coming from Insert Variable.

Conclusion

In this tutorial, we introduce how to register Waveapps, create Hook with Mageplaza Webhook Extension to integrate Waveapps with Magento 2 via Webhooks. In addition, you can refer to other useful extensions for your store here.






Back Ask Mageplaza

magento-2-tutorial
webhook