How to trigger an alert task without hitting a web service at a particular time along with keeping context of the conversation?


(Yoga Ramya Mendu) #1

Eg, user leaves the chat in between the journey and leaves the chat in between. In case, the user revisits the chatbot after a day or two then an alert task should trigger asking for the task which user left in the conversation earlier.

(Subrahmanyam Donepudi) #2

We will need to have more details on the channel you were referring to. For most channels, the dialog context will retain.

If the requirement here is to send a message to the user based on the timestamp of last message, its feasible by using the onMessage event at BotKit.

The timestamp of the last message should be available in the data object sent to the botkit (Accessible under the BotUserSession data) at the event on_user_message and you could possibly use it to send a message to user after a specific time. Botkit can send messages to the platform under a speculated time period but this can be increased using the function extendRequestID