Dialog Workflow
Last updated
Last updated
Dialog Workflow is a graph-based workflow editor which provides a WYSWYG experience to the developer while designing the workflow. It is a highly recommended approach when designing the intent automation as it provides a visual representation of the entire flow of execution.
Each workflow is identified by a unique name and a description. The name needs to be a unique string.
The workflow can be associated with an intent using the Map to intent button under the Action/Configuration.
This would display all the intents you have previously defined. Users can select an intent they would like to map to the current workflow. Once mapped, the details of the mapping would be shown including the Handler Type.
Intent cannot be mapped to more than one workflow.
Having mapped the intent to the newly created workflow, it is now time to define the actual workflow. Use the View/Edit Workflow button under the Action/Configuration column to open the Workflow Editor.
Note that the workflow editor will prohibit the user from defining the workflow if the Intent is not mapped. The Workflow Editor mandates the intent to be mapped before defining the workflow.
The Workflow Editor provides an easy WYSWYG editor for creating workflows with easy flow charts. The Editor comprises two key components.
Dialog Functions
Editor View
The Dialog Functions provides the available functions which can be executed by the Workflow Automation. This also includes an explicit Start and Exit function, which identifies the start and end of the workflow.
The key functions available are
START : Signals the start of the workflow.
EXIT : Signals the end of the workflow.
IF : Specifies an if condition
CALLAPI : _Makes calls to an Rest Endpoint
GET : Recieves the input from User
SPEAK : Provide a response to the User
SET : Set a slot's value, Eg SET validate = true ;
DO : Call a sub intent. The skill linked to that intent will be called.
SPEAK_4_EACH : If an API sets a parameter with value as List of strings, SPEAK_4_EACH can make the bot speak all the values in the list. For Example, SPEAK_4_EACH listOfShortListedCandidates ;
WAIT : WAITS for the given micro seconds before executing next command. For Example, WAIT 2000 ;
EXPECT : Expects a slot or a comma separated set of slots to be given by the user (there won't be a prompt utterance to ask for the slot in this case)
TAKE_PAYMENT : Takes payment and updates status to a slot
ESCALATE : Escalate the conversation to the supervisor
EMAIL : Send an email
SAVE2_SHEET : Save values to the spreadsheet. Spreadsheet is available in Reports Section
In addition to the Dialog Functions, the Editor also supports Connectors which describe the transition or relation between the actions. These include
STRAIGHT
NONE
ANY
USER_DONT_KNOW
PRESENT
VALUE
The Editor View displays the currently configured workflow. User needs to Drag/move the workflow Action from the DialogFunctions Ui to Editor View.