Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This article walks through an example of using a Rule Set to build branching from one skill to two other skills. In the example, a user asks for access to an application; the triggered skill will prompt them asking which application they need to access. Based on their response, a Rule Set will take the user to one of two new skills designed specifically for giving them access to that application.

Here is the conversation flow is shown in the Bot Testing widget in the Bot Builder interface. It shows the different scenarios when a user selects Salesforce, Workday, or SAP.

Components of the Conversation

...

Salesforce Application Request - First, create the Salesforce skill. This will be triggered by the top-level Application Access Request. In this skill, the user will be prompted with the Sales Account Type attribute prompt and then receive a simple fulfillment message that their request is being worked on. In a real skill, an integration is required. In the following screenshot, the user's input is shown in the fulfillment message with the variable format @ {global.attributeidentifier}.

...

  1. Salesforce: This is represented as @{global.presal_application_listapplicationlist} equals Salesforce. The attribute identifier is always used with global. or local. as the prefix depending on if it is a global or local attribute. If this Rule evaluates to true, then the Execute value is set to Salesforce Application Request, the name of the Salesforce skill that was previously created.
  2. Workday: This Rule is almost exactly the same as the Salesforce rule except the condition is @{global.presal_application_listapplicationlist} equals Workday and the Execute value is set to Workday Access Request.
  3. Fallback Rule: The Fallback Rule is used when none of the rules evaluate to True. This case is used when the user selects SAP from the Application List prompt. The Execute value here is Continue, which means the skill will continue processing through the Conversation Flow and Fulfillment. In the Application Access Request, a fulfillment message is shown to the user with the input.

...


  1. Image Added

In this example, the Set and Clear Attributes section was not used. This section is useful if you want to set Global attributes before branching to another skill or even setting a value local or global value for the existing skill.