3.3.5 Flow Manager Node

Flow Manager Node

You must set up the Experience Designer to invoke Flow Studio Flows using the Flow Manager node. This is a one-time setup.

The following image contains a flow in Experience Designer, which uses the flow from Flow Studio. The Flow Manager node calls the flow in the previous image from the Flow Studio. A Hook Data node to call on Hook event functions.

Repeat

AMAZON.RepeatIntent

Will cause a question to be repeated. Note if you want to interrupt a question being asked to the Flow Manager, for example asking a question that Orbita Answer can answer. Then passing the question in a session back within a session. Set the msg.payload.request.intent.name = 'AMAZON.RepeatIntent' and the question that was being asked will be repeated.

Answers Flow Function node:

msg.orbita.session.injectedMessagechatText = msg.payload.orbita.answers.articleContent.faqInfo.chat.chatText + '<hr />'; msg.orbita.session.injectedMessageVoice = msg.payload.orbita.answers.articleContent.faqInfo.voice.sayText + '<hr />'; msg.payload.request.intent.name = 'AMAZON.RepeatIntent';

Flow Manager Say Node

{{msg.orbita.session.injectedMessageVoice}} {{msg.payload.multiagent.voice.sayText}}

Previous

AMAZON.PreviousIntent

This will cause the Flow Manager to go back to the previous question.
A chatbot user can go to the previously answered question by saying utterances such as go back, skip back, and so on which will invoke the Inbuilt Previous Intent. Refer,

Getting started

To get started, download this JSON file, copy it to your clipboard, then import it into your project's Experience Designer using the hamburger menu in the top right corner.

To configure Experience Designer to handle your Flow Studio Flow:

  1. Copy the Flow ID from Flow Studio.

  2. Paste the Flow Id in the Edit Flow Manager node settings tab.

    Best practice: Use {{msg.payload.flowId}} (that is, a mustache tag), so you can dynamically load the flow. In most cases, you have only one flow manager in a project, but there is no restriction on the number of flow managers.

  3. Enable No Save to not save data to the Orbita database. Disable No Save to send the data to the Orbita database. By default, Orbita saves the flow result data.
    To access the data that is saved to Orbita,

    1. Go to the flow Studio list.

    2. Click on the vertical ellipses button against the preferred flow studio.

    3. Click Flow Data. The saved flow result data for this Flow Studio appears.

  4. In the Options(Single) field, specify the template to read out the choices to the user.

Programmatically jumping to anywhere in the flow

When you do not want to start at the beginning, you can jump to any control in the flow. Or you can jump to an external event that captured more information.

Function node

msg.orbita.session.flowInfo = {"flowId":"5cbabd63d4561b6100a10ec6", "controlId":"602191193647793721", "state":"IN_PROGRESS", "messageArray":[],"answerArray":[], "checkboxPntr":0,"multiOptionMode":[], "items":{}}; return msg;
  • flowId. The ID you find when you open a flow in the Flow Studio.

  • controlId. The ID you find in any control in a flow, the one you want the flow to start with, as it receives input from the intent

See the following video.

The same approach could be used to restore a previous session or return to the original calling flow.

Sample Flow

The following image shows a sample Flow studio flow.

 

File

Modified

 

File

Modified

 

File flow_manager_setup.json

Nov 11, 2019 by Rajkiran Alla

Useful Links

http://orbita.ai

Related Content