Switch and Resume Intents

I have 3 intents -

  1. Account Balance with 1 slot - account number
  2. Apply for Loan with 2 slots - loan amount, loan tenure
  3. Pay Beneficiary with 3 slot values - name, amount , account

I have used form action for these intents.

If the user starts with the “Apply for Loan” intent and fills the “loan amount” and switches to “Pay Beneficiary” , how do I make it resume the “loan intent” asking for “tenure” , since we have already entered loan amount after the user has completed the “Pay Beneficiary”.

This being one such use case , the user might start with 4-5 intents and if a particular intent is not yet completed , how do I make it keep on resuming the intents in reverse order .

How exactly would this be added in the story. Also the resume message should be like “You were applying for a loan would you like to resume it ?”,asking for a yes/no confirmation and then only invoke the “loan intent” , or else invoke the previous intent if any in the stack.

The idea is to be able to allow users to navigate/switch from one intent to another and to bot should bring the user back to the previously started intent.

Thanks.

I currently have one form and many intents. I can switch to different intents and revert back to the form. I have never tried switching between multiple forms though. The story has to be defined in such a way that it switches.

I have taken this example from the form tutorial by Juste: form stories

* greet
 - utter_greet
* request_restaurant 
 - restaurant_form # Normal start
 - form{"name": "restaurant_form"}
* chitchat # User enters something mid way in form
 - utter_chitchat
 - restaurant_form # Continue form
 - form{"name": null} # End form
 - utter_slots_values
* thankyou
 - utter_noworries

Similarily, if you look at the link, you’ll find many examples of form deviations.

Look at this particular story: Confirm from user

A resume message can be added after chit chat like this.

chit chat + affirm

  • greet
    • utter_greet
  • request_restaurant
    • restaurant_form # Normal start
    • form{“name”: “restaurant_form”}
  • chitchat # User enters something mid way in form
    • utter_chitchat
    • utter_continue_form #do you want to resume message
  • affirm
    • restaurant_form # Continue form
    • form{“name”: null} # End form
    • utter_slots_values
  • thankyou
    • utter_noworries

chit chat + deny

  • greet
    • utter_greet
  • request_restaurant
    • restaurant_form # Normal start
    • form{“name”: “restaurant_form”}
  • chitchat # User enters something mid way in form
    • utter_chitchat
    • utter_continue_form #do you want to resume message
  • deny
    • form{“name”: null} # End form
  • thankyou
    • utter_noworries