Shopify Native Triggers
Shopify Triggers
UChat now supports native webhook integration with Shopify. There is now no need to use inbound webhooks anymore as not only this native integration has any webhook limitations but also avoids other problems such a removal of webhooks from shopify store, unresponsive and empty payloads etc.
- 1 Shopify Triggers
- 1.1 Re-Establishing Connection with Shopify
- 1.2 Finding & Selecting the Shopify Triggers
- 1.3 Native Webhook Actions
- 1.4 How To Use The Triggers
- 1.5 Triggers & Response Payloads
- 1.5.1 Cart Abandoned
- 1.5.2 Order Creation (Cash On Delivery & Credit Card)
- 1.5.3 Order Cancelled
- 1.5.4 Order Paid
- 1.5.5 Order Fulfilled
- 1.5.6 Draft Order Creation
- 1.6 User Creation With Triggers
Re-Establishing Connection with Shopify
Re-establishing connection with shopify in an important step for this update to start working. Follow the steps below to establish the connection:
On Workspace dashboard, click on Integrations and then click on shopify. Afterwards click on Save button and your connection will be re-established.
Finding & Selecting the Shopify Triggers
Once inside your bot, follow the below steps to find and use the triggers.
Click on Automation from the left side of the scroll bar and then select Triggers from the top.
Click on “New Trigger” and scroll down till you see Shopify Webhook, select it.
Native Webhook Actions
UChat supports the following native actions as of now.
How To Use The Triggers
Follow the below visual guide for using the triggers
After adding the details and mapping the variable, attach the trigger to a subflow as:
We are now ready to use the triggers.
Triggers & Response Payloads
Cart Abandoned
Cart Abandoned is triggered from shopify whenever any customer enter their billing details but does not continue to payment page or does not complete the payment.
The response payload returns information regarding cart items, amount , checkout page url etc.
The response payload return the following JSON.
{ |
Note : The minimum time limit before the cart abandoned webhook triggered is 30 minutes by default
Order Creation (Cash On Delivery & Credit Card)
This webhook is triggered whenever someone completes the checkout process and places an order. The only difference between the two triggers is that when using Cash on Delivery, the order is by default marked unpaid and when using credit card, the order is by default marked as paid.
The response payload returns the following JSON
{ |
Order Cancelled
This webhook is triggered whenever the order is cancelled from the shopify admin console.
The response payload returns the following JSON.
{ |
Order Paid
This webhook is triggered whenever the order is marked from the shopify admin console.
The response payload returns the following JSON.
{ |
Order Fulfilled
This webhook is triggered whenever the order is fulfilled from the shopify admin console. It return information such as order details and shipping tracking from merchants etc.
The response payload returns the following JSON.
{ |
Draft Order Creation
The webhook is triggered whenever a draft order is created either via an API call through the bot or from Shopify admin console directly.
An important note here is that the trigger uses the personal information provided by Shopify upon creation of draft order to match the bot user inside UChat. If the provided with the payload is incorrect or doesnt exist the payload is simply wasted without the trigger being fired.
Following response payload is received whenever the trigger is successfully fired.
{ |
User Creation With Triggers
The webhook identifies the users using phone number and email address and then matching it from the existing bot users already present. If the bot users are not found then phone number is used to create the user. If phone number is returned null, then email is used to create the user. When users are created using phone numbers, they are created under whatsapp channel by default, and when users are created using email, they are created under web channel.