Set up a multilingual bot to use in voice channel

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

Important

Power Virtual Agents capabilities and features are now part of Microsoft Copilot Studio following significant investments in generative AI and enhanced integrations across Microsoft Copilot.

Some articles and screenshots might refer to Power Virtual Agents while we update documentation and training content.

You can configure routing rules to route voice calls to appropriate agents based on the language that your customer has selected. A multilingual contact center helps you serve global customers who want to interact with your contact center in the language of their choice. You can also set up bots as the first contact who can handle such requests.

Use Bot Framework Composer in Copilot Studio to set up a bot for a multilingual contact center.

The process for setting up the multilingual bot in Copilot Studio is as follows:

  1. Create a bot in Copilot Studio.

  2. Create a topic in Bot Framework Composer.

  3. Configure the greeting topic in Copilot Studio.

  4. Configure the transfer to agent node by using the escalate topic.

  5. Configure workstreams and queues.

  6. Verify the multilingual bot.

Note

The new multilingual chatbots aren't currently supported in Omnichannel for Customer Service.

Prerequisites

  • You must install Bot Framework Composer locally on the computer that you'll use to configure the multilingual bot.
  • Your bot must be registered in the Azure app registration page. Note the application ID. More information: Create an app registration

Create a bot in Copilot Studio

You'll create a bot in Copilot Studio by selecting the environment in which Omnichannel for Customer Service is configured. For detailed instructions, go to Create a bot.

For example, you can create a bot with the following details:

  • Name: A descriptive name for the bot, such as Greeter bot.
  • Language: The primary language for the bot, such as English (US).
  • Environment: The environment where Omnichannel for Customer Service is configured, such as contoso-printers.

Create a topic in Bot Framework Composer

  1. In Copilot Studio, for the bot that you created, select Topics in the site map, and then in the Topics pane, select the dropdown arrow for New topic. A message appears stating that the application is trying to open Bot Framework Composer. For more information on how to navigate the Bot Framework Composer, see: Tutorial: Create a weather bot with composer.

  2. Select Open, and on the Import your bot to new project dialog that appears, enter the following details:

    • Name: A name for the project, such as Multilingual bot.
    • Location: Select a folder on the computer.
  3. In Bot Framework Composer, select More commands (...), select Add a dialog, and enter the following details:

    • Name: A name such as PVA greeter dialog.
    • Description: A brief description.
  4. In the site map, select BeginDialog, select the Add (+) node, and then select Send a response.

    1. In the Bot responses section, select the Add (+) node, and then select Speech.

    2. Select Add alternative, and then add the following text.

      <speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US"><voice name="en-US-AriaNeural"><lang xml:lang="en-US">Hello ${virtualagent.msdyn_CustomerName}. Welcome to contoso customer support.</lang></voice></speak>

      Note

      The ${virtualagent.msdyn_CustomerName} variable provides the customer name for authenticated customers only through record identification. More information: Identify customers automatically

    3. Select the Add (+) node in BeginDialog, point to Ask a question, and then select Multi-choice.

      Select the multiple-choice option for asking a question.

    4. Repeat steps a and b to add the following text.

      <speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US"><voice name="en-US-AriaNeural"><lang xml:lang="en-US">Press or say 1 for English.</lang><break strength="medium"/><lang xml:lang="fr-FR"> Appuyez ou dites 2 pour le français.</lang><break strength="medium"/><lang xml:lang="pt-PT">Pressione 3 para português.</lang></voice></speak>

    5. Select the User input box, and enter the following details on the rightmost pane:

      • Property: conversation.language_choice
      • Array of choices: 1, 2, 3, one, two, three, un, deux, trois, um, dois, três

      In Array of choices, specify one choice per expression.

    Set calues for an Array of choices.

    1. Select the Add (+) node, select Create a condition, and then select Branch Switch (multiple options). Enter the following details:

      • Condition: conversation.language_choice

      • Value: 1, 2, 3, One, Two, Three, Un, deux, trois, Um, dois, três

        Enter one choice per value.

    2. Select the Add (+) node and then select Manage properties > Set a property and enter the following details:

      • Condition: virtualagent.va_CustomerLocale
      • Value: en-US

    Repeat the steps to Set a property for fr-FR, pt-PT, hi-IN.

    Set customer locale by using the branch switch option.

    The value for the virtualagent.va_CustomerLocale variable will be updated with the language selected by the customer.

    Note

    You must set the va_CustomerLocale context variable with the locale codes for the languages that you want to support. More information: Supported locations and locale codes

    1. Select the Add (+) node, and then select Begin a Power Virtual Agent topic.

    2. In Dialog name, select Escalate.

  5. In the site map, select Publish, and then select Publishing profile.

    1. Select Edit, and then select Login to proceed.

    2. Select the environment and bot, and then select Save.

    3. Select the Publish bot, select the bot, and then select Publish selected bots.

    4. Select Okay .

  6. In Copilot Studio, refresh Topics. You'll see the topic listed.

  7. Select Publish.

Configure the greeting topic

  1. In Copilot Studio, open the Greeting topic in the authoring canvas, and delete all the default messages except the trigger phrases.

  2. Select Add node (+), and then select Redirect to another topic.

  3. Select the greeter dialog that you created, which is, PVA greeter dialog in our example.

  4. Save the Greeting topic.

Configure the transfer to agent node by using the escalate topic

  1. In Copilot Studio, open the Escalate topic in the authoring canvas, and delete all the default messages except the trigger phrases.

  2. Select Add node (+), select End the conversation, and then select Transfer to agent.

  3. Optionally, in Private message to agent, enter the following to fetch the preferred language of the customer.

    Customer preferred language is {x} bot.va_CustomerLocale

  4. Save the topic.

  5. In the site map under Manage, select Channels, and then select Microsoft Teams on the Channels page.

  6. Publish the bot with the latest content.

  7. In the site map under Manage, select Agent transfers, and then select Omnichannel on the Agent transfers page.

  8. On the Omnichannel pane, configure the following settings:

    • Enable voice: Set to Yes.
    • See the environment this bot is connected to: Select the environment in which the bot will be used.
    • Application ID: Enter the application ID that was generated when you registered the app in Azure.
  9. Select Add your bot.

  10. After the bot is connected, select View details in Omnichannel. The Customer Service admin center or Contact Center admin center page opens on a new tab and displays the details of the bot.

  11. Note the bot user information that you'll need for further configuration steps.

Configure workstreams and queues

Use the information in the following articles to configure a voice workstream and a voice queue, and their routing rules.

For example, ensure the following settings:

  1. Configure three voice queues—one each for English, French, and Portuguese—and add the required agents.

  2. Configure a voice workstream with English as the primary language, and French and Portuguese as additional languages.

    Workstream with multiple language options set.

  3. In the route to queues rule set of the workstream, use Conversation.CustomerLanguage as the criteria to route the incoming call to different language queues based on the option that's selected by the customer.

    Route-to-queue rules for the multilingual contact center workstream

  4. In the Bot area of the workstream, edit to add the Copilot Studio bot that you configured.

Verify the multilingual bot

  1. As a customer, call the number that's registered with the voice workstream.

  2. When you're prompted with an interactive voice response (IVR) message, select a language. Verify that the bot routes the call to an agent who can speak with you in the language that you've selected.

Set up a multilingual contact center
Integrate a Copilot Studio bot