Edit

Configure a WhatsApp channel through Azure Communication Services

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

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

To enhance customer satisfaction and improve communications, the omnichannel capability in the application enables you to send and receive WhatsApp messages using Azure Communication Services. You can use the WhatsApp channel feature to engage in conversations with customers for product inquiry and customer service scenarios with those who prefer to communicate using WhatsApp.

Important

  • From June 2026, usernames and a new customer identifier called the Business-Scoped User ID are being released for WhatsApp. For updates on the timeline for this change, refer to WhatsApp Business-Scoped User IDs in the Meta documentation.
  • A Business-Scoped User ID will be assigned to every WhatsApp user that interacts with your organization. When a user adopts a WhatsApp username, their phone number is no longer be sent, and their Business-Scoped User ID becomes the primary identifier.
  • With this change, the Contact Book is enabled by default for your business WhatsApp account. By keeping your Contact Book enabled, you preserve your ability to identify customers by phone number even after they adopt a username. If you disable the Contact Book, the phone number is permanently lost as an identifier for the WhatsApp customer.
  • After a customer’s phone number is no longer available, the system displays their first and last name if linked to a contact record. Otherwise, the customer shows "Visitor."
  • What action do I need to take?
    • Review your routing rules. Any custom routing rules that have conditions on phone number patterns like country/region code–based routing don't match Business-Scoped User ID-only conversations. Add a fallback rule to route these conversations correctly. Business-Scoped User ID is prefixed with a two-letter country code and a period, followed by up to 128 alphanumeric characters (for example, US.13491208655302741918).
    • Review any integrations or automation workflows, such as like Power Automate flows, that rely on phone numbers for customer identification and update them to handle Business-Scoped User ID.
    • Review context variables in your AI agents. If you use msdyn_CustomerPhoneNumber in your AI agent configuration, update your logic to also handle scenarios where only the Business-Scoped User ID is available.
      Learn more in WhatsApp usernames and business-scoped user IDs (BSUID).

Prerequisites

  • Channels are provisioned in your environment. Learn more in provision channels.
  • Make sure that the Azure subscription and Dynamics 365 account are in the same tenant.

Setup advanced messaging for WhatsApp

Setup Event Grid

Important

Review Deliver events to Microsoft Entra protected endpoints and make sure you configure all of the required Microsoft Entra application permissions and role assignments. Missing permissions can cause webhook endpoint validation to fail and prevent WhatsApp events from reaching Dynamics 365 Contact Center.

End-to-end walkthrough

  1. Get Azure Communication Services details.
  2. Create a WhatsApp channel in Dynamics 365 Contact Center.
  3. Create a workstream for the WhatsApp channel.
  4. Set up WhatsApp message templates.

Get Azure Communication Services details

Gather the following details before you create the WhatsApp channel in the following section. You might find it helpful to have the Azure portal and the Copilot Service admin center open in separate browser tabs.

  1. Sign in to the Azure portal.

  2. Search for and select the Azure Communication Services resource that you created in Prerequisites.

  3. Copy the name of the resource. You'll paste this value in the ACS resource name field when you create the WhatsApp channel in the admin center.

  4. Select Events. Select the event subscription that you created when you set up Advanced Messaging for WhatsApp in Prerequisites.

  5. Select Additional features, and then scroll down to MICROSOFT ENTRA AUTHENTICATION.

  6. Copy the value of Microsoft Entra Application ID or URI. You'll paste this value in the Event grid app ID field in the WhatsApp channel settings.

  7. Copy the value of Microsoft Entra Tenant ID. You'll paste this value in the Event grid app tenant ID field in the WhatsApp channel settings.

  8. Select Settings, and then select Keys. Under Primary key, select the copy icon to the right of Connection string. You'll paste this value in the ACS connecting string field in the WhatsApp channel settings.

  9. Under Advanced Messaging, select Channels. Select the copy icon to the right of the Channel ID of the channel that you created when you set up Advanced Messaging for WhatsApp in Prerequisites. You'll paste this value in the Channel ID field in the WhatsApp channel settings.

Create a WhatsApp channel

Important

Before you create a WhatsApp channel in Dynamics 365 Contact Center, make sure your WhatsApp business account is registered and connected through Azure Communication Services in the Azure portal.

Create a WhatsApp channel in Copilot Service admin center.

  1. In Customer support, select Channels.

  2. In Accounts, select Manage for Messaging accounts.

  3. Select Add account.

  4. On the Add account page, enter a Name for your channel, and then in the Channel list, select WhatsApp.

  5. Select the data sharing consent message, and then select Next.

  6. In the Provider list, select Azure Communication Services.

In the following instructions, you provide the information from the Azure portal in the previous section.

  1. On the Channel settings page:

    • ACS resource name: Paste the name of the resource.
    • Event grid app ID: Paste the Microsoft Entra Application or URI.
    • Event grid app tenant ID: Paste the Microsoft Entra Tenant ID.
    • ACS connecting string: Paste the primary key Connection string.
  2. Select the checkbox to confirm that the Azure Communication Services resource is connected to only one organization, and then select Next.

  3. Select Add, and then enter the following information:

    • Name: Enter a name for the channel.
    • Channel ID: Paste the Channel ID that you copied from the Azure portal.
  4. Select Add, and then select Next.

  5. Select Copy next to the Whatsapp webhook URL box.

  6. In the Azure portal, select Events. Select the event subscription that you created when you set up Advanced Messaging for WhatsApp in Prerequisites.

  7. Next to ENDPOINT, select Change. Paste the Whatsapp webhook URL that you copied from the Callback information page in the WhatsApp channel settings.

  8. Select the Web Hook URL, and then select the Filters tab.

  9. Under ADVANCED FILTERS, configure the event subscriptions so that the application can receive both inbound WhatsApp messages and outbound delivery-status updates from this channel.
    Use the same Communication Services Event Grid System Topic and the same Dynamics 365 webhook URL for both subscriptions:

    • Inbound messages subscription
      Use the existing event subscription that you updated in step 7. On the Filters tab, under Event Types, select only Microsoft.Communication.AdvancedMessageReceived. Under Advanced filters, enter the following information:
      • Key: data.to
      • Operator: String is in
      • Value: Paste the Channel ID from the Azure portal.
    • Outbound delivery-status subscription
      On the same Event Grid System Topic, create a second event subscription and give it a distinct name, such as whatsapp-<channel-name>-delivery-status. Use the same webhook URL and Microsoft Entra authentication settings as the inbound subscription. On the Filters tab, under Event Types, select only Microsoft.Communication.AdvancedMessageDeliveryStatusUpdated. Under Advanced filters, enter the following information:
      • Key: data.from
      • Operator: String is in
      • Value: Paste the Channel ID from the Azure portal.

    Important

    • Both subscriptions are required. Without the outbound delivery-status subscription, the application won't receive delivery, read, or failure updates for outbound WhatsApp messages, and representatives won't see delivery failure notifications in the conversation.
    • If your Azure Communication Services resource contains only one WhatsApp channel that isn't shared with other channels or workloads, you can skip configuring the advanced filters for both subscriptions. You can filter by event type. Use the data.to and data.from filters only when the same ACS resource is shared across multiple channels or workloads.
  10. Select the checkbox to confirm that the WhatsApp channel is set up correctly, and then select Done.

Create a workstream for the WhatsApp channel

To configure routing and work distribution, create a workstream with the Channel set to WhatsApp or select an existing one.

Set up WhatsApp message templates

WhatsApp uses a 24-hour messaging window. If a WhatsApp user has sent a message, whether it's a communication they initiated or a reply to one of your messages, you have a 24-hour window to send that user messages that don't need to use a template. After the 24-hour window closes, you can only send messages by using an approved template.

You must create WhatsApp message templates before you can add them to your WhatsApp workstream. Learn more in Send WhatsApp template messages. Only text-based message templates can be added to your workstream.

  1. In the admin center, edit the WhatsApp workstream.

  2. On the Behaviors page, under WhatsApp message templates, select Add.

  3. Enter a Name for the template.

  4. Select the Default language from the list.

  5. Copy the text from the template that you created in WhatsApp and paste it in WhatsApp approved text.

  6. Select Save.

Create as many templates as you require.

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