Synchronize your Connectif account with the Spoki tool to create personalized direct messaging campaigns with WhatsApp for each contact.
In this article, you'll learn how to integrate your Connectif account with Spoki and automate the sending of messages when the contact leaves the cart.
Before you start: prerequisites
In order to integrate your Connectif account with Spoki and automate WhatsApp campaigns, you will need:
- A Spoki account.
- The template created for your campaign in Spoki.
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: those 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. Creating your automation in Spoki
1. Log in to your Spoki account.
2. Go to the Automations section.
3. Click New.
4. Give your automation a name.
5. Click Add Boot Step.
6. In the pop-up window, select Integration and search for Connectif.
7. Save the URL that will be displayed, which will be the URL of the WebHook that you will later use in Connectif.
STEP 2. Selecting the message template in Spoki
8. Click Your Automatic Action.
9. In Action Type filter by Template.
10. In When, select the wait period for the action to be triggered after activating the trigger (which in this case will be set by Connectif).
11. In the search engine, filter and select the template you want to send.
12. Click Add.
13. Save your changes.
STEP 3. Creating the integration in Connectif
14. Go to Store Backoffice in the left side menu.
15. In the tab selector, go to "Integrations > Custom integrations (webhooks)" and click Create new integration.
16. Set the "Integration name" field to identify the integration.
17. (Optional) Customize the color, add a description, or categorize the integration.
18. Click Update.
STEP 4. Creating the Send Event
(This section shows how to configure the fields that will be shared with the external platform).
18. On the Send data tab, click Create new shipping event.
19. Within that screen, give the event a name.
20. Add the URL of the endpoint that you previously found in Spoki (step 1) in the “Webhook URL for sending the message” section.
4.1. Creating the message structure in Connectif
(In this section you’ll configure the properties of the message to be sent, based on the Spoki template. The example documents the creation of a real, practical structure of a message.
21. In order to send the information to Spoki, we need to replicate the JSON structure of the template. Following the example of the "Contact Data" template, the JSON file to replicate is:
{
"phone": "+393931256677", //required
"first_name": "Maria",
"email": "maria.ross@example.com",
}
22. Click Add new field.
23. Select the type of field (text, email, etc.).
24. Add a Name and ID.
25. Check the box Enable JSON options in the fields where necessary.
17. Copy the route and paste it into Connectif.
18. Edit the route, replacing the (x.) at the beginning and the (.) with backslashes.
19. Assign a name and ID to the field.
20. Repeat this step for all properties to be passed until you have replicated the template.
21. Click Save to record all fields.
STEP 5. Creating the workflow to automate the sending of WhatsApp messages
(This section explains how to send data from Connectif through a workflow).
33. Go to Workflows and click Create new workflow.
34. Select a new blankworkflow.
35. In the "Home node”, select All contacts from my list.
36. Add the “On cart abandonment” 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.
37. Edit the node to remove the limitations and click Update.
38. Look for the action-type node that you created when you created the Spoki integration (step 4) and add it to your workflow.
39. 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 On cart abandonment node.
- The checkout URL is set manually using a Literal value:
40. Click Update to save the node configuration and your workflow.
41. In the workflow, click Save to save your changes and Start to activate it.
Keep learning!
To make the most of your Connectif account, we recommend reading these articles next:
- 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 in your website.
-
Integrations via API, to manage events such as purchase registrations or contact registrations.
- Batch email campaigns, to design a phased campaign that avoids overloading servers as web visits increase.