Prerequisites
  • Genesys Cloud CX 1, Genesys Cloud CX 2, or Genesys Cloud CX 3 license.
  • A valid Genesys Dialog Engine Bot Flow subscription. For more information, contact Genesys Cloud Sales.
  • If you have a Nuance Mix account, the Nuance OAuth Client ID and Client secret credentials. For more information, see the Nuance Mix documentation.
  • If you do not have a Nuance Mix account, complete one of the following steps:
    • Based on your preferred Nuance region, navigate to the corresponding Nuance Mix home page to create a free account for testing purposes. For more information about the available regions, see Geographies in the Nuance Mix documentation. It is important to note that the free account has limitations and cannot be used for production traffic.
    • Contact your Nuance representative directly to place your service order and create your production account.

You can create an Architect bot and incorporate third-party ASR grammars for use with inbound chat or message flows. Create the bot within the flow, or create it separately and then call it from the flow. 

Note: For more information about language coverage, see the Nuance Recognizer documentation or contact your Nuance representatives directly.

Step 1: Add and activate your third-party ASR engine integration

Add your third-party ASR engine integration. The example in this article uses the Nuance Recognizer as a Service integration.

  1. Click Admin.
  2. Under Integrations, click Integrations.
  3. Click Integrations.
  4. In the Search box, type Nuance Recognizer as a Service. The card for Nuance Recognizer as a Service appears.
  5. Click Install.

To configure the Nuance Recognizer as a Service integration for one Nuance language group, perform the following steps:

  1. Open the Nuance Recognizer as a Service integration:
    • If you did not previously installed the integration into your Genesys Cloud organization, install it now
    • If you installed the integration, open the Genesys Cloud Admin menu and under Integrations, click Integrations. Then, search for and open the Nuance Recognizer as a Service integration.
  2. On the Nuance Recognizer as a Service integration page, click the Configuration tab.
  3. Under Properties, locate the Recognizer Endpoint URL section.
  4. In the Value field, enter the regional endpoint for the Nuance language group that your bot supports:
    • For example, if you want to use Nuance Recognizer as a Service for en-US, ja-JP, and zh-CN, use nr-apac4.api.nuance.com.
    • If your bot only supports one language, use the URI of a language group that includes the language and is closest to your organization’s location. For example, if your bot supports fr-FR by default and your organization exists in Switzerland, use nr-wu2.api.nuance.eu. For more information, see Language groups by region in the Nuance Recognizer documentation.
  5. Click the Credentials tab. Genesys Cloud lists the credentials for all authorization endpoint URLs that you can use to authenticate to endpoints associated with the various Nuance language groups. Configure the credentials for the default recognizer endpoint only.
    Note: To determine what credentials to configure for a specific language group, check what Nuance region the language group belongs to based on its corresponding endpoint URL. For more information, see Geographies in the Nuance Mix documentation.
    Click the image to enlarge.Credentials example
  6. Click Configure for the Nuance Recognizer Credentials for the Default Recognizer Endpoint URL. The Configure Credentials dialog box opens.
  7. Copy the “client_id” value from your OAuth configuration into the Nuance Client ID field. Use your AU, EU, or US client ID depending on whether your bot uses languages from the AU, EU, or US Nuance region.
    Note: For example, if the regional endpoint URI you specified in step 4 ends in nuance.eu, use the client ID of your mix.nuance.eu credentials. If the URI ends in nuance.com, use the client ID of your mix.nuance.com credentials.
    Click the image to enlarge.Nuance Mix Client ID
  8. Copy the “client_secret” value from your OAuth configuration into the Nuance Client Secret field. Use your AU, EU, or US client secret depending on whether your bot uses languages from the AU, EU, or US Nuance region.
    1. Copy the “private_key_id” from the JSON file into the Nuance Private Key ID field.
    2. Copy the “private_key” value from the JSON file into the Nuance Private Key field.
  9. Click OK.
  10. Click Save.
  11. To activate the Nuance Recognizer as a Service status, in the Status column click Inactive. The Change Status dialog box opens.
  12. Click Yes. The Nuance Recognizer as a Service integration status changes to Active.
  1. Open the Nuance Recognizer as a Service integration:
    • If you did not previously installed the integration into your Genesys Cloud organization, install it now
    • If you installed the integration, open the Genesys Cloud Admin menu and under Integrations, click Integrations. Then, search for and open the Nuance Recognizer as a Service integration.
  2. On the Nuance Recognizer as a Service integration page, click the Configuration tab.
  3. Under Properties, locate the Recognizer Endpoint URL section.
  4. In the Value field, enter a regional endpoint based on the following criteria:
    • If a language group includes all the languages that your bot supports, use its corresponding URI. For example, if you want to use Nuance Recognizer as a Service for en-US, ja-JP, and zh-CN, use nr-apac4.api.nuance.com. If your bot only supports one language, use the URI of a language group that includes the language and is closest to your organization’s location. For example, if your bot supports fr-FR by default and your organization is based in Switzerland, use nr-wu2.api.nuance.eu. For more information, see Language groups by region in the Nuance Recognizer documentation.
    • If the languages that your bot supports and you want to use Nuance Recognizer as a Service for belong to multiple language groups, use a URI of a language group that includes a language that your bot supports by default. Specify the URIs of the other language groups under the Advanced tab. For more information, see Language groups by region in the Nuance Recognizer documentation. 
  5. Click the Advanced tab.
  6. To configure mappings for the languages that Nuance does not serve through the default endpoint you previously specified in the Recognizer Endpoint URL section, follow these steps:
    Notes:
    • Except for the languages that the default regional endpoint covers, be sure to map all the languages to an appropriate Nuance endpoint.
    • If you map a language to a regional Nuance endpoint, then you must set the credentials for that language region under Credentials, even if the default regional endpoint and its corresponding credentials would cover that language.
    • If a language does not have a mapped value in the Advanced Configuration section, then Genesys Cloud attempts to use the default regional endpoint with the default credentials.
    1. (Optional) To download and inspect the JSON schema that Genesys Cloud validates your advanced configuration against, click Download Schema.
    2. Add a property named “endpointMappings” as an object.
    3. Add the language tags of your supported languages and the corresponding Nuance endpoints as key-value pairs to the object:Advanced configuration example
      Note: The user interface validates the object against the expected JSON schema and informs you if the object does not comply.
  7. Click the Credentials tab. Genesys Cloud lists the credentials for all authorization endpoint URLs that you can use to authenticate to endpoints associated with the various Nuance language groups.
    Note: To determine what credentials to configure for a specific language group, check what Nuance region the language group belongs to based on its corresponding endpoint URL. For more information, see Geographies in the Nuance Mix documentation.
    Click the image to enlarge.
    Credentials example
  8. Click Configure. The Configure Credentials dialog box opens.
  9. Copy the “client_id” value from your OAuth configuration into the Nuance Client ID field. Use your AU, EU, or US client ID depending on whether your bot uses languages from the AU, EU, or US Nuance region.
    Note: For example, if the URI of the regional endpoint you want to configure credentials for ends in nuance.eu, use the client ID of your mix.nuance.eu credentials. If the URI ends in nuance.com, use the client ID of your mix.nuance.com credentials.
    Click the image to enlarge.Nuance Mix Client ID
  10. Copy the “client_secret” value from your OAuth configuration into the Nuance Client Secret field. Use your AU, EU, or US client secret depending on whether your bot uses languages from the AU, EU, or US Nuance region.
    1. Copy the “private_key_id” from the JSON file into the Nuance Private Key ID field.
    2. Copy the “private_key” value from the JSON file into the Nuance Private Key field.
  11. Click OK.
  12. Repeat step 8 for all other credentials that you must configure.
    Notes:
    • If you configured an endpoint mapping for a language in the Advanced tab, then you must configure the credentials for the specific Nuance authorization endpoint URL that the language’s group is associated with.
    • If you have not configured any endpoint mapping for the language in the Advanced tab, then you must configure the credentials for the default regional endpoint that you previously specified under the Properties tab.
  13. Click Save.
  14. To activate the Nuance Recognizer as a Service status, in the Status column click Inactive. The Change Status dialog box opens.
  15. Click Yes. The Nuance Recognizer as a Service integration status changes to Active.

Install Nuance Recognizer as a Service

Click the image to enlarge.

Install Nuance Recognizer

Configure Nuance Recognizer as a Service

Click the image to enlarge.

Configure Nuance Recognizer 

Step 2: Add grammar from your third-party ASR engine to Architect’s grammar page

Add grammar from your third-party engine to Architect.

<?xml version="1.0"?>
<grammar xmlns="http://www.w3.org/2001/06/grammar" xml:lang="en-US" version="1.0" root="fruits"> 
     <rule id="fruits" scope="public">
          <one-of>
               <item>apple</item>
               <item>banana</item>
               <item>blueberry</item>
               <item>cherry</item>
               <item>grape</item>
               <item>peach</item>
               <item>pear</item>
               <item>pineapple</item>
               <item>strawberry</item>
               <item>watermelon</item>
          </one-of>
     </rule>
</grammar>

  1. Click Admin.
  2. Under Architect, click Architect. Architect opens in a new tab.
  3. Click Grammars.
  4. Click Add. The Create New Grammar dialog box opens.
  5. Name the grammar Fruit.
  6. Under Grammar Description, add descriptive details about the grammar. For example, “list of fruit for sale.”
  7. Click the Starting Language and select the initial language that you want the grammar to use.
  8. Click Create. The Grammar Editor opens.
  9. Depending on the type of grammar that you want to add, click one of the following tabs:
    • Voice 
    • DTMF
  10. To manually add GRXML content from the Nuance Recognizer ASR grammar, enter the syntax into the editor.
    Note: If the grammar passes XML validation, then a green message appears, letting you know that the grammar is free of errors. If a red message appears, then Architect lets you know the location in the GRXML that the error or errors exist.
  11. To upload a grammar file with the .gram extension, follow these steps:
    Note: If you switch from the .grxml file type to the .gram file type, then Architect removes existing .grxml file.
    1. Click .grxml and select .gram.
    2. Click Select File. The Add A Grammar File dialog box opens.
    3. Click Select .gram file and upload the appropriate file.
    4. Click Add File. Architect uploads the file but does not check for errors.
  12. Click Save.

Grammar Editor for DTMF

The example in this article uses DTMF grammar. For details and an example of voice grammar, see Add a grammar for a bot flow in Architect.

Click the image to enlarge.

DTMF Grammar Editor example fruit

Step 3: Create a bot for an inbound flow and add intents, slots, and slot types

This procedure describes how to create a bot for an inbound message flow. In this example, build the bot flow to ask users what they want to do. They can pay their bill or order fruit.

  1. Create a new inbound bot flow:
    1. From the Architect home page, click or hover over the Flows menu and select Bot Flow.
    2. Click  Add. The Create Flow dialog box opens.
    3. In the Name field, enter a unique name for the flow.
    4. (Optional) In the Description field, add a short sentence or phrase to describe this flow.
    5. Click the Default Language list and select the flow’s default supported language.
    6. Click the Divisions list and select the division in which to place the flow.
    7. Click Create Flow. The flow’s configuration page opens.
  2. Under Natural Language Understanding, click Intents.
  3. Add the first intent:
    1. Click Add Intent.
    2. Name the intent Pay my bill.
    3. Click Add Utterance.
    4. On the Utterances page, add an utterance. For example, “payment.” 
    5. Click Add.
    6. Repeat steps a-e to add another utterance. Best practice recommends that you add five or more utterances. 
  4. Add the second intent:
    1. Click Add Intent.
    2. Name the intent Fruit order.
    3. Click Add Utterance.
    4. On the Utterances page, add an utterance. For example, “place order.” 
    5. Click Add.
    6. Repeat steps a-e to add more utterances. Best practice recommends that you add five or more utterances. 
  5. Add slots:
    1. Under the Natural Language Understanding menu, click Slots.
    2. Click Add Slot. the Add Slot dialog box opens.
    3. Name the slot PickFruit.
    4. Under Associated Slot Type, select New List.
    5. Click Engine and select the third-party ASR engine. In this example, select Nuance Recognizer as a Service.
    6. Click Grammar and select the grammar that you added in the Step 2 section above, Fruit.
    7. Click Save.
    8. Repeat steps a-g to add a slot for Payment and associate it with the builtin:amountOfMoney existing slot type. 
  6. Add a slot type for the fruit example:
    1. Under the Natural Language Understanding menu, click Slot Types.
    2. Click Add Slot Type. The Add Slot Type dialog box opens.
    3. Name the slot Pick Fruit Type and then click Save.
    4. Add various slot type values, such as strawberry, pineapple, pear, peach, grape, cherry, blueberry, banana, apple, and watermelon.
      Note: The Payment slot is already related to a built-in slot type.
  7. Save your bot flow and continue with Step 4.

Intents

Click the image to enlarge.

Intents bot flow example

Add a slot

Click the image to enlarge.

Slot with grammar

Slot list

Click the image to enlarge.

Slots bot flow example

Slot types

Click the image to enlarge.

Slot types bot flow examples

Step 4: Configure the bot flow’s starting bot task

Complete the bot configuration, then save and publish it.

  1. Under Starting Bot, click Default Bot.
  2. Under Toolbox, expand the Ask menu and add an Ask for Intent action below start in the task editor.
  3. From the Ask menu add an Ask for Slot action below the Fruit order path and configure the action:
    1. Click the Slot list and select PickFruit.
    2. Click the Question, change the text to ask “What is the type of fruit that you want to buy?“, and click Save. Notice that the Grammar for this action uses the slot’s grammar.
  4. Under Toolbox, expand the Transfer menu and add a Transfer to ACD action below the Pay my bill path. 
  5. Add your preferred action below the Pay my bill’s failure path. For example, a Communicate action.
  6. Save and publish your flow.

Click the image to enlarge.

Use a grammar in a bot flow example

Step 5: Create an inbound message flow 

Create an inbound message flow that calls your new bot flow.

  1. From the Architect home page, click or hover over the Flows menu and select Inbound Message.
  2. Click Add. The Create Flow dialog box opens.
  3. In the Name field, type a unique name for the inbound message flow. 
  4. (Optional) In the Description field, add a short sentence or phrase to describe this flow.
  5. Click the Divisions list and select the division in which to place the flow.
  6. (Optional) Click the Error event transfer Queue list and select the queue in which to transfer the flow if Architect detects an error.
  7. Click Create Flow. The flow’s configuration page opens.
  8. Under Starting State, click Initial State.
  9. From the Toolbox, expand the Bot menu and add a Call Bot Flow action below Start in the task editor.
  10. Under Bot Flow, search for and select the bot that you created in Section 3.
  11. Save and publish your flow.

Now you can test and implement a bot flow that uses your third-party ASR grammar in an Architect inbound message flow.

Click the image to enlarge.

Inbound message flow example