What is the purpose of session.endConversation()

Viewed 657

I am developing a bot in node.js using the Microsoft Bot Framework. Once my user has completed their action with my bot; I am calling session.endConversation(). However, I am not sure really what this is doing. My assumption when calling this code would be that it would clear out session data; so if the user interacts with the bot again; they will essentially be starting over.

However, when I call endConversation(), the user data is still there:

    session.endConversation("Thank you for your business!");
    console.log("User Data:");
    console.log(session.userData);

enter image description here

The documentation just says, "ends the conversation" but doesn't describe what in fact that means.

I guess my question is; what is this function doing and when you are finished with a conversation, what should the approach be to handle the users conversation data?

1 Answers
Related