3.3.2 Editing Flows

Editing an existing flow

If a flow already exists, click the vertical ellipses menu corresponding to the flow name.

The vertical ellipsis menu has the following options:

Option

Description

Option

Description

Flow Details

You can edit the Title, Description, Enable/disable Auto Generate Slots, Add/remove Utterances, view the Flow creator, Created Date, Last Updated, the last user that modified the flow.

Delete

Delete the flow. This requires confirmation.

Flow Data

The flow data captures the answers given by the chatbot user to the flow studio questions.
If the chatbot user is logged in, the Flow Data is populated with the first name of the user.
If the chatbot user is not logged in, the Flow Data is populated with “Anonymous“.
You can choose to delete an entry by clicking on the Delete option from the verticle ellipses button.

You can export the entire data using the Export option from the hamburger button.

Import/export

The import/export dialog box has 2 tabs:

  • Export. Click copy to clipboard to copy the JSON code.

  • Import. Paste a JSON code in the space provided to import the flow.

Flow History

Changes done to the flow studio by a user will be saved in the Flow History option.

The Flow History window contains the below details on every action done on the Flow studio.

  1. Avatar/ Initials.

  2. Action - Update, Delete, or Restored.

  3. Username - of the user that did the action.

  4. Date - Created/Modified

  5. Menu icon

    • View - To view changes

    • Restore - To restore changes to an earlier point.

Copy Flow Studio ID

Click this option to copy the Flow Studio ID to the clipboard.

Controls

Use the following controls to create your flow.

 

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 with.

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

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.

An End control is just like a Say control except that, with a Say control, you can continue the flow.

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’.

Option

Description

Option

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

Utterance

The utterance value will be triggered without considering the state.

OnClick

You can call any js function with this option.
For example, choose OnClick from the dropdown and use the below code in the Value field to dock the chatbot.

(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.

The Directives tab contains the following fields:

Option

Description

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.

     

    • Hidden. Select this if you don't want to render an input text box in the chatbot.

    • 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 data at msg.payload.session.attributes.orbitaSession.flowInfo.answerArray[0].info.data after the option is selected by the chatbot user.

The Directives tab contains the following fields,

Option

Description

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".

In the chatbot,, the already chosen options will get deselected If the none of the above option is selected.

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.

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

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.

  • Say Number Before Option. Enable to let the voice assistant say the option number before the Option.

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

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

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. When execution reaches a Flow Studio Flow's Custom control, Orbita directs the control to the 3rd pin of the Flow Manager node in Experience Designer. (See the section below titled Experience Designer and Flow Manager Node for more information)

When you drag the Custom control to the Flow Studio canvas, you can see a name field and the control's ID. In Experience Designer, developers can write code that executes when the Custom control is reached.

 

In the Custom Control, note the Custom control Name. In this case “bmiCalculator”

By default, the “Hook-Data” function node is attached to the flow Manager as part of the base project

The “Settings / Hooks initialize” is needed if not already integrated into a global setting.

Note: If you don't have the Hook Data or the corresponding nodes,

  1. In the Experience Designer, create a new flow.

  2. Click on the hamburger menu on the top right corner and navigate to Import > Built-in > Orbita Flows-(BETA) > Flow Manager.

  3. Place the flow on the canvas and Deploy the flow

     


Settings/Hooks Initialize function ( may not be needed if already set in settings function)

const settings = global.get("settings") || {}; settings.emptyString = ''; global.set("settings", settings); const hooks = global.get("hooks"); global.set("hooks", hooks || {}); return msg;

bmiCalculator hook function

global.get("hooks").bmiCalculator = msg => { node.send(msg); };

BMI Calculation function

The BMI calculation, sets

msg.payload.externalHook.data with results of the bmi, with the return msg, the msg object is passed back to the flow manager. Although you can pass data back anywhere on the msg object, returning it to msg.payload.externalHook.data , will cause this data to be logged in the answers array as a control result.

Hook Data Function ( only for reference - should already be included in your project)

Evaluate

Acts as a switch command. You can create multiple pins based on the number of outputs you require.

The evaluate control can be selected by any previous control value. The best practice is to name each control; do not use the default name.

The pins refer to each of the switch cases respectively. The Default pin refers to the else case.

Custom input field

Customizes the input field to call any value from the msg object. You can create a condition with that value and set the appropriate pins to it.

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

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

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

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 labeling.

Video Content

https://cdn.orbita.cloud/assets/orbita/flowstudio/editingflows.mp4

Video Key Messages

  • Editing existing flows through the vertical ellipses menu.

  • From here, you can Edit Property to change the title, description, and auto generate slots. You can also return to the canvas to edit the controls.

  • This menu also allows you to delete, export, import and review the flow history.

Useful Links

http://orbita.ai

Related Content