I am trying get the value from button which user selects from custom action.
def run(self, dispatcher, tracker, domain):
user_vendor_name = tracker.latest_message.get('text')
vs = VendorSimilarity()
output = vs.get_vendor(name = user_vendor_name)
print(output)
buttons=[]
for key in output["matched_vendor_name"]:
buttons.append({"payload": "/user_vendor_name", "title": key})
buttons.append({"payload": "/deny", "title": "I would like to add a new vendor"})
dispatcher.utter_message(text="Please select a vendor:\n",buttons=buttons)
user_vendor_name = tracker.get_slot('user_vendor_name')
print(user_vendor_name)
return []
Above is the custom action code. User will make a selection using buttons and I want to save that value in a slot to use it again in future.