How do I configure WhatsApp call deflection?
Below you can find a guide on how to forward a Native Voice conversation to Whatsapp using the Voice Flowbuilder.
Open Voice Flowbuilder:
Go to the Voice Flowbuilder app in your Apps via the nine-tile menu.
Select the IVR Menu Object:
In the left pane, find the ‘IVR menu’ object under ‘Conditional routing’ objects. This allows you to continue a conversation via WhatsApp.
Add an HTTP Request Action:
To connect to WhatsApp, add an ‘HTTP request’ action from the left pane, found under ‘Outbound actions’. Refer to the example flow below.
Fill in the HTTP Request Options:
Choose a description for your HTTP request, such as ‘whatsapp’.
Set the Request Method:
Set the request method to ‘POST’.
Set the Request URL:
Set the request URL to ‘https://gw.messaging.cm.com/v1.0/message’ if your WhatsApp number is provided via CM.com.
Set the Request Body
Set the request body to:
Below, it is explained where to find the values in the red xxx.
{ "messages":{ "authentication":{ "producttoken":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }, "msg":[ { "from":"0031xxxxxxxxx", "to":[ { "number":" caller_number" } ], "body":{ "type":"auto", "content":"" }, "allowedChannels":[ "WhatsApp" ], "richContent":{ "conversation":[ { "template":{ "whatsapp":{ "namespace":"xxxxxxxx_xxxx_xxxx_xxxx_xxxxxxxxxxxx", "element_name":"xxxxxxxx", "language":{ "policy":"deterministic", "code":"xx" }, "components":[ { "type":"body", "parameters":[] } ] }
Below you can find guidelines on where to find the elements in red.
Producttoken
Product token from the CM portal.
Ask your CM.com contact person for the producttoken, because this is only visible to CM.com.
From
Phone number from which the message is send. Start with the country code. (For example for The Netherlands it starts with '0031').
Namespace, Element_name, Code
These elements relate to the WhatsApp message template to be sent.
The information can be found in the WhatsApp Dashboard. Below is an explanation of how to access it.
Go to your profile in the right top corner.
Click 'Dashboard'
Below 'Channels' (middle pane), select 'WhatsApp Business'
Go to the 'Message templates' tab and select the WhatsApp message template you want to connect.
Go to the 'For Developers' tab and here you can find the information. See below.
