Control knowledge behavior in your digital bot flow

Prerequisites
  • Genesys Cloud CX 1, Genesys Cloud CX 2, Genesys Cloud CX 3, Genesys Cloud CX 1 Digital Add-on II, Genesys Cloud CX 2 Digital, Genesys Cloud CX 3 Digital, or Genesys Cloud CX AI Experience license
  • Architect > UI View permission
  • Architect > Flow Add, View, Edit, Delete permissions
  • Language Understanding > All permission
  • Knowledge > All permission
  • Analytics > Knowledge Aggregate > All permission

    Add knowledge to your digital bot flows to create FAQ-style bots. To add knowledge, create a knowledge base in the knowledge workbench and then link it to your digital bot flow. You can also use an existing knowledge base with a digital bot flow in Architect or open the knowledge workbench from Architect and then create and build a new knowledge base. Find the Knowledge section from the Architect’s Natural Language Understanding menu.

    This article describes examples and recommended practices to control how the knowledge behavior occurs from start to finish in your digital bot flow. For more information about how to create question and answer pairs, and to add knowledge to your digital bot flow, see Add knowledge to your bot flow.

    Overview

    You can design a reusable task that runs immediately after it matches one or many knowledge articles. The actions that trigger this reusable task are Wait for Input or a Digital Menu. The reusable knowledge task gives you more control to adapt the flow behavior from start to finish and then decide when to show the knowledge article, disambiguation, and feedback.

    For example, you can store the matched knowledge articles, which the bot would typically use in the knowledge handling, as a flow variable by an Ask for action. Then you can decide what happens next in the designated task and control the customer journey.

    Note: To trigger the reusable knowledge task, you must use a Wait for Input action or a Digital Menu action.

    Process

    The participant provides an utterance or phrase. The bot checks to see if the utterance has a high confidence on one article, or on many articles. In cases of disambiguation, the digital bot flow loops through a presentation of tiles for each knowledge article, and then loops through the articles by category until the participant confirms their intent. Then, the flow can run a Send Knowledge Feedback action after the article appears to capture positive or negative feedback, which gives you more control around knowledge configuration.

    • Standard or custom settings: Choose between standard and custom settings in the flow’s default knowledge base area to determine how to control what happens when an utterance triggers an article so that you can customize the customer experience.
    • Knowledge search list: Access the knowledge search results list in your end-to-end task so that you can author knowledge handling and control what happens before, during, and after Architect surfaces the article.
    • Categories and labels: Use an article’s category or label that helps you make flow logic decisions in your tasks and to determine the correct path for the user.
    • Manage knowledge handling: Capture and run a knowledge task when the digital bot flow finds a knowledge match and bypass existing automatic knowledge handling.
    • Global knowledge feedback: Use global knowledge feedback to capture customer feedback after the bot presents an article from a Show Knowledge Article action to ensure that all feedback applies to the same knowledge optimization dashboard.
    • Session.LastKnowledgeSearchID variable: Architect captures this built-in session variable each time a knowledge search happens. You can use it as an input to the Send Feedback action and send feedback through the correct search result.
    • Confident scores: Use the confidence scores to configure logic in your knowledge task and manually handle disambiguation.

    Switch to Custom mode to configure custom knowledge logic

    Advanced digital bot flow authors can switch to custom mode and manually decide how to handle knowledge; for example:

    • Introduce an answer article
    • Loop articles in cases of disambiguation
    • Link to the category or label within the knowledge article
    • Gather feedback

    This process gives you the flexibility to configure behavior according to your business needs. To switch to custom mode, follow these steps:

    1. Open a digital bot flow or create a new one.
    2. Under Natural Language Understanding, click Knowledge.
    3. Under Default Knowledge Base, click the drop-down and select the default knowledge base.
    4. To override the standard, global knowledge settings and create a reusable knowledge task, click Custom. A dialog box opens, asking you to confirm the switch to custom logic.
    5. From the Switch to Custom dialog box, click Switch.

    Click the image to enlarge. End to end knowledge: Switch to Custom

    Create a variable in which to store search results

    1. Under Resources, click Data.
    2. Under Add Variable, select KnowledbeBaseDocument Collection.
    3. In the Enter variable name field, type searchResults.
    4. Click Create.

    Create the custom knowledge reusable task

    Select or create a reusable task and configure custom knowledge settings. These settings include answer introduction, disambiguation, feedback, and follow up.

    1. Click the Custom tab.
    2. Under Custom, perform one of these steps:
      • To select an existing task, click Select a task and then choose the preferred task.
      • To create a new task, follow these steps:
        1. Click Add . The Task Name dialog box opens.
        2. Enter a name for the knowledge task and then click Create New Task.
      • To open the existing or new task in the task editor, click Open task .
    Click the image to enlarge.

    End to end knowledge: Set knowledge task

    Add a Decision action to the reusable task and configure the Yes path

    The example that follows describes how to add a Decision action and configure the Yes path for a reusable knowledge task, after you switch to custom knowledge.

    1. Under Reusable Tasks, click the knowledge task that you want to configure.
    2. Add and configure a Decision action:
      1. From the Toolbox, expand the Logical menu and drag a Decision action into the task editor below the Start box.
      2. Rename the Decision action, or leave the default name.
      3. Under Expression, click Expression Modes and then click Expression .
      4. In the Expression box, type Count(Flow.searchResults) == 1.
    3. Under the Decision action’s Yes path, add and configure a Communicate action.
      1. From the Toolbox, expand the Communicate menu and drag a Communicate action into the task editor.
      2. Rename the Communicate action, or leave the default name.
      3. Under Communication, click Click to add text and in the Rich Text Builder, type Here’s the answer to your question:.
      4. Click Save.
    4. Under the Communicate action, add and configure a Show Knowledge Article action.
      1. From the Toolbox, expand the Communicate menu and drag a Show Knowledge Article action below the Communicate action.
      2. Rename the Show Knowledge Article action, or leave the default name.
      3. Under Knowledge Article, click Expression Modes and then click Expression .
      4. In the Expression box, type Flow.searchResults[0].

    Click the image to enlarge.

    Add a Decision action to the reusable task and configure the Yes path

    Configure the No path for the reusable task’s Decision action

    The example that follows describes how to configure the No path for the Decision action in a reusable knowledge task, after you switch to custom knowledge. Here, add looping logic and then ask for confirmation from the participant whether the article is what they need.

    1. Add and configure a Loop action:
      1. From the Toolbox, expand the Loop menu and drag a Loop action into the task editor below the Decision action’s No path.
      2. Rename the Loop action, or leave the default name.
      3. Under Current Index Data Name, type Flow.loopIndex.
      4. Under Maximum Loop Count, click Expression Modes and then click Expression .
      5. In the Maximum Loop Count box, type Count(Flow.searchResults).
    2. Under the Loop action, add and configure a Communicate action.
      1. From the Toolbox, expand the Communicate menu and drag a Communicate action into the task editor.
      2. Rename the Communicate action, or leave the default name.
      3. Under Communication, click Click to add text and in the Rich Text Builder, type Here’s one thing I found that might help:.
      4. Click Save.
    3. Under the Communicate action, add and configure a Show Knowledge Article action.
      1. From the Toolbox, expand the Communicate menu and drag a Show Knowledge Article action below the Communicate action.
      2. Rename the Show Knowledge Article action, or leave the default name.
      3. Under Knowledge Article, click Expression Modes and then click Expression .
      4. In the Expression box, type Flow.searchResults[Flow.loopIndex].
    4. Add and configure an Ask for Yes/No action.
      1. From the Toolbox, expand the Ask menu and drag an Ask for Yes/No action below the Show Knowledge Article action.
      2. Rename the Ask for Yes/No action, or leave the default name.
      3. Under Question, click the text box and in the Rich Text Builder, type Did that answer your question?.
      4. Click Save.
      5. Under No Match, click the text box and in the Rich Text Builder, type Please enter “Yes” or “No”. Did that answer your question?.
      6. Click Save.
    5. Add and configure a Send Knowledge Feedback action below the Ask for Yes/No action’s Yes path.
      1. Expand the Data category and drag a Send Knowledge Feedback action below the Yes path.
      2. Rename the Send Knowledge Feedback action, or leave the default name.
      3. Under Knowledge Search ID, type Session.LastKnowledgeSearchId.
      4. Under Knowledge article, type Flow.searchResults[Flow.loopIndex].
      5. Under Knowledge Feedback, click Enter value and select Positive.
      6. Expand the Loop menu and drag an Exit Loop action below the Send Knowledge Feedback action.
    6. Add and configure a Send Knowledge Feedback action below the Ask for Yes/No action’s No path.
      1. Expand the Data category and drag a Send Knowledge Feedback action below the No path.
      2. Rename the Send Knowledge Feedback action, or leave the default name.
      3. Under Knowledge Search ID, type Flow.searchResults[Flow.loopIndex].
      4. Under Knowledge article, type Session.LastKnowledgeSearchId.
      5. Under Knowledge Feedback, click Enter value and select Negative.
      6. From the Toolbox, expand the Communicate menu and drag a Communicate action into the task editor.
      7. Rename the Communicate action, or leave the default name.
      8. Under Communication, click Click to add text and in the Rich Text Builder, type Sorry about that! Let’s try again.
      9. Click Save.
    7. From the Toolbox, expand the Disconnect menu and add an Exit Bot Flow action below the Communicate action.
    8. Validate and save the flow.
    Click the image to enlarge.

    End to end knowledge reusable task