I want to call custom action on the following situations
Situation 1: customer: Show me my booking details. Bot: please share your booking id. Customer: 12345 Bot: your booking details are: call an API in custom actions
Situation 2: customer: Show me my booking details of booking id 12345. Bot: your booking details are: call an API in custom actions
So I need to write a single story or different story for both situations. If two stories than how the bot will identify which one to follow.
I am using following single story:
stories.md
check order status
- greet
- utter_greet
- booking_details
- utter_get_booking_id
- slot{“booking_id”:“12345”}
- action_booking_details
- booking_details{“booking_id”:“12345”}
- slot{“booking_id”:“12345”}
- action_booking_details
- goodbye
- utter_goodbye
domain.yml
entities: - booking_id
slots: booking_id: type: unfeaturized
It is working good in situation 1 but in situation 2 its behavior is the same as situation 1. it means when i am asking “Show me my booking details of booking id 12345.” still, bot is asking “Bot: please share your booking id.” then after supply, the booking_id, showing the details of the booking.
So how to handle this situation?
Also, when I am tracing the response of bot asking booking_id that time two responses are getting: [{‘recipient_id’: ‘default’, ‘text’: ‘please share your booking id.’}, {‘recipient_i d’: ‘default’, ‘text’: ‘Booking Details are:call API’}]