How to perform a WhatsApp broadcast using Tiledesk and Customer.io
If you are a Customer.io user you may have noticed that it isn't possible to perform a native broadcast on the WhatsApp Channel. However, it is possible to use the Webhook option to “move” the broadcast towards Tiledesk and to use our new WhatsApp dedicated actions. How is it possible? Easy, Chatbot's actions can now be performed through API!
Let's see how to do that!
Create and configure a Chatbot on Tiledesk
If you haven't created a Chatbot yet, sign in on the Tiledesk Dashboard, create or select a project and click on Bot on the left sidebar. Click on Add from scratch button and create a new Chatbot.
You are now in the new Chatbot Design Studio. Create a new block clicking on +add button and choose a name for this block. Before continuing, please delete the default Reply action as it isn't necessary to reach our goal.
Now click on Add action and select the WhatsApp by Attribute action. Configure this action is very easy. Simply create a custom attribute by giving it a name that you will use later and choose it in the select "Assign to"
Done! Your action is ready to be used.
Use the action in Customer.io
Sign in on customer.io, create a new Broadcast, and configure it to your preferences choosing segments, conditions, goals, etc.
On the Step 3 (Content), choose the Webhook option and access the advanced settings click on Content box.
At this point, an HTTP request must be written correctly and to do so, it is necessary to know the language and the structure of the WhatsApp template to be sent in broadcast. But, don't worry, we have a trick for you!
Remember that you can send messages to your customers on WhatsApp only using an approved template. For any doubt about the process of templates creation and WhatsApp configuration please refers to our guides on WhatsApp Business Integration.
Use the Fast Prototyping trick to generate the request payload
Come back on Chatbot Design Studio. Add a new block for the Chatbot previously created, than click on Add action and select the WhatsApp Static action.
Note that this block will never be executed directly, but can be used as an important fast prototyping tool.
At this point, get your Phone Number Id from the Meta for Developers platform and paste it on the Phone Number Id input field, then choose the template that you want to use in the broadcast.
It's very probable that the selected template contains parameters, so let's fill in the corresponding fields with some example information, including the recipient's phone number.
if you want, you can see the preview of your WhatsApp message as the recipient will see it.
A little further down you will be able to see the auto-generated payload that we can use to compile the HTTP request on customer.io.
Warning! In the specific case of customer.io it is necessary and sufficient to enter only one recipient.
Copy the auto-generated payload and move again on customer.io. Paste the static payload on the editor e make it dynamic.
Place the variables provided by customer.io to fill parameters like recipient phone_number, name, etc. Then, pay attention to the following changes:
- payload.text must be the name of the WhatsApp by Attribute action
- payload.token must be the chatbot token provided by Tiledesk
Get chatbot token
You can get the token associated with your chatbot from the Chatbot Design Studio itself, clicking on General on the left side menu, and under the Developer tab you can generate a new token simply clicking on Get Token button.
Let's complete the HTTP request on customer.io specifying:
- Method: POST
- Url: https://api.tiledesk.com/v3/modules/tilebot/BOT_ID_CHANGE
- Header: Content-Type: application/json
That's all! You will now be able to make your first WhatsApp broadcast with Tiledesk.
You can perform a test by clicking the Send test button on customer.io to be sure that all works correctly, then you can save changes, review your entire broadcast and choose whether to send it immediately or schedule it.
If you have any questions, feel free to contact us live on chat or at email@example.com 📧
For more info on who we are, what we do, or what is our shtick, visit the Tiledesk Website 👩🚀