WhatsApp is one of the most powerful direct messaging tools and a key ally for your ecommerce business. Here’s a step-by-step guide to creating abandoned cart recovery campaigns with WhatsApp, by integrating your Connectif account with the Spoki tool.
Before you start: prerequisites
Before building your automated WhatsApp campaign, you’ll need to create your Spoki account and the template for your campaign.
You can find more information on how to create your templates in the Spoki “Templates” area, by clicking the (information) button.
There are two types of fields in the templates:
- Registry fields: provided by Spoki.
- Dynamic fields: custom fields. These should always be in capital letters. The sample template contains two dynamic fields:
- CHECKOUT URL.
- TOTAL AMOUNT (total sum of items).
Step 1. Create the automation in Spoki
Once your campaign template is ready, you need to create the automation in Spoki and associate it with Connectif to obtain the WebHook where the information will be sent from Connectif.
- Log in to your Spoki account.
- Go to the Automations section.
- Click New.
- Give your automation a name.
- Click Add Boot Step.
- In the pop-up window, select Integration and search for Connectif.
- A URL will appear, which will be the URL of the WebHook that you will later use in Connectif.
Once you've done this, you'll need to select the template for the message you want to be displayed in your campaign.
- Click Your Automatic Action.
- In Action Type filter by Template.
- In When, select the waiting period for the action to be triggered after activating the trigger (which in this case will be set by Connectif).
- In the search engine, filter and select the template you want to send.
- Click Add.
Ready! You have already completed the first step. Save the changes so you don't lose your campaign.
Step 2. Create the custom event in Connectif
Once the automation has been created in Spoki and the template assigned, the next step is to prepare the integration with Spoki and the custom event within Connectif, which will send the information in the fields to Spoki:
- Access your Connectif account.
- Go to “Integrations > Custom” and click Create new integration.
- From the Settings tab, give the integration a name and save it.
Once the integration is established, the next step is to create the sending event or webhook.
- As this is a sending webhook, within the same event settings, go to the Send Data tab and click Create a new sending event
- Within that screen, give the event a name.
- Add the URL of the endpoint that you previously found in Spoki (step 1.7.) in the “Webhook URL for sending the message” section.
- In order to send the information to Spoki, we need to replicate the JSON structure of the template. Following the example of the “Abandoned Cart” template, the JSON file to replicate is:
{
"phone": "+393931256677", //required
"first_name": "Maria",
"email": "maria.ross@example.com",
"custom_fields": {
"TOTAL_AMOUNT": "Total amount",
"CHECKOUT_URL": "https://www.domain.com/cart-url“
}
}
How to create fields in Connectif for transferring information to Spoki
- Click Add new field.
- Select the type of field (text, email, etc.).
- Add a Name and an ID.
- Click Accept.
To create fields with several properties (custom fields) you’ll need to activate JSON options. The process is similar to the one above:
- Click Add new field.
- Select the Field Type (text, email, etc.).
- Check the Enable JSON options box.
- Use a tool such as JSON Path Finder, which will allow you to extract the path of the properties you need to create.
- Copy the route and paste it into Connectif.
- Edit the route, replacing the (x. ) at the beginning and the (. ) with backslashes.
- Assign a name and ID to the field.
- Once you have created all the properties to be transmitted, you have completed the Connectif integration with Spoki. Click Save to ensure that all fields are recorded.
Step 3. Create the workflow to activate your campaign in Spoki
Now is the time to create the workflow in Connectif that activates your campaign when the user abandons their cart and sends the information to Spoki. To do this:
- Go to Workflows and click Create new workflow.
- Select a new blank workflow.
- In the "Home node”, select All contacts from my list.
- Add the “When cart abandoned” trigger node so that the workflow is activated when a visitor to your website adds products to their cart and doesn't complete the purchase.
- Edit the node to remove the limitations and click Update.
When the contact leaves the cart, we want to report the event to Spoki. To do this:
- Look for the action-type node that you created when you created the Spoki integration (step 2) and add it to your workflow.
- Configure the node by assigning the variables to their respective values.
-
- The contact variables (first name, last name, telephone number and email) come from the Contact information.
-
-
- The information about the cart properties (TOTAL AMOUNT) is given by the When cart abandoned node.
-
-
-
- The checkout URL is set manually using a Literal value:
-
- Click Update to save the node configuration and your workflow.
The workflow is now ready! You can now activate it to start sending WhatsApp messages to recover your abandoned carts with Spoki and Connectif.
Keep learning!
To make the most of your Connectif account, we recommend reading these articles next:
- What are variables and how to use them, to create personalized content and experiences that are tailored to the user and their behavior.
- Custom integration for receiving data, to learn how to use information that is not registered by default on the platform.
- Integrations with external systems, to integrate your Connectif account with Facebook, forms and other webhooks on your website.
-
Checking the integration with your ecommerce, to confirm that all activity is being gathered in the corresponding profile.