Links
💚

Setup WhatsApp Automation for Shopify

We will be using Marketing Automation in Shopify and Connect that with our WhatsApp API.
We will go through multiple use cases and explore Automations.

Using Shopify Marketing Automation

Shopify provide marketing automation tool for free that you can use to configure granular level of automation for your Shopify Store. With Shopify Marketing Automation, you can build custom automations with a simple trigger-condition-action interface to match the exact needs of your business. From welcome and win back automations to the first-purchase upsell, get ready-to-use templates built for commerce.

Access Shopify Marketing Automation

Step 1: Go to your Shopify Admin panel. From left sidebar, click on Marketing -> Automations. And then "Create automation" Button from the top left.
Access Shopify Marketing Automation
Step 2: Create a Custom Marketing Automation (or you can edit any available template like Abandoned Checkout, Abandoned Cart etc.)
Step 3: Design the trigger
Design the trigger you need for your business. Common use cases are:
  • Notify to recover abandoned product browse
  • Notify to recover abandoned cart
  • Notify to recover abandoned checkout
  • Order Confirmation Message
  • Shipping Notification
  • Upsell
  • Cross-sell
  • Collect product feedback
  • Product restock notification
Sample flow to recover abandoned checkout

Create WhatsApp Message Template to send

When the Automation Flow is triggered, relevant WhatsApp Message will be sent to the customer's phone number. To send the message we will need to create the Template in MyAlice.

Connect Shopify Automation with MyAlice WhatsApp Template Message

Step 1: Get the template message ID
From MyAlice WhatsApp Template manager, click on the view details option of the desired template to get the Template ID.
Get the Template ID
Step 2: Create a HTTP Request as an action in the Shopify Automation
At the end of the Shopify Trigger, use HTTP request as action. You will need the Template Id, Your API key and Channel Phone number.
API Key in Settings -> Team information
Channel Phone in Integration
Here is a sample HTTP request:
Method: POST
URL: https://api.myalice.ai/stable/open/whatsapp/send-template-message
Headers:
X-Myalice-Api-Key: <YOUR API KEY>
Content-Type: application/json
Body:
{
"template_id": "<YOUR TEMPLATE ID>",
"channel_phone": "<YOUR WHATSAPP NUMBER>",
"customer_phone": "{{customer.phone}}",
"attributes": {
"first_name": "{{customer.firstName}}",
"last_name": "{{customer.lastName}}",
"full_name": "{{customer.firstName}} {{customer.lastName}}",
"product": "{% for productsAddedToCart_item in abandonment.productsAddedToCart %}{% for collections_item in productsAddedToCart_item.product.collections %}{{collections_item.title}}{% endfor %}{% endfor %}",
"discount": "25%",
"code": "HELLO",
}
}
You can get your MyAlice API key from Settings -> Team Information.