Configure a WhatsApp channel through Twilio

Applies to: Dynamics 365 Contact Center—embedded, Dynamics 365 Contact Center—standalone, and Dynamics 365 Customer Service

The WhatsApp channel feature lets you integrate WhatsApp through Twilio with either the Customer Service admin center or Contact Center admin center application to engage with customers who prefer to use the WhatsApp channel.

The success of social media customer service, like all other customer service, depends on the quality of care provided. Communications from agents should be timely, accurate, sensitive, brief, and friendly, which ultimately improves the customer satisfaction and brand loyalty.

Prerequisites

WhatsApp message types and 24-hour session rule

  • Template messages: Are the outbound messages that agents send through Twilio using one of the preapproved templates? They're typically transactional messages, such as delivery alerts and appointment reminders, sent to users who have opted in to receive messages from your organization. For messages requiring localization, you must get the message approved by WhatsApp in each language. For more information about WhatsApp message templates, see WhatsApp documentation.

  • Session messages: According to WhatsApp, session messages are incoming messages from a customer or outgoing replies by an agent to the incoming messages, within 24 hours. A messaging session starts when agents receive a message from a customer. It lasts for 24 hours from the most recently received message. Session messages don't need to follow a template, and can include media attachments.

  • 24 hours session rule: A messaging session starts when an agent receives a message from a customer or replies to the incoming message from the customer. When the customer sends a message, the agent has 24 hours to reply from the time the agent received it. However, after 24 hours, the agent can send a message to customer only by using a predefined and approved template.

End-to-end walkthrough

  1. Fetch Twilio account details
  2. Create a WhatsApp channel
  3. Create routing rules
  4. Modify settings for a specific WhatsApp phone number

Fetch Twilio account details

To integrate a WhatsApp channel through Twilio with the Customer Service admin center or Contact Center admin center application, you need to go to your Twilio account and fetch the ACCOUNT SID and AUTH TOKEN values. Save the values as they're required to configure a WhatsApp channel through the admin application.

Go to your Twilio Console Dashboard > Settings > General to fetch the details.

Create a WhatsApp channel

  1. In the site map of Customer Service admin center or Contact Center admin center, select Channels in Customer support. The Channels page appears.

  2. Select Manage for Messaging accounts. The Accounts and channels page appears.

  3. Select New account.

  4. Enter the following details:

    1. On the Channel details page, enter a name and select WhatsApp in Channels.

    2. On the Account details page, enter the following details:

    • Account SID: Specify the value from your Twilio account.
    • Authentication token: Specify the value from your Twilio account.
    1. On the WhatsApp numbers page, select Add, and on the page that appears, enter the following information:
    • Name: Specify a name.
    • Number: Specify the WhatsApp phone number by prefixing the plus (+) symbol.
    1. On the Callback information page, copy the value in the Twilio inbound URL box to use for the Twilio account.

    2. Select Done. The account is added to the list.

  5. To configure routing and work distribution, you can create a workstream or select an existing one.

  6. Select the workstream that you've created for the WhatsApp channel and on the workstream page, select Set up WhatsApp to configure the following options:

    1. On the WhatsApp number page, in the Available WhatsApp numbers list, select the number that you created.

    2. On the Language page, select the language.

    3. On the Behaviors page, configure the following options:

    1. On the User features page, set the toggle for File attachments to On and select the following checkboxes if you want to allow agents and customers to send and receive file attachments. More information: Enable file attachments.
    • Customers can send file attachments
    • Agents can send file attachments
    1. Verify the settings on the Summary page, and select Finish. The WhatsApp channel instance is configured.
  7. Configure routing rules. More information: Configure work classification.

  8. Configure work distribution. More information: Work distribution settings

  9. Optionally, add a bot.

  10. Based on your business needs, in Advanced settings, configure the following options:

Configure WhatsApp message templates

You can configure the option for agents to send WhatsApp-approved messages. If 24 hours pass after a customer's last message, agents will only be able to send messages from WhatsApp-approved templates until the customer responds. You must create your message templates in your Twilio account and have them approved by WhatsApp before you add them in Dynamics 365 Contact Center or Dynamics 365 Customer Service.

Perform the following steps:

  1. For the selected workstream for WhatsApp, edit the WhatsApp account.
  2. On the Behaviors tab, in WhatsApp message templates, select Add.
  3. On the Add message template dialog box, do the following:
    • Name: Specify a name for the template.
    • Default language: Select the language from the list.
    • WhatsApp approved text: Copy and paste the approved text from the template that you created in WhatsApp.
  4. Select Save.
  5. Create as many templates as required.

Integrate omnichannel application with a Twilio sandbox account

  1. In Twilio, go to the Programmable SMS > Programmable Messaging > WhatsApp sandbox.
  2. In the WHEN A MESSAGE COMES IN box, enter the Twilio inbound URL that you generated in the application, and save the changes.
  3. To test the WhatsApp channel with the Twilio sandbox, you can send a WhatsApp message to the number provided by Twilio with a unique code that is also provided by Twilio. You can also use the sandbox message template provided by Twilio to test sending messages outside of the 24-hour window.

Understand and create workstreams
Configure automated messages
Configure a post-conversation survey
Skill-based routing
Create message templates
Templates
Delete a configured channel
Support for live chat and asynchronous channels