3.3.9 Flow Studio Controls
Flow studio controls are predefined logical blocks that allow you to design a meaningful conversation. This document briefly describes each control in detail.
- 1 Flow Studio Controls
- 1.1 Start/End
- 1.2 Single Input
- 1.2.1 Input Type
- 1.3 Options (Choose Many)
- 1.4 Options (Choose One)
- 1.5 Say
- 1.6 Rating
- 1.7 Yes/No
- 1.8 Custom
- 1.9 Evaluate
- 1.10 Link flow
- 1.11 Agent
- 1.12 Annotation
- 1.13 Adaptive Card
- 2 Options/buttons
- 2.1 Best Practices
Flow Studio Controls
Start/End
Start is the beginning control, where your process begins. Only one Start control can be on the canvas.
If multiple Start controls are used, the system selects any of the Start controls randomly to begin the flow.
End controls are the terminators of the flow, and you can have as many as you would like. The End control executes the flow manager node, in the Experience Designer, on the second pin.
For End control, the Directives tab contains the following fields:
Option | Description |
---|---|
Microphone | Enabled by default. Uncheck to disable it. This controls the microphone icon of the Web Chatbot. |
Keyboard | Enabled by default. Uncheck to disable it. This controls the Keyboard input section of the Web Chatbot. |
WaitTimeAnimation | Enabled by default. Uncheck to disable it. This gives the three dot animation while loading a response. This option is only for Web Chatbot. |
Wait Time | Time in milliseconds before which the next bubble appears. Wait time is applicable to voice devices and Web Chatbot. This setting is static wait time. For having dynamic wait time based on the chat text, you should assign it in the Bot Provider V2 node in the Experience Designer. Refer How do I delay delivering bubbles in Chatbot using waitTime? | Dynamic waitTime The Dynamic wait time setting in the Bot Provider V2 node > Bot out parser will take effect for the chatbot using the endpoint connected to the Bot Provider V2 node. |
Hierarchy of settings:
The Bot provider V2 node (Experience Designer) > Flow studio control directive > Chatbot settings (Project Side navigation menu in Experience Manager).
Single Input
Stores or processes unlisted values. For example, a user might be asked to record blood pressure. The user might say or type a number.
In the General tab, a new dropdown is added in the button tab.
If the user selects utterance, href, or onclick, the values will not be added to the auto-generated intent.
By default, the button type is set as ‘default’.
Menu Item | Description |
---|---|
Default | The values will be added to the autogenerated intent. |
Href | You can give any valid URL in the Value field. The URL will open in a new tab. Place the below code in the options field to open the link in the same tab. {"target": "_top"} Refer How to use button directive for more details. |
Utterance | The intent that corresponds to the utterance in the Value field will be triggered without considering the current state. |
OnClick | You can call any js function with this option. (function(self){
self.orbitaChatBot.dockCollapse()
})(window) In the chatbot, clicking on the button will minimize the dock view chatbot. |
Phrases are added to the Auto Generate Slots list (How do I create phrases for the voice assistant? ). Consider these phrases as utterances (not to be confused with Orbita Phrases in the Lists section) you can give when a single input question is asked.
If you have an Alexa-based skill, then you can use this to list all the possible utterances one could say to the single input question. If one of these listed utterances is given, the flow continues to the next control. (An Alexa alternative to the free text input)
The Directives tab contains the following fields:
Option | Description |
---|---|
Microphone | Enabled by default. Uncheck to disable it. |
Keyboard | Enabled by default. Uncheck to disable it. |
WaitTimeAnimation | Enabled by default. Uncheck to disable it. |
Wait Time | Time in milliseconds before which the next bubble appears. |
Input Type | With this option, you can restrict the way the chatbot user interacts with the chatbot.
|
Input Type
The Input Type dropdown contains the following options.
None. Displays the question without a predefined input type.
Date. Enables a date picker widget in the chatbot.
Time. Enables a Time picker widget in the chatbot.
DateTime. Enables a combination of Date Picker and Time Picker in one widget.
You can choose the Start Date, End Date, and Default date.
None. Choose none to select the current date.
# of days ago. Enter a number to pick a date from the past. (counts from the current date)
Static. You can pick a date from the widget.
In the chatbot, the Date time picker will be rendered as shown below
Number. Select this if you want the user input to be in Numbers (& symbols). If the user gives any other input, it will trigger a none intent.
Phone Number. Restricts the user input to a number (& symbols) with an input box.
Email. Validates the user input to be an email.
Textbox. Using this option, you can have the user respond with utterances that will bypass the NLP. This input type will only work in the Orbita Chatbot.
Hide Message Bubble. This option allows for accepting input utilizing a single input control with NO output rendered to prompt the user. This is present in the Single Input control. This is useful in scenarios where the expectation is an indicator is presented via another mechanism. For example when using a hook that rendered HTML5 directives or Adaptive Cards. In these scenarios, instructions for input are generally provided with the mechanism itself, making the additional bubble redundant.
In previous versions of the platform, when you had a hook & single input combination, both controls would be rendered, presenting an additional message bubble with every hook render.
Single Line. Select this if you want a single-line input text box in the chatbot.
Multi Line. Select this if you want a multiple-line input text box in the chatbot.
You can choose the number of lines for the input text box and the visible text for each row.
5 rows and 12 columns
5 rows 24 columns
5 rows 36 columns
Options (Choose Many)
It generates a check box for each button with the chat experience.
The General tab contains the multimodal content editor to frame the question for this control.
In the Choices tab, there is a dropdown with Default and Utterance types. If you select the Utterance type, the corresponding choice will be excluded from the auto-generated slots so that it can trigger an intent.
For example, consider the choices as in the screenshot below.
If the chatbot user selects Good when he is prompted with this question, the autogenerated slot will not get triggered. The intent (if any) that has an utterance as Good in it will be triggered.
The data field on the choices tab is for adding extra meta-information to the options. Typically it is used to do the statical calculations at the end of the flow like scoring or tagging the assessment.
You can find this at msg.payload.session.attributes.orbitaSession.flowInfo.answerArray[0].info.data
or msg.orbita.orbita.session.flowInfo.answerArray[0].info.data
after the option is selected by the chatbot user.
The data field can take numbers or strings (stringified JSON). It is just additional information you might want to add to the options.
The Directives tab contains the following fields,
Option | Description |
---|---|
Microphone | Enabled by default. Uncheck to disable it. |
Keyboard | Enabled by default. Uncheck to disable it. |
WaitTimeAnimation | Enabled by default. Uncheck to disable it. |
Wait Time | Time in milliseconds before which the next bubble appears. |
Checkboxes | By default, the multiple select card will be rendered. If you choose yes or no from the dropdown, the bot will say each option and expect a yes or no response from the user. |
For example, if the chatbot user chooses the 2nd and 3rd option for this question, the query text property will be msg.payload.queryResult.queryText : "10110"
. (Read the boolean value excluding the initial placeholder digit i.e 1). The subsequent numbers are a boolean representation of whether the option is checked or not. In this case, there are 4 options, and the 2nd and 3rd options are checked.
If None of the above options is checked, ‘none of the above’ will be considered as another choice and a boolean digit will be added at the end. Extending the above example, if the ‘none of the above’ is enabled in the Choices tab of the option (Choose many) control, and then “none of the above” option is selected by the chatbot user, the query text will property will be msg.payload.queryResult.queryText : "100001"
.
You can read the choices output from this control in Experience Designer using the below properties.msg.alexaRequest.data.session.attributes.renderedButtons.choices
msg.payload.queryResult.outputContexts[0].parameters.renderedButtons.choices
msg.payload.session.attributes.renderedButtons.choices
Options (Choose One)
It causes the bot to show all the options to the user. The user must pick one of the options provided.
The dropdown with Default and Utterance types. If you select the Utterance type, the corresponding choice will be excluded from the auto-generated slots so that it can trigger an intent.
For example, consider the choices as in the screenshot below.
If the chatbot user selects Good when he is prompted with this question, the autogenerated slot will not get triggered. The intent (if any) that has an utterance as Good in it will be triggered.
The data field on the choices tab is for adding extra meta-information to the options. Typically it is used to do the statical calculations at the end of the flow like scoring or tagging the assessment. You can find this data at msg.payload.session.attributes.orbitaSession.flowInfo.answerArray[0].info.data
after the option is selected by the chatbot user.
One Output pin- This option is available in the Choose One and Yes/No controls under the Choice tab. A new section to choose the number of output pins to display for the control is added. The new option, One Output pin will render only one output pin from the control in the Flow Studio canvas. This option lets the user connect the out pin of Choose One or Yes/No to the next control easily. This helps in places where the flow is the same regardless of the chosen option.
By default, One output pin per option will be selected which has been the default behaviour till now. This will give us output pins equal to the number of choices in the control.
Example
Bot: What taste do you prefer: Sweet, Sour, or bitter?
User: Sweet
The choices and values are added to the Auto Generate Slots list if the type is Default.
The Directives tab contains the below fields
Option | Description |
---|---|
Microphone | Enabled by default. Uncheck to disable it. |
Keyboard | Enabled by default. Uncheck to disable it. |
Include choice options in the voice output | Disabled by default. This option allows the voice assistants to read the options.
|
WaitTimeAnimation | Enabled by default. Uncheck to disable it. |
Wait Time | Time in milliseconds before which the next bubble appears. |
Say
Generates content without asking a question; all the other controls that generate content to a user is a question. You can aggregate a series of say controls before a question. For example, you could have a loop that gathers a person's schedule.
Example
Say1 > Expression1 > Say2 > Custom Control > Expression1 > Say3 > Question
Flow will aggregate: Say1 + Say2 + Say3 + Question
In Chat, each Say would be its own bubble when it responds to a question; that is, when it outputs to Alexa or Google.
Say control in the flow studio does not have the Screen tab in the Multi-Modal Content Editor because the Say control aggregates, until a question occurs or until the end control.
Rating
Captures a rating value from the user. You can create your own rating scale using the Rating control. It is recommended to use numbers in the Value field.
The Directives tab contains the following fields:
Option | Description |
---|---|
Microphone | Enabled by default. Uncheck to disable it. |
Keyboard | Enabled by default. Uncheck to disable it. |
WaitTimeAnimation | Enabled by default. Uncheck to disable it. |
Wait Time | Time in milliseconds before which the next bubble appears. |
Yes/No
Use the Yes/No control for any questions to which the users have to answer using Yes or No.
The Data tab contains the options Yes and No.
The Directives tab contains the following fields:
Option | Description |
---|---|
Microphone | Enabled by default. Uncheck to disable it. |
Keyboard | Enabled by default. Uncheck to disable it. |
WaitTimeAnimation | Enabled by default. Uncheck to disable it. |
Wait Time | Time in milliseconds before which the next bubble appears. |
Custom
This control allows Flow Studio users to invoke custom code defined in the Experience Designer.
Refer 3.3.9.2 Custom Control
Evaluate
This control is used for routing the flow based on the previous control options or calculations. Refer 3.3.9.1 Evaluate Control
Link flow
The link flow control connects two flows in the flow studio. It also gives you an option to jump to the exact control node in the target flow.
Option | Description |
---|---|
Name | You can give a name to the control. |
Jump to Flow | The flow names in the project are listed here. |
Select Control | All the control ids of the target flow are listed here |
Enable continuation of flow after completion | By default, this check box is unchecked. This help to go-back in the flows. |
Enable continuation of flow after completion
When the user enables the checkbox, we will add an out pin to the Link node. Now the user can connect the link node out to the next control. This way the user can jump back to the parent flow after completion of the child flow.
To observe using the OE, we have properties in the flowInfo
object called msg.orbita.session.flowInfo.parent
and msg.orbita.session.flowInfo.child
.
Code explanation
parent : [ //contains Parent flow information
{
flowId : '578fxxx', // parent flowId
nextControlId: // 'parent node next controlId'
}
];
Whenever the user jumps between the Parent and the child flows, the respective information is stored in the properties above This helps the go-back feature to work smoothly.
The nextControlId contains the control id that we need to jump back once the current flow is completed.
Agent
This control will enable the VUX designer to use any agent in the flow-studio flows. For now, only Knowledge Answers is available in the Select Agent dropdown.
Field | Description |
---|---|
Select Agent | You can select the agents you need from the dropdown. For now, only knowledge answers is available in the agent dropdown. |
Select Answers | You can select the kgraph from the current project list. |
Select Topics | Allow users to search and select a topic from the selected kgraph and they also provide mustache in the topic selection field. |
Select Relationship | Allow users to search and select Relationship from the selected kgraph and they also provide mustache in the relationship selection field. |
Select Article | Allows the user to select a specific multiscreen field from the kgraph schema for schemas other than the default. |
Success | This pin is triggered if a fact is found for the selected Topic and Relationship. |
No Response | This pin is triggered if the topic and relationship pair don't have a fact. |
Annotation
This control is used for labelling.
Adaptive Card
This simple control node allows you to select an adaptive card and render it directly through Flow Studio.
From the right-hand menu list, drag and drop the Adaptive Card control onto the Canvas.
Open the node and choose the designed Adaptive Card from the drop-down menu.
Options/buttons
You can add options/buttons to a question via the Buttons tab of the Single Input control, or the Choices tab of the Choose One and Choose Many controls.
General > Buttons tab
Choices tab
Value: The unique key that is captured in the background.
Text: The Display text of the button.
You can have different Value and Text for the same button. On the chatbot, the Text is displayed on the option/button and when he/she clicks on the Button, the Value is sent to the server.
For example, In the rating control, you can have different value and text.
Rating Control in the Flow studio
Rating buttons on the Chatbot
When the user clicks on the button “Good”, the value 1 is sent to the server, you can view that in the Intent debug in the Experience Designer.
In Rating, Choose one and Choose many controls, if you only populate the Value field and an empty Text field, then the Value will be displayed on the option/button.
In the Single Input control > General > Button tab, it is mandatory to fill the Value and Text fields.
Best Practices
Button Text should also be listed in the Synonyms, in case end-user types button text instead of clicking the button.
Related Articles