my form action has two slots accnumber and pincode with same entity as(number)…and while executing form action my first slot is set with a value (accnumber, eg - 10024554562) but after filling second slot (pincode, eg -2001) along with this my previous slot(accnumber) also gets replace by pincode value …does resulting in same value in for both the slots( accnumber = 2001 and pincode = 2001))
here is the code for formaction
class get_xyznumber(FormAction):
def name(self) -> Text:
return 'get_xyznumber'
@staticmethod
def required_slots(tracker: Tracker) -> List[Text]:
return ["accnum","pincode"]
def slot_mappings(self) -> Dict[Text, Union[Dict, List[Dict]]]:
return {
'pincode': [
self.from_entity(
entity="pincode", intent=["inform"]
),
self.from_entity(entity="number")
],
'accnum': [
self.from_entity(
entity="accnum", intent=["inform","enquiry"]
),
self.from_entity(entity="number"),
]
}
def submit( self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any], ) -> List[Dict]: “”“Define what the form has to do after all required slots are filled”""
# utter submit template
dispatcher.utter_message(template="utter_submit")
return []
output:- before asking pincode bot - please tell you accnum user response - 10024554562 accnum: 10024554562 amount: None cardtype: None currency: None requested_slot: pincode pincode: None
after asking pincode bot - please tell your pincode user response - 2001 accnum: 2001 amount: None cardtype: None currency: None requested_slot: None pincode: 2001