Let user modify slot in form after the submit message

Hi !

I was wondering how we let the user change/modify the slot value in a form once he sees the submit message.

Here is a simple example of the conversation flow I wish to achieve:

Bot: Here is the information you have given me: - name: bob - age: 18 - favourite color: blue

   Do you wish to modify any information (yes/no)?

User: yes

Bot: Which information would you like to modify?

User: the age

Bot: could you tell me how old you are?

User: I’m 23

Bot: Here is the information you have given me: - name: bob - age: 23 - favourite color: blue

   Do you wish to modify any information (yes/no)?

User: no


The first bot message is the submit message of the form using {} to reference the slot values.

I can’t seem to find the coding logic for the slot modification part. Do we stay within the formaction or do we have to create another custom action? Can this be managed in a story configuration?

Looking forward to hear your suggestions !

Best,

Bob

@akelad @mloubser

When the bot asks the user his age, it’s actually reactivating the utter_ask_age

hi bob! since you are asking the user explicitly if they want to make changes, it’s probably easiest to add do this by overriding the required_slots method:

  1. add a modifications slot to the required slots
  2. if modifications has value True, add two more slots to the required slots (name of slot to correct and the corrected value)