Redirecting Dialog Flow to a particular task


(prathama timbadia) #1

is there anyway we can redirect dialog flow to a particular task?


From Dailog Tasks to i want to call one action Task
(Pragya Sharma) #2

When building a dialog, you can use dialog nodes and conditional transitions to trigger another dialog task.

Also, when performing a task, if the bot user mentions another task the platform will put the current task on hold and starts executing another task.


(Subrahmanyam Donepudi) #3

Yes, we could redirect dialog flow to a particular task by invoking an intent or a subintent in the current dialog. Further, you could even pass the data present in the dialog context of current dialog into the invoked intent using pre-assignments

The data pertaining to invoked intents and subintents will be available inside the mappedIntents of the context object.

Please ref :

We also have the leverage to use hold and resume functionality using which user could access another task while in the mid of execution of one dialog. The quantity to hold the number of tasks and also the behavior of resume can be defined at the bot settings.


(prathama timbadia) #4

Thanks for your response @pragya.sharma @Subrahmanyam.

My concern is can I connect a dialog task to alert task,action task or information task?


(Madhu) #5

@prathamat84, no you will not be able to invoke the action or information tasks.
Actually, when you are using dialog tasks, you really do not need to use action or information task. All the functionality of action and information task can be built using the dialog task.

On the alert task, you can invoke the alert setup by using the service node. (Alert subscription service)


(Subrahmanyam Donepudi) #6

@prathamat84 Yes. Dialog to Alert means that developer would like to set up alert instance in the user account at the bot when a dialog is triggered. This can be achieved using Alert Subscription type at service node.

Please refer to “Defining Alert Subscription Service” at the below link for more details:

Developer could even define flows and make transitions like Alert -> Dialog, Action -> Action, Alert -> Action by defining flows at bot.

Please refer to the below link for more details:

Adding more, if your requirement is to invoke a task (Action, Alert, Dialog or FAQ) at the end of the dialog, it can be achieved using botkit. Please follow the below steps:

  • Enable bot kit at your bot at Apps and agents.

  • Turn ON the event onEvent at bot kit.

  • Download botkit, configure the config.json, app.js and the js file in which have you have the logic to send bot message onevent with event type as endDialog in the kit

  • Configure the callback URL at bot kit on builder.

  • In the botkit use the function on_event : function (requestId, data, callback) and set the condition to sendBotMessage the name of the task at eventType as ‘endDialog’

Please refer to the file @https://github.com/Koredotcom/BotKit/blob/master/SimpleConversationalBot.js for more details