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:
- Users who are messaging days later
- 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?