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.
  • Nuance OAuth Client ID and Client secret credentials. For more information, see the Nuance Mix documentation or contact your Nuance representative directly.

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, perform the following steps:

  1. Open the Nuance Recognizer as a Service integration:
    • If you have not previously installed the integration into your Genesys Cloud organization, install it now
    • If you have 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 that you want to use for Nuance Recognizer as a Service.
  5. Click the Credentials tab.
  6. Click Configure. The Configure Credentials dialog box opens.
  7. Copy the “client_id” value from your OAuth configuration into the Nuance Client ID field.
  8. Copy the “client_secret” value from your OAuth configuration into the Nuance Client Secret field.
    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 integration, in the Status column click Inactive. The Change Status dialog box opens.
  12. Click Yes. The status of the Nuance Recognizer as a Service integration 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 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 example

Add a slot

Click the image to enlarge.

Slot with grammar

Slot list

Click the image to enlarge.

Slots example

Slot types

Click the image to enlarge.

Slot types example

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.

Grammar 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