Connectif has a direct synchronization with your Meta account, allowing you to create customized WhatsApp messaging campaigns in line with your objectives.
In this article, you’ll learn how to integrate your Connectif account with Meta and automate the sending of a purchase confirmation message.
Before you start: prerequisites
In order to create WhatsApp campaigns and integrate your Connectif account with this channel, you will need:
- A Meta Developer account (find out how to create it in their official documentation).
- A WhatsApp application, created (find how to create it in the official documentation) and configured.
- A telephone number authorized by Meta.
- Templates created and approved by Meta (find out how to create them in their official documentation or use their sample templates).
STEP 1: Creating the customized integration in Connectif
1. Go to Store Backoffice in the left side menu.
2. In the tab selector, go to "Integrations > Custom integrations (webhooks)" and click Create new integration.
3. Set the "Integration name" field to identify the integration.
4. (Optional) Customize the color, add a description, or categorize the integration.
5. Click Update.
STEP 2: Creating the Outbound Event
(This section shows you how to configure the fields that will be shared with the external platform).
6. On the Send data tab, click Create new Outbound event.
2.1. Authorizing the Outbound Event
(In this section we will configure the headers that will allow WhatsApp messages to be sent from Connectif. To do this, some data from Meta must be copied into Connectif, so it is advisable to have both tabs open).
7. In the Meta WhatsApp application, go to API Settings and copy, from Step 2, the URL of the endpoint to which the request to send the messages is launched, as shown in the image:
8. Again in Connectif, paste this URL into the field Webhook URL to send the message to.
9. Click on Add a new header and name it "Authorization".
10. Copy the value associated with the Header that you will find in the Meta WhatsApp application, in Step 2 as shown in the image:
11. Paste it in the Value field of the header and click OK.
12. Repeat steps 9-11 with the rest of the HTML values in the header:
- Create a header with the Name "Content-Type" and the Value "application/json".
- Create a header with the Name "Accept-Encoding"and the Value "gzip, deflate, br".
2.2. Creating the message structure in Connectif
(In this section you will configure the properties of the WhatsApp message to be sent. The example documents the creation of a real, practical structure of a message.
13. Use a tool such as JSON Path Finder, which will allow you to extract the path of the properties you need to create.
14. In our example, the structure of the template to be replicated is:
15. Click on Create new Field.
16. 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 3: Creating the workflow to send WhatsApps from Connectif
(This section explains how to send data from Connectif via a workflow).
22. Access from the left side menu to the Workflows.
23. Click Create new workflow and select Create blank workflow.
24. Create the structure of your workflow with a trigger node, in the example "On purchase", and the action node "Send WhatsApp".
25. Configure the node by assigning the values (left column) to their respective fields (right column).
- The contact information (name and phone number) comes from the Contact information.
- All other fields must be set to a Literal value and populated with the template information, which can be extracted from the JSON.
26. Click Update to save the node configuration and your workflow.
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.