Change tracker ID when conversation is over

I have a bot that is hooked up to Twilio and MongoDB. Right now, when a user reaches the end of a conversation, the bot “resets” all slots. However, this is problematic for tracking a conversation, as I would prefer instead for the slots to not be reset, but rather the ID of the conversation (even if it is from the same user).

Are there examples of functions of managing state in the tracker store for:

  1. Users who are messaging days later
  2. Users who have completed a happy path (to keep the slot values the same, change the conversation ID)

For example, my MongoDB tracker store is recording all data from one Twilio user in the same ObjectID, where the same “sender_id” has had several conversations with the bot. There is only a single slots object that is refreshed when the conversation / form ends:

{
   "_id":{
      "$oid":"5e790eeced0b602dca1097ba"
   },
   "sender_id":"+XXXXXXXXXX",
   "active_form":{

   },
   "events":[],
   "followup_action":null,
   "latest_action_name":"action_listen",
   "latest_event_time":{
      "$numberDouble":"1587422391.9992151"
   },
   "latest_input_channel":"twilio",
   "latest_message":{},
   "paused":false,
   "slots":{slotVal: Null}
}

It would seem best to have the bot recognize a new ObjectID every time the bot recognizes the end of a conversation, even if the “sender_id” remains the same. How is this done?

Is there anyone who has found the solution to this type of problem in their bot?

Hello @argideritzalpea,

did you tried to execute some javascript cleaning the where chat component stores it on browser (i.e. local storage)?

I don’t have this need, but when I wan’t to get a new id during the tests, I clear manually the local storage from browser (in my case).

Cya!