Build customized output with the Boolean Builder
Use the Boolean Builder to create a customized sequence of data type elements to build a Boolean expression value. For example, in a Switch action, you can use any combination of data, expressions, prompts, and text elements to build a message after the system evaluates one or more expression cases.
How to use the builder
The following common operations are available in Architect builders that support multiple data types:
- To build an expression value using a sequence of items of specific data types, click and configure the desired data types. Architect displays the added items as card elements within the sequence.
- To rearrange the sequence of cards, click and hold the card that you want to move up or down in the list. Alternatively, use the Tab key to move through the list of cards and select the card that you want to move. To move the card to the desired position within the list, select Alt or Option and use the up and down arrow keys.
- To delete a card, click the trash icon for the card that you want to delete. Alternatively, use the Tab key to move through the list of cards and select the card that you want to delete. Then, use the Delete key to delete the card.
How to build a sequence
This example demonstrates how a flow author can build functionality for both audio and text, and then return the appropriate response depending on the interaction type.
- In a bot flow action element that requires an output, for example a Switch action, click the button at the end of the Case box and select Boolean Builder.
Click the image to enlarge.Note: Currently, the behavior uses the Main Sequence, which means that the bot uses this sequence under all conditions, which includes the language currently set for the bot flow and the output mode. - Create an alternate sequence for a voice interaction:
- In the Boolean Builder dialog box, click Alternate sequence .
- Click the Language list and select the alternate language.
- Under Output Mode, select Voice.
- Click Add Alternate Sequence.
- In the Text field, enter the output you want the bot to say to the caller for a voice interaction. For example, “How can I help you today?”
- Create an alternate sequence for a chat:
- In the Boolean Builder dialog box, click Alternate sequence .
- Click the Language list and select the alternate language.
- Under Output Mode, select Text.
- Click Add Alternate Sequence.
- In the Text field, enter the output you want the bot to say to the recipient for a chat interaction. For example, “What would you like to do?”
- Alternatively, you can manually enter an expression for the output modes.
- In the Boolean Builder dialog box, click the Expression tab.
- Click the Large Expression Editor button.
- Click Continue.
- In the Edit expression dialog box, enter the custom expression using Boolean, Expression, DateTime, or String Parsing configuration.
- Click Save.