I want to run a custom action inside story which should ask phone-number from user and then perform action.
- The entity is phone-number (Duckling dimension with no intent).
- Phone-number is a part of a form which contains 4 others entities however, while searching for record it is supposed to ask only “phone-number”.
- Since I don’t have an intent, how should I ask for the same in the story?
stories:
- story: Modify appointment
steps:
- intent: modify_appointment
- action: utter_ask_phone-number
- intent: ?
entities:
- phone-number:'6912399123'
- action: action_search_data
class ActionSearchData(Action):
def name(self) -> Text:
return "action_search_data"
def search_phone(self,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any],
) -> Dict[Text, Any]:
phone = tracker.get_slot("phone-number")
print(f"Contact number given = {phone}")