Resuming a conversation and when it's considered expired

In this article, we will look at:

Resuming a conversation

When resuming a conversation with the same user id, these are the steps that occur to continue the conversation for the bot to send and receive messages to the user.

  1. In order to resume a conversation, the user needs to send the same user Id in the message sent to the WebSocket connection, like below:
    GET (WS://) /webbot/api/webchat/{botId}/
  2. The message is sent through the WebSocket with the same user id:

      "message": {

        "from": "human",

        "user_profile": {},

        "ref": null,

       "user_id": "webbot:2d6bdb10-b237-11ea-a038-abed322efde6", // same user id used in other conversations

        "timestamp": 1592576064,

        "attachments": [],

        "id": "1592576064324",

        "actions": [


            "type": "text",

            "text": ""




  3. With this same user id, the conversation is detected as an active conversation, and it resumes from the Module from which the last message was sent.

When a conversation is considered expired

A conversation is considered expired when the session expiry time has been exceeded. The session expiry time can be set in Bot Settings. Here, the conversation is changed from active to non-active.

Was this article helpful?

0 out of 0 found this helpful
Have more questions? Submit a request

Comments (0 comments)

Please sign in to leave a comment.