Need to set a slot after action_restart

I’m building a chatbot for some restaurants. Each restaurant has its own area, that are assigned by their ZIP.

For example: Restaurant A has ZIP 20000 and restaurant B has ZIP 20001, so when I tell the bot I’m from the ZIP 20001, it automatically assigns the next order to restaurant B.

After a conversation is finished, I do action_restart, in order to clean the conversation, so it won’t fail the next time the user tries to order. The problem is that I would like to skip the ZIP question if it was previously asked in the chat session, because it’s a little annoying that every time I type something, it asks the ZIP for everything.

I’ve tried overriding the action_restart action with a custom action that returns the event Restarted() and SlotSet afterwards, but the Restarted() event also deletes the SlotSet that comes after it’s finished. Also tried with AllSlotsReset(), but this isn’t even doing anything, so it doesn’t work.

How could I make the bot keep the ZIP until the session it’s finished, so it does set it automatically, skipping next tries of asking the ZIP?

I’m not sure what you’re referring to here without more information but I would not use action_restart. Instead clear the slots. If you’re using a form, it’s typical to clear appropriate slots on the form submit.

I managed to fix it. I was trying to do reset_slots custom action that overrides the default action, but wasn’t working, so I change the custom action’s name to my_reset_slots and that made it work.