Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Editing an existing flow

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

Image Added

The vertical ellipsis menu has the following options:

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.

Image Added

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.

Image Added

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

Image Added

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.

Image Added

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.

Info

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:

Image Added

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.

Info

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.

Image Added

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

Image Added

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.

Image Added
Code Block
(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:

Image Added

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.

Image Added

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.

    Image Added
  • Time. Enables a Time picker widget in the chatbot.

    Image Added

     

  • DateTime. Enables a combination of Date Picker and Time Picker in one widget.

    Image Added

     

    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

      Image Added

       

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

    Image Added
  • 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.

    Image Added

     

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

      Image Added
    • Multi Line. Select this if you want a multiple-line input text box in the chatbot.

      Image Added

       

      You can choose the number of lines for the input text box and the visible text for each row.

5 rows and 12 columns

Image Added

5 rows 24 columns

Image Added

5 rows 36 columns

Image Added

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.

Image Added

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.

Image Added

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,

Image Added

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

Image Added

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.

Image Added

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

Image Added

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.

Image Added

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.

Image Added

The Directives tab contains the following fields:

Image Added

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.

Image Added

The Directives tab contains the following fields:

Image Added

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.

Image Added

 

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.

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

Image Added


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

Code Block
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

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

BMI Calculation function

Code Block
var _ = global.get('lodash');
var answers = msg.orbita.session.flowInfo.answerArray;
var weight = _.result(_.find(answers, function(obj) {return obj.name === 'Weight';}), 'value');
var height = _.result(_.find(answers, function(obj) {return obj.name === 'Height';}), 'value');
var bmi = calcBMI(weight, height);
msg.payload.externalHook.data = bmi; 
return msg

function calcBMI(weight, height) {
  return parseInt((weight * 703) / (height * height));
} 

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)

Code Block
try {
    const _ = global.get('lodash');
        controlId = msg.payload.session.attributes.orbitaSession.flowInfo.controlId,
        controlName = msg.payload.session.attributes.orbitaSession.flowInfo.controlName,
        hookName = controlName.indexOf(":") > - 1 ? controlName.substr(0, controlName.indexOf(":")) : controlName,
        args = controlName.indexOf(":") > -1 ?
            [msg,
             ...controlName.substr(controlName.indexOf(":") + 1).split("|")
                .map(arg => arg.trim())
                .filter(arg => !!arg)
                .map(arg => arg === "null" ? null : arg)] :
            [msg];
    msg.payload.externalHook = {
        data: hookName
    }
    if (hookName) {
        const hook = global.get("hooks")[hookName];

        msg.hookResult = {
            hookFound: !!hook
        };
        
        
        if (hook) {
            hook.apply(null, args);
        } else {
            msg.hookResult.executionSuccess = false;
            msg.hookResult.error = `Could not find hook '${hookName}'`;
        
            node.warn(`Could not find hook '${hookName}'`);
        
            return msg;
        }
    }
    
} catch (error) {
    msg.hookResult.executionSuccess = false;
    msg.hookResult.error = error;
    
    node.warn(`Error executing hook`);
    node.error(error);
    
    return msg;
}

Evaluate

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

Info

You have access to the entire msg object, by selecting custom. You can use {{ mustache tags }} on Custom Input, and with Evaluate.

How to check for empty string in Flow studio

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.

Image Added

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

Image Added

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.

Image Added

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.

Image Added

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.

Image Added

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.

Image Added

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.

Image Added

Video Content

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

...

Supporting Documentation

...

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.

http://orbita.ai

Related Content