Versions Compared

Key

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

This article contains information about how to build and test skills that use conditional branching based on user responses.

Process

After you define and configure skills, conversation parameters, and rules, you can execute the parent skill, followed by the response from Luma. Based on the response, one skill leads to the other via conditional branching.

Based on the given scenario in the Conditional Branching page, the following window displays the conversation details via conditional branching:

Image Modified

We have created a simple example to illustrate conditional branching. The purpose is to create a generic skill and move to a more specific skill based on the information provided by the user.

...

  1. Create a parent skill such as Request a computer.
  2. Create the second skill such as Type of OS.
  3. Create the third skill such as Mac request.
  4. Create the fourth skill such as Windows request.
  5. Associate an attribute such as Configuration Type to the parent skill (Request a computer). You can define an attribute using the Attributes page as per your requirement; whether you want to define a list type or text attribute.
  6. Add a Rule such as Configuration Type=OS and link the second skill (Type of OS) from the Execute skill list.
  7. Click Add.
  8. Click to close the Rules window.
  9. Click Save on the Skills page to save the skill.
  10. Now, in the second skill, associate attributes such as OS Type.
  11. Add rules to the attribute such as OS Type=Mac and OS Type=Windows.
    Image Modified
  12. Click Save on the Skills page to save the skill.
  13. The details specified on the third skill and fourth skill are as follows.
    Image Modified
    Image Modified
  14. Add attributes such as Memory size, Screen size and Description as shown above.
  15. In the Bot Testing window execute the parent skill followed by the response from Luma.
    Image Modified

    The process is complete.
Info

If you use the same attribute in different skills in conditional branching, the value specified for the first attribute will be captured and used for the subsequent attributes.

For example, the skill is ‘Request a computer’ and attribute is ‘Configuration type.’ The value for the attribute ‘Configuration type’ is ‘Operating system.’ Another skill in conditional branching is ‘Windows request,’ and the same attribute is specified with a different value such as ‘Linux.’ While executing the skill, when you enter ‘Configuration type’ as a part of your conversation, you will always get the response as ‘Operating system’ and not Linux.

...