I am creating a chat bot which mimic the ivr in call. So for example when user say hi (welcome intent) I send a message like please select an option from below.
1, 2, 3, 4, 5 (every option gives user a unique information)
then I create a follow up intent of welcome intent as Default welcome intent select.number
in this situation when user type 2 I give him another set of options. choose the option from below
a, b, c, d, e, f
Now for e.g user type a what intent I need to create on dialogflow to process further.
I am intercepting the user reply using my python script
and calling dialogflow from python script.
reply, intent, parameter = fetch_reply(x, session_id)
def fetch_reply(query, session_id):
response = detect_intent_from_text(query, session_id)
inetnt = response.intent.display_name
# print(inetnt)
# print('-----')
value = 0.0
try:
if response.parameters['number']:
value = response.parameters['number'][0]
except ValueError:
print('no value found')
return response.fulfillment_text, inetnt, value
From here I can simply use if else if user select a and then send him reply but is there anything that dialogflow provide which can I use to give answers to user inputs.
Also there is a option for user like press 0 to go back to main menu. How can I handle it?
If you want me to provide any other info please let me know.