How to confirm already set slot in Form?

Hi,

I have a slot location. I want to confirm the value if its already set. But I dont want to confirm if its being set for the first time through FormAction. How do I do this?

Can you give a concrete dialogue example? What kind of situation do you have where you want to confirm that the slot is set?

If you have a custom action, you can check the value of the slot via tracker.get_slot().

Hey sorry for the late reply. I had actually solved this.

So dialogue would ideally be something like this

Customer: Hi! Whats my nearest branch?
Bot: For which location do you want to search?
Customer: Bangalore
Bot: Here you go! <Value>
Customer: Thanks!
Bot: No problem
Customer: Whats my nearest ATM?
Bot: Do you want to look this up for Bangalore?
Customer: Yes
Bot: Here you go!<Value>

So in the above conversation, the first time when the user requests something location related, I am setting the location slot. Afterwards anytime a user asks for something location related, I want to confirm the already present location value before fetching details.

Right now I solved this by using two forms:

  1. One for confirming if a location is already set
  2. Another to ask for location

story

get details if location present

  • get_facility_details
    • slot{“location”:“Bangalore”}
    • facility_details_location_check_form
    • form{“name”: “facility_details_location_check_form”}
    • form{“name”: null}

get details

  • get_facility_details
    • facility_details_form
    • form{“name”: “facility_details_form”}
    • form{“name”: null}

Is this the way to do it or is there any other simpler way? I was also trying using to do this by having a form for location and using story to handle confirmation like this

  • get_facility_details
    • slot{“location”:“Bangalore”}
    • utter_confirm_location
  • affirm
    • action_fetch_details

The problem was if a user says randomly says okay(i.e. not as part of the get details story) sometimes the action_fetch_details is executed. Is this because of training augmentation?