Temp memory & end flow 11.8.4

#1

I have main flow, that transfer to subflow.
The subflow extract slots from intent and store them in temp memory then the show message and end the flow.
As per docmentation, the temp memory will be reset after end of the flow but i sent new event to the bot i found that temp and extracted slots still in event object.

2019-05-08T08:24:49.215Z bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] ending flow
08:25:07.280 Hooks Just received a postback event: {"type":"text","channel":"web","direction":"incoming","payload":{"type":"text","text":"what is the tasheel timing?"},"target":"s76rR73GYW-_IHAy4mYRT","botId":"tasheel-platinum-bot-en","createdOn":"2019-05-08T08:25:05.716Z","threadId":"12","id":"155730390571683780","preview":"what is the tasheel timing?","flags":{},"state":{"user":{"accountId":"701","first_name":"Abdelaziz","last_name":"Abdelghani","timezone":-4,"language":"en"},"context":{},"session":{"lastMessages":[{"eventId":"155730385093757340","incomingPreview":"today 3 pm","replyConfidence":1,"replySource":"dialogManager","replyDate":"2019-05-08T08:24:12.532Z","replyPreview":"#!builtin_text-8A6-VU"},{"eventId":"155730386751468900","incomingPreview":"timing","replyConfidence":1,"replySource":"dialogManager","replyDate":"2019-05-08T08:24:28.821Z","replyPreview":"#!builtin_text-XY3323"},{"eventId":"155730387699868400","replyDate":"2019-05-08T08:24:38.299Z","replySource":"qna __qna__sjbdpc59k5_what_is_tas_heel_platinum_center","incomingPreview":"what is tasheel?","replyConfidence":0.7533339858055115,"replyPreview":{"type":"text","markdown":true,"text":"Tas-Heel Platinum Center is the first government service center in the United Arab Emirates with a seven star rating; Our journey of excellence has been inspired by the world class system of service classification - which emanates from the UAE Government Excellence Program - Including a framework, axes, elements, tools and models, At Tas-Heel Platinum Center, we have committed ourselves to supporting local initiatives in community service, environmental service and initiatives aimed at empowering and improving developing capacities. We aspire to create an exceptional career experience not only to achieve short-term development objectives but also to leave a positive footprint and work on the development of working skills."}},{"eventId":"155730388260942800","incomingPreview":"timin","replyConfidence":1,"replySource":"dialogManager","replyDate":"2019-05-08T08:24:43.943Z","replyPreview":"#!builtin_text-XY3323"},{"eventId":"155730388779292930","incomingPreview":"timing","replyConfidence":1,"replySource":"dialogManager","replyDate":"2019-05-08T08:24:49.169Z","replyPreview":"#!builtin_text-XY3323"}],"extractedSlots":{"appointmentType":{"value":"appointment","timestamp":1557303835309},"notFound":0,"appointmentDate":{"value":"2019-05-09T00:00:00.000+00:00","timestamp":1557303843433},"appointmentTime":{"value":"2019-05-08T15:00:00.000+00:00","timestamp":1557303852389}},"nluContexts":[]},"temp":{"extracted":"true","intentAppointmentDate":"2019-05-08T15:00:00.000+00:00 ","intentAppointmentTime":"2019-05-08T15:00:00.000+00:00 ","appointmentDate":"08-05-2019","appointmentTime":"15:00","response":{"body":{"errorCode":"MaxNoOfCenterAppointmentExceeded","hasAlert":true,"message":"You already have a booking only one booking per day is allowed","success":false},"status":200},"valid":true}},"suggestions":[{"confidence":0.9689388275146484,"payloads":[{"type":"typing","value":true},{"type":"text","markdown":true,"text":"The Platinum Facilitation Center operates around the clock 24/7 to meet all the needs and times of the clients"}],"source":"qna","sourceDetails":"__qna__ym6wvq74pu_what_is_the_timings_of_tas_heel_platinium_center"},{"confidence":0.030374493449926376,"payloads":[{"type":"typing","value":true},{"type":"text","markdown":true,"text":"At Tas-Heel Platinum center, we welcome all competencies and give special importance to local competencies. We have also developed supportive policies aiming to develop and qualify the workforce at Tas-Heel Platinum Center. Please note, however, that meeting the minimum qualification required in the description card is mandatory."}],"source":"qna","sourceDetails":"__qna__e9zgx8enz6_do_i_need_a_degree_to_work_at_tas_heel_platinum"}],"nlu":{"entities":[],"language":"en","slots":{},"intent":{"name":"__qna__ym6wvq74pu_what_is_the_timings_of_tas_heel_platinium_center","confidence":0.9689388275146484,"context":"global"},"intents":[{"name":"__qna__ym6wvq74pu_what_is_the_timings_of_tas_heel_platinium_center","confidence":0.9689388275146484,"context":"global"},{"name":"__qna__e9zgx8enz6_do_i_need_a_degree_to_work_at_tas_heel_platinum","confidence":0.030374493449926376,"context":"global"},{"name":"book_appointment_intent","confidence":0.0006297691725194454,"context":"global"}],"errored":false,"includedContexts":["global"],"ms":1440}}

version : 11.8.4
Any suggestion plz ?

#2

Are you sure conversation ended? Can you send larger logs excerpt?

#3

@alex, Here is the log from starting till end of flow

09:54:30.377 Launcher ========================================
                                  Botpress Server            
                                   Version 11.8.4             
                                  OS linux ubuntu            
                      ========================================
09:54:31.606 Launcher Using 8 modules
                      ⦿ MODULES_ROOT/analytics
                      ⦿ MODULES_ROOT/basic-skills
                      ⦿ MODULES_ROOT/builtin
                      ⊝ MODULES_ROOT/channel-messenger (disabled)
                      ⊝ MODULES_ROOT/channel-telegram (disabled)
                      ⦿ MODULES_ROOT/channel-web
                      ⦿ MODULES_ROOT/extensions
                      ⦿ MODULES_ROOT/hitl
                      ⦿ MODULES_ROOT/nlu
                      ⦿ MODULES_ROOT/qna
09:54:33.374 Server Loaded 8 modules
09:54:33.402 CMS Loaded 7 content types
09:54:33.603 Server Started in 1995ms
09:54:33.603 Launcher Botpress is ready at http://localhost:3000/
09:54:40.746 Hooks Just received a postback event: {"type":"visit","channel":"web","direction":"incoming","payload":{"type":"visit","text":"User visit","timezone":-4,"language":"en"},"target":"s76rR73GYW-_IHAy4mYRT","botId":"tasheel-platinum-bot-en","createdOn":"2019-05-08T09:54:40.621Z","threadId":"12","id":"155730928062150000","preview":"User visit","flags":{},"state":{"user":{"accountId":"701","first_name":"Abdelaziz","last_name":"Abdelghani","timezone":-4,"language":"en"},"context":{},"session":{"lastMessages":[]},"temp":{}},"suggestions":[],"nlu":{"entities":[],"language":"n/a","slots":{},"intent":{"name":"none","confidence":1,"context":"global"},"intents":[],"errored":false,"includedContexts":["global"]}}
09:55:04.296 Hooks Just received a postback event: {"type":"visit","channel":"web","direction":"incoming","payload":{"type":"visit","text":"User visit","timezone":-4,"language":"en"},"target":"s76rR73GYW-_IHAy4mYRT","botId":"tasheel-platinum-bot-en","createdOn":"2019-05-08T09:55:04.176Z","threadId":"12","id":"155730930417646900","preview":"User visit","flags":{},"state":{"user":{"accountId":"701","first_name":"Abdelaziz","last_name":"Abdelghani","timezone":-4,"language":"en"},"context":{},"session":{"lastMessages":[]},"temp":{}},"suggestions":[],"nlu":{"entities":[],"language":"n/a","slots":{},"intent":{"name":"none","confidence":1,"context":"global"},"intents":[],"errored":false,"includedContexts":["global"]}}
09:55:04.709 Hooks Just received a postback event: {"type":"update_profile","channel":"web","direction":"incoming","payload":{"type":"update_profile","payload":{"type":"update_profile","channel":"web","payload":{"accountId":"701","firstName":"Abdelaziz","lastName":"Abdelghani"}}},"target":"s76rR73GYW-_IHAy4mYRT","botId":"tasheel-platinum-bot-en","createdOn":"2019-05-08T09:55:04.642Z","threadId":"12","id":"155730930464226700","flags":{},"state":{"user":{"accountId":"701","first_name":"Abdelaziz","last_name":"Abdelghani","timezone":-4,"language":"en"},"context":{},"session":{"lastMessages":[]},"temp":{}},"suggestions":[],"nlu":{"entities":[],"language":"n/a","slots":{},"intent":{"name":"none","confidence":1,"context":"global"},"intents":[],"errored":false,"includedContexts":["global"]}}
09:55:04.858 Hooks Just received a postback event: {"type":"proactive-trigger","channel":"web","direction":"incoming","payload":{"type":"proactive-trigger","payload":{"type":"proactive-trigger","channel":"web","payload":{"text":"Welcome Back Abdelaziz. Nice to see you, How can i help you today?"}}},"target":"s76rR73GYW-_IHAy4mYRT","botId":"tasheel-platinum-bot-en","createdOn":"2019-05-08T09:55:04.649Z","threadId":"12","id":"155730930464919870","flags":{},"state":{"user":{"accountId":"701","first_name":"Abdelaziz","last_name":"Abdelghani"},"context":{},"session":{"lastMessages":[],"extractedSlots":{}},"temp":{}},"suggestions":[],"nlu":{"entities":[],"language":"n/a","slots":{},"intent":{"name":"none","confidence":1,"context":"global"},"intents":[],"errored":false,"includedContexts":["global"]}}
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] init new context { currentNode: 'entry', currentFlow: 'main.flow.json' } +0ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] eval transition "always" to [no_match_end_flow.flow.json] +0ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] transit (main.flow.json) [entry] >> (no_match_end_flow.flow.json) [entry] +7ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] render element "#!builtin_text-XY3323" +1ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] eval transition "always" to [END] +4ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] ending flow +5ms
09:55:18.095 Mod[nlu] Restoring models 'c8f9cc8b0e4bbc7349c9a3821c6298f2' from storage
09:55:18.329 Mod[nlu] Done restoring models 'c8f9cc8b0e4bbc7349c9a3821c6298f2' from storage
09:55:19.756 Hooks Just received a postback event: {"type":"text","channel":"web","direction":"incoming","payload":{"type":"text","text":"book appointment"},"target":"s76rR73GYW-_IHAy4mYRT","botId":"tasheel-platinum-bot-en","createdOn":"2019-05-08T09:55:17.979Z","threadId":"12","id":"155730931797970300","preview":"book appointment","flags":{},"state":{"user":{"accountId":"701","first_name":"Abdelaziz","last_name":"Abdelghani"},"context":{},"session":{"lastMessages":[{"eventId":"155730930464919870","replyConfidence":1,"replySource":"dialogManager","replyDate":"2019-05-08T09:55:04.895Z","replyPreview":"#!builtin_text-XY3323"}],"extractedSlots":{}},"temp":{}},"suggestions":[],"nlu":{"entities":[{"name":"appointmentType","type":"list","meta":{"confidence":1,"provider":"native","source":"appointment","start":5,"end":16,"raw":{}},"data":{"extras":{"occurence":"appointment"},"value":"appointment","unit":"string"}}],"language":"en","slots":{"appointmentType":{"name":"appointmentType","value":"appointment","entity":{"name":"appointmentType","type":"list","meta":{"confidence":1,"provider":"native","source":"appointment","start":5,"end":16,"raw":{}},"data":{"extras":{"occurence":"appointment"},"value":"appointment","unit":"string"}}}},"intent":{"name":"book_appointment_intent","confidence":0.9999515414237976,"context":"global"},"intents":[{"name":"book_appointment_intent","confidence":0.9999515414237976,"context":"global"}],"errored":false,"includedContexts":["global"],"ms":1418}}
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] init new context { currentNode: 'entry', currentFlow: 'main.flow.json' } +15s
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] eval transition "event.nlu.intent.name === 'book_appointment_intent' && event.nlu.slots.appointmentType" to [book_appointment_flow.flow.json] +15s
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] transit (main.flow.json) [entry] >> (book_appointment_flow.flow.json) [entry] +4ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] execute action "builtin/resetContext" +1ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] execute action "builtin/appendContext" +25ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] eval transition "always" to [prompt_date_node] +22ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] transit (book_appointment_flow.flow.json) [entry] -> [prompt_date_node] +47ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] execute action "basic-skills/slot_update_contexts" +1ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] eval transition "always" to [slot-extract] +28ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] transit (skills/Slot-3a211f.flow.json) [check-if-extracted] -> [slot-extract] +29ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] render element "#!builtin_text-rdMeGh" +1ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] waiting until next event +10ms
09:55:27.431 Hooks Just received a postback event: {"type":"text","channel":"web","direction":"incoming","payload":{"type":"text","text":"tomorrow"},"target":"s76rR73GYW-_IHAy4mYRT","botId":"tasheel-platinum-bot-en","createdOn":"2019-05-08T09:55:26.116Z","threadId":"12","id":"155730932611642600","preview":"tomorrow","flags":{},"state":{"user":{"accountId":"701","first_name":"Abdelaziz","last_name":"Abdelghani"},"context":{"currentFlow":"skills/Slot-3a211f.flow.json","currentNode":"slot-extract","previousFlow":"book_appointment_flow.flow.json","previousNode":"prompt_date_node","jumpPoints":[{"flow":"main.flow.json","node":"entry"},{"flow":"book_appointment_flow.flow.json","node":"prompt_date_node"}],"queue":{"instructions":[{"type":"on-receive","fn":"basic-skills/slot_fill {\"slotName\":\"appointmentDate\",\"entity\":\"undefined\"}"},{"type":"transition","fn":"session.extractedSlots.appointmentDate && (temp.valid === undefined || temp.valid == \"true\")","node":"extracted"},{"type":"transition","fn":"true","node":"not-extracted"}]}},"session":{"lastMessages":[{"eventId":"155730930464919870","replyConfidence":1,"replySource":"dialogManager","replyDate":"2019-05-08T09:55:04.895Z","replyPreview":"#!builtin_text-XY3323"},{"eventId":"155730931797970300","incomingPreview":"book appointment","replyConfidence":1,"replySource":"dialogManager","replyDate":"2019-05-08T09:55:19.847Z","replyPreview":"#!builtin_text-rdMeGh"}],"extractedSlots":{"appointmentType":{"value":"appointment","timestamp":1557309319762},"notFound":0},"nluContexts":[{"context":"bookAppointment","ttl":1000}]},"temp":{}},"suggestions":[],"nlu":{"entities":[{"name":"time","type":"system","meta":{"confidence":1,"provider":"native","source":"tomorrow","start":0,"end":8,"raw":{"body":"tomorrow","start":0,"value":{"values":[{"value":"2019-05-09T00:00:00.000+00:00","grain":"day","type":"value"}],"value":"2019-05-09T00:00:00.000+00:00","grain":"day","type":"value"},"end":8,"dim":"time"}},"data":{"value":"2019-05-09T00:00:00.000+00:00","unit":"day","extras":[{"value":"2019-05-09T00:00:00.000+00:00","grain":"day","type":"value"}]}}],"language":"en","slots":{"appointmentDate":{"name":"appointmentDate","value":"2019-05-09T00:00:00.000+00:00","entity":{"name":"time","type":"system","meta":{"confidence":1,"provider":"native","source":"tomorrow","start":0,"end":8,"raw":{"body":"tomorrow","start":0,"value":{"values":[{"value":"2019-05-09T00:00:00.000+00:00","grain":"day","type":"value"}],"value":"2019-05-09T00:00:00.000+00:00","grain":"day","type":"value"},"end":8,"dim":"time"}},"data":{"value":"2019-05-09T00:00:00.000+00:00","unit":"day","extras":[{"value":"2019-05-09T00:00:00.000+00:00","grain":"day","type":"value"}]}}}},"intent":{"name":"book_appointment_date_intent","confidence":1,"context":"bookAppointment"},"intents":[{"name":"book_appointment_date_intent","confidence":1,"context":"bookAppointment"}],"errored":false,"includedContexts":["bookAppointment"],"ms":1173}}
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] execute action "basic-skills/slot_fill" +8s
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] eval transition "session.extractedSlots.appointmentDate && (temp.valid === undefined || temp.valid == "true")" to [extracted] +5ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] transit (skills/Slot-3a211f.flow.json) [slot-extract] -> [extracted] +8s
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] execute action "builtin/setVariable" +1ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] eval transition "always" to [#] +3ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] transit (book_appointment_flow.flow.json) [book_appointment_flow.flow.json] << (book_appointment_flow.flow.json) [prompt_date_node] +5ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] eval transition "temp.extracted == "true"" to [set_date_node] +2ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] transit (book_appointment_flow.flow.json) [prompt_date_node] -> [set_date_node] +1ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] execute action "builtin/setVariable" +2ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] eval transition "always" to [prompt_time_node] +5ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] transit (book_appointment_flow.flow.json) [set_date_node] -> [prompt_time_node] +8ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] execute action "basic-skills/slot_update_contexts" +1ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] eval transition "always" to [slot-extract] +21ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] transit (skills/Slot-f16e8b.flow.json) [check-if-extracted] -> [slot-extract] +22ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] render element "#!builtin_text-npHX8R" +1ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] waiting until next event +7ms
09:55:33.311 Hooks Just received a postback event: {"type":"text","channel":"web","direction":"incoming","payload":{"type":"text","text":"9 am"},"target":"s76rR73GYW-_IHAy4mYRT","botId":"tasheel-platinum-bot-en","createdOn":"2019-05-08T09:55:31.867Z","threadId":"12","id":"155730933186706620","preview":"9 am","flags":{},"state":{"user":{"accountId":"701","first_name":"Abdelaziz","last_name":"Abdelghani"},"context":{"currentFlow":"skills/Slot-f16e8b.flow.json","currentNode":"slot-extract","previousFlow":"book_appointment_flow.flow.json","previousNode":"prompt_time_node","jumpPoints":[{"flow":"main.flow.json","node":"entry"},{"flow":"book_appointment_flow.flow.json","node":"prompt_time_node"}],"queue":{"instructions":[{"type":"on-receive","fn":"basic-skills/slot_fill {\"slotName\":\"appointmentTime\",\"entity\":\"undefined\"}"},{"type":"transition","fn":"session.extractedSlots.appointmentTime && (temp.valid === undefined || temp.valid == \"true\")","node":"extracted"},{"type":"transition","fn":"true","node":"not-extracted"}]}},"session":{"lastMessages":[{"eventId":"155730930464919870","replyConfidence":1,"replySource":"dialogManager","replyDate":"2019-05-08T09:55:04.895Z","replyPreview":"#!builtin_text-XY3323"},{"eventId":"155730931797970300","incomingPreview":"book appointment","replyConfidence":1,"replySource":"dialogManager","replyDate":"2019-05-08T09:55:19.847Z","replyPreview":"#!builtin_text-rdMeGh"},{"eventId":"155730932611642600","incomingPreview":"tomorrow","replyConfidence":1,"replySource":"dialogManager","replyDate":"2019-05-08T09:55:27.483Z","replyPreview":"#!builtin_text-npHX8R"}],"extractedSlots":{"appointmentType":{"value":"appointment","timestamp":1557309319762},"notFound":0,"appointmentDate":{"value":"2019-05-09T00:00:00.000+00:00","timestamp":1557309327438}},"nluContexts":[{"context":"bookAppointment","ttl":1000}]},"temp":{"extracted":"true","intentAppointmentDate":"2019-05-09T00:00:00.000+00:00 "}},"suggestions":[],"nlu":{"entities":[{"name":"time","type":"system","meta":{"confidence":1,"provider":"native","source":"9 am","start":0,"end":4,"raw":{"body":"9 am","start":0,"value":{"values":[{"value":"2019-05-08T09:00:00.000+00:00","grain":"hour","type":"value"},{"value":"2019-05-09T09:00:00.000+00:00","grain":"hour","type":"value"},{"value":"2019-05-10T09:00:00.000+00:00","grain":"hour","type":"value"}],"value":"2019-05-08T09:00:00.000+00:00","grain":"hour","type":"value"},"end":4,"dim":"time"}},"data":{"value":"2019-05-08T09:00:00.000+00:00","unit":"hour","extras":[{"value":"2019-05-08T09:00:00.000+00:00","grain":"hour","type":"value"},{"value":"2019-05-09T09:00:00.000+00:00","grain":"hour","type":"value"},{"value":"2019-05-10T09:00:00.000+00:00","grain":"hour","type":"value"}]}}],"language":"n/a","slots":{"appointmentTime":{"name":"appointmentTime","value":"2019-05-08T09:00:00.000+00:00","entity":{"name":"time","type":"system","meta":{"confidence":1,"provider":"native","source":"9 am","start":0,"end":4,"raw":{"body":"9 am","start":0,"value":{"values":[{"value":"2019-05-08T09:00:00.000+00:00","grain":"hour","type":"value"},{"value":"2019-05-09T09:00:00.000+00:00","grain":"hour","type":"value"},{"value":"2019-05-10T09:00:00.000+00:00","grain":"hour","type":"value"}],"value":"2019-05-08T09:00:00.000+00:00","grain":"hour","type":"value"},"end":4,"dim":"time"}},"data":{"value":"2019-05-08T09:00:00.000+00:00","unit":"hour","extras":[{"value":"2019-05-08T09:00:00.000+00:00","grain":"hour","type":"value"},{"value":"2019-05-09T09:00:00.000+00:00","grain":"hour","type":"value"},{"value":"2019-05-10T09:00:00.000+00:00","grain":"hour","type":"value"}]}},"source":"undefined am"}},"intent":{"name":"book_appointment_date_intent","confidence":0.932744562625885,"context":"bookAppointment"},"intents":[{"name":"book_appointment_date_intent","confidence":0.932744562625885,"context":"bookAppointment"},{"name":"none","confidence":0.06727545708417892,"context":"bookAppointment"}],"errored":false,"includedContexts":["bookAppointment"],"ms":1327}}
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] execute action "basic-skills/slot_fill" +6s
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] eval transition "session.extractedSlots.appointmentTime && (temp.valid === undefined || temp.valid == "true")" to [extracted] +4ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] transit (skills/Slot-f16e8b.flow.json) [slot-extract] -> [extracted] +6s
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] execute action "builtin/setVariable" +1ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] eval transition "always" to [#] +4ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] transit (book_appointment_flow.flow.json) [book_appointment_flow.flow.json] << (book_appointment_flow.flow.json) [prompt_time_node] +5ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] eval transition "temp.extracted == "true"" to [set_time_node] +2ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] transit (book_appointment_flow.flow.json) [prompt_time_node] -> [set_time_node] +2ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] execute action "builtin/setVariable" +1ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] eval transition "always" to [acknowldge-node] +4ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] transit (book_appointment_flow.flow.json) [set_time_node] -> [acknowldge-node] +6ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] execute action "populate_appointment_model" +1ms
09:55:33.351 Actions ***********************: Thu May 09 2019 00:00:00 GMT+0000
09:55:33.352 Actions ***********************: Wed May 08 2019 09:00:00 GMT+0000
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] render element "#!builtin_text-d-3n-5" +13ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] eval transition "always" to [book_appointment_node] +8ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] transit (book_appointment_flow.flow.json) [acknowldge-node] -> [book_appointment_node] +21ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] execute action "basic-skills/call_api" +1ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] eval transition "always" to [#] +114ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] transit (book_appointment_flow.flow.json) [book_appointment_flow.flow.json] << (book_appointment_flow.flow.json) [book_appointment_node] +116ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] eval transition "temp.valid" to [book_response_node] +2ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] transit (book_appointment_flow.flow.json) [book_appointment_node] -> [book_response_node] +1ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] execute action "builtin/resetContext" +1ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] render element "#!builtin_text-8A6-VU" +2ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] eval transition "always" to [END] +4ms
  bp:dialog (tasheel-platinum-bot-en) [s76rR73GYW-_IHAy4mYRT] ending flow +7ms
09:55:49.294 Hooks Just received a postback event: {"type":"text","channel":"web","direction":"incoming","payload":{"type":"text","text":"where is tasheel?"},"target":"s76rR73GYW-_IHAy4mYRT","botId":"tasheel-platinum-bot-en","createdOn":"2019-05-08T09:55:47.776Z","threadId":"12","id":"155730934777645920","preview":"where is tasheel?","flags":{},"state":{"user":{"accountId":"701","first_name":"Abdelaziz","last_name":"Abdelghani"},"context":{},"session":{"lastMessages":[{"eventId":"155730930464919870","replyConfidence":1,"replySource":"dialogManager","replyDate":"2019-05-08T09:55:04.895Z","replyPreview":"#!builtin_text-XY3323"},{"eventId":"155730931797970300","incomingPreview":"book appointment","replyConfidence":1,"replySource":"dialogManager","replyDate":"2019-05-08T09:55:19.847Z","replyPreview":"#!builtin_text-rdMeGh"},{"eventId":"155730932611642600","incomingPreview":"tomorrow","replyConfidence":1,"replySource":"dialogManager","replyDate":"2019-05-08T09:55:27.483Z","replyPreview":"#!builtin_text-npHX8R"},{"eventId":"155730933186706620","incomingPreview":"9 am","replyConfidence":1,"replySource":"dialogManager","replyDate":"2019-05-08T09:55:33.353Z","replyPreview":"#!builtin_text-d-3n-5"},{"eventId":"155730933186706620","incomingPreview":"9 am","replyConfidence":1,"replySource":"dialogManager","replyDate":"2019-05-08T09:55:33.481Z","replyPreview":"#!builtin_text-8A6-VU"}],"extractedSlots":{"appointmentType":{"value":"appointment","timestamp":1557309319762},"notFound":0,"appointmentDate":{"value":"2019-05-09T00:00:00.000+00:00","timestamp":1557309327438},"appointmentTime":{"value":"2019-05-08T09:00:00.000+00:00","timestamp":1557309333320}},"nluContexts":[]},"temp":{"extracted":"true","intentAppointmentDate":"2019-05-09T00:00:00.000+00:00 ","intentAppointmentTime":"2019-05-08T09:00:00.000+00:00 ","appointmentDate":"09-05-2019","appointmentTime":"09:00","response":{"body":{"errorCode":"MaxNoOfCenterAppointmentExceeded","hasAlert":true,"message":"You already have a booking only one booking per day is allowed","success":false},"status":200},"valid":true}},"suggestions":[{"confidence":0.9557329416275024,"payloads":[{"type":"typing","value":true},{"type":"text","markdown":true,"text":"Tas-Heel Platinum Center is located on the state of Dubai, Sheikh Zayed Road. You can also find out the location through MAKANY application or go to the website to clarify the map of access to the center."}],"source":"qna","sourceDetails":"__qna__4dgm0eruqj_where_is_the_location_for_tas_heel_platinum_center"},{"confidence":0.036827415227890015,"payloads":[{"type":"typing","value":true},{"type":"text","markdown":true,"text":"Tas-Heel Platinum Center is the first government service center in the United Arab Emirates with a seven star rating; Our journey of excellence has been inspired by the world class system of service classification - which emanates from the UAE Government Excellence Program - Including a framework, axes, elements, tools and models, At Tas-Heel Platinum Center, we have committed ourselves to supporting local initiatives in community service, environmental service and initiatives aimed at empowering and improving developing capacities. We aspire to create an exceptional career experience not only to achieve short-term development objectives but also to leave a positive footprint and work on the development of working skills."}],"source":"qna","sourceDetails":"__qna__sjbdpc59k5_what_is_tas_heel_platinum_center"},{"confidence":0.006043354049324989,"payloads":[{"type":"typing","value":true},{"type":"text","markdown":true,"text":"The Platinum Facilitation Center operates around the clock 24/7 to meet all the needs and times of the clients"}],"source":"qna","sourceDetails":"__qna__ym6wvq74pu_what_is_the_timings_of_tas_heel_platinium_center"}],"nlu":{"entities":[],"language":"en","slots":{},"intent":{"name":"__qna__4dgm0eruqj_where_is_the_location_for_tas_heel_platinum_center","confidence":0.9557329416275024,"context":"global"},"intents":[{"name":"__qna__4dgm0eruqj_where_is_the_location_for_tas_heel_platinum_center","confidence":0.9557329416275024,"context":"global"},{"name":"__qna__sjbdpc59k5_what_is_tas_heel_platinum_center","confidence":0.036827415227890015,"context":"global"},{"name":"__qna__ym6wvq74pu_what_is_the_timings_of_tas_heel_platinium_center","confidence":0.006043354049324989,"context":"global"},{"name":"none","confidence":0.0010539815993979573,"context":"global"},{"name":"help_intent","confidence":0.00023761697229929268,"context":"global"}],"errored":false,"includedContexts":["global"],"ms":1400}}
^Cadministrator@ptasheelchatvm:~/botpress$ 
#4

@alex any help please.

#5

extractedSlots are stored in session which does not reset after a conversation ends. If you need the slot to clear, you could remap session.extractedSlots.[something] to a temp variable and use the temp variable in your flow instead.

#6

@rndlaine, thank you very much for your reply.
My case is, i have a flow for booking appointment and the bot asking for date slot and time slot then call webservice to do the booking then end the flow.
But my problem is for second time when i start the flow again, it shows that slots already extracted and got the end of the flow direct.
How can i rest the flow after end?
Thanks

#7

Ok we’re going to make a resetSlot action available in 11.9. So you’ll be able to clear your slot/s at the end of your flow. In the meantime, you can create an action with this content:

/**
 * Reset the slot
 * @param slotName The name of the slot
 */
const resetSlot = async slotName => {
  event.state.session.extractedSlots[slotName] = undefined
}

return resetSlot(args.slotName)

And call it at the end of your flow. It should do the trick!

#8

@rndlaine
Thanks for your support,
My issue resolved by creating new action to clear all extracted slots and temp objects.


"use strict";


const resetFlow = () => {
  event.state.session.extractedSlots = {};
  event.state.temp = {};
};

return resetFlow();
#9

Great! Glad to hear :slight_smile: