How to use the intent inform?

I am trying to create a chatbot for banking. Flow is,

User: hi Bot: Welcome to ABC bank services. Let me know your name? User: Kabeer Bot: Hi kabeer, how can i help you?
Buttons:
1: Loan (/inform{“service_type”:“Loan”})
2: Deposit (/inform{“service_type”:“Deposit”})
3: Account
Types (/inform{“service_type”:“Account Types”})
4: Customer Support No (/inform{“service_type”:“Customer Support No”})
5: Service Request
(/inform{“service_type”:“Service Request”})
6: Careers (/inform{“service_type”:“Careers”})
Type out your own message…
User: 1: Loan (/inform{“service_type”:“Loan”})
Bot:Please select the required Loan type from the list
Buttons:
1: Personal Loan (/inform{“loan_type”:“Personal Loan”})
2: Home Loan
(/inform{“loan_type”:“Home Loan”})
3: Two-wheeler Loan (/inform{“loan_type”:“Two-wheeler Loan”})
4: Car Loan
(/inform{“loan_type”:“Car Loan”})
5: Gold Loan (/inform{“loan_type”:“Gold Loan”})
Type out your own message…
User:Car Loan (/inform{“loan_type”:“Car Loan”}) Bot: Uttering home loan here. Issue is the bot always utter home loan only. The bot is not recognise the stories for other loans using entity. How can i make this work? I used inform intent because of i thought it will cause similar intnent problem

Here is my code.

stories.md

      ## say goodbye
  * goodbye
    - utter_goodbye

  ## bot challenge
  * bot_challenge
    - utter_iamabot

  ## happy_path_personal_loan_01
  * greet
      - utter_greet
  * PERSON{"PERSON": "kabeer"}
      - slot{"PERSON": "kabeer"}
      - utter_ask_help
  * inform{"service_type": "Loan"}
      - slot{"service_type": "Loan"}
      - utter_ask_loan_type
  * inform{"loan_type": "Personal Loan"}
      - slot{"loan_type": "Personal Loan"}
      - utter_personal_loan
  * goodbye
      - utter_goodbye
  ## happy_path_home_loan_01
  * greet
      - utter_greet
  * PERSON{"PERSON": "kabeer"}
      - slot{"PERSON": "kabeer"}
      - utter_ask_help
  * inform{"service_type": "Loan"}
      - slot{"service_type": "Loan"}
      - utter_ask_loan_type
  * inform{"loan_type": "Home Loan"}
      - slot{"loan_type": "Home Loan"}
      - utter_home_loan
  * goodbye
      - utter_goodbye

  ## happy_path_car_loan_01
  * greet
      - utter_greet
  * PERSON{"PERSON": "kabeer"}
      - slot{"PERSON": "kabeer"}
      - utter_ask_help
  * inform{"service_type": "Loan"}
      - slot{"service_type": "Loan"}
      - utter_ask_loan_type
  * inform{"loan_type": "Car Loan"}
      - slot{"loan_type": "Car Loan"}
      - utter_car_loan

  ## interactive_story_1
  * greet
      - utter_greet
  * PERSON{"PERSON": "kiran"}
      - slot{"PERSON": "kiran"}
      - utter_ask_help
  * inform{"service_type": "Loan"}
      - slot{"service_type": "Loan"}
      - utter_ask_loan_type
  * inform{"loan_type": "Home Loan"}
      - slot{"loan_type": "Home Loan"}
      - utter_home_loan

  ## interactive_story_2
  * greet
      - utter_greet
  * PERSON{"PERSON": "kumar"}
      - slot{"PERSON": "kumar"}
      - utter_ask_help
  * inform{"service_type": "Loan"}
      - slot{"service_type": "Loan"}
      - utter_ask_loan_type
  * inform{"loan_type": "Personal Loan"}
      - slot{"loan_type": "Personal Loan"}
      - utter_personal_loan
      - action_restart

  ## interactive_story_3
  * greet
      - utter_greet
  * PERSON{"PERSON": "kiran"}
      - slot{"PERSON": "kiran"}
      - utter_ask_help
  * inform{"service_type": "Loan"}
      - slot{"service_type": "Loan"}
      - utter_ask_loan_type
  * inform{"loan_type": "Car Loan"}
      - slot{"loan_type": "Car Loan"}
      - utter_car_loan
      - action_restart

  ## interactive_story_4
  * greet
      - utter_greet
  * PERSON{"PERSON": "kiran"}
      - slot{"PERSON": "kiran"}
      - utter_ask_help
  * inform{"service_type": "Loan"}
      - slot{"service_type": "Loan"}
      - utter_ask_loan_type
  * inform{"loan_type": "Personal Loan"}
      - slot{"loan_type": "Personal Loan"}
      - utter_personal_loan
      - action_restart

domain.yml

        actions:
    - utter_ask_help
    - utter_ask_loan_type
    - utter_car_loan
    - utter_cheer_up
    - utter_did_that_help
    - utter_goodbye
    - utter_greet
    - utter_happy
    - utter_home_loan
    - utter_iamabot
    - utter_personal_loan
    entities:
    - PERSON
    - loan_type
    - service_type
    intents:
    - greet
    - inform
    - PERSON
    - goodbye
    - affirm
    - deny
    - bot_challenge
    slots:
      PERSON:
        type: text
      loan_type:
        type: text
      service_type:
        type: text
    templates:
      utter_ask_help:
      - buttons:
        - payload: /inform{"service_type":"Loan"}
          title: Loan
        - payload: /inform{"service_type":"Deposit"}
          title: Deposit
        - payload: /inform{"service_type":"Account Types"}
          title: Account Types
        - payload: /inform{"service_type":"Customer Support No"}
          title: Customer Support No
        - payload: /inform{"service_type":"Service Request"}
          title: Service Request
        - payload: /inform{"service_type":"Careers"}
          title: Careers
        text: Hi {PERSON}, how can i help you?
      utter_ask_loan_type:
      - buttons:
        - payload: /inform{"loan_type":"Personal Loan"}
          title: Personal Loan
        - payload: /inform{"loan_type":"Home Loan"}
          title: Home Loan
        - payload: /inform{"loan_type":"Two-wheeler Loan"}
          title: Two-wheeler Loan
        - payload: /inform{"loan_type":"Car Loan"}
          title: Car Loan
        - payload: /inform{"loan_type":"Gold Loan"}
          title: Gold Loan
        text: Please select the required Loan type from the list
      utter_car_loan:
      - text: LTV up to 100% on select models, faster processing of loans, easy documentation.
      utter_cheer_up:
      - image: https://i.imgur.com/nGF1K8f.jpg
        text: 'Here is something to cheer you up:'
      utter_did_that_help:
      - text: Did that help you?
      utter_goodbye:
      - text: Bye
      utter_greet:
      - text: Welcome to Voxtron bank services. Let me know your name?
      utter_happy:
      - text: Great, carry on!
      utter_home_loan:
      - text: Loans from 25,000 to 50 lakhs. Attractive interest rates, zero prepayment
          charges, affordable EMIs.
      utter_iamabot:
      - text: I am a bot, powered by Rasa.
      utter_personal_loan:
      - text: Loans up to 20 lakhs at attractive interest, no collateral & flexible repayment.
          Documents Required to apply, KYC and Income Documents are mandatory for applying
          a Personal Loan. Additional documents may be requested on a case to case basis.

nlu.md

  ## intent:inform
  - How can i apply for a [loan](service_type)
  - i want to get a [car loan](loan_type)
  - i want to apply for [personal loan](loan_type)
  - please let me know how can i apply for a [loan](service_type)
  - [gold loan](loan_type) details please
  - how to get a [home loan](loan_type)
  - I would like to know about the [gold loan](loan_type)
  - what are the conditions to get a [home loan](loan_type)
  - please send me the details about [vehicle loans](loan_type)
  - I would like to take a [housing loan](loan_type)
  - How am I supposed to apply for a [two wheeler loans](loan_type)
  - [car loan](loan_type)
  - [personal loan](loan_type)
  - [gold loan](loan_type)
  - [home loan](loan_type)
  - [vehicle loan](loan_type)
  - [housing loan](loan_type)
  - [loan](service_type)
  - [loans](service_type)

@akelad , @btotharye , @IgNoRaNt2 no suggestions?

Hello @kabeer,

The fast solution is to change the slot type of slot “loan_type” from text to categorical. The bot can not discriminate between multiple slot values if the type of slot is text. More information about categorical slot here: Slots.

The next solution which i suggest is to use FormAction in order to handle this type of flow. You can easily check the slot value and execute your own logic correspondingly in a FormAction.

@fuih, thanks for your answer, I have some doubts, i think the slot loan_type is similar to the slot cuisine(text type) in restaurant chatbot from rasa examples. The slot cuisine accepts like Chinese, American, Continental, etc. same as in for slot loan_type like a car loan, home loan. personal loan etc.

The second solution, create a form action and check each entity and slot utter whatever the message that i want to, right? If so, it’s just if-else condition, then where is the advantage of AI?

Correct if i am wrong. Thanks.

@kabeer The slot cuisine can accept multiple values, but the bot can not discriminate those value in the stories, such as: If cuisine is Chinese -> utter_chinese. For the slot type text, the bot can only know if the slot is set or not. Only when the slot is categorical, the bot can discriminate between the values since they are one hot encoded (i think).

Secondly, about the advantage of AI, what is the advantage of AI in your situation ? You want the bot to utter_home_loan when the slot loan_type is home_loan only, same for car_loan, etc,… Then what difference does it have compare to a simple if else ? For goal-based chatbot, most of the AI is in the NLU and the ability to predict and act correspondingly to certain intents with possibility (so even if it’s not sure it can still output some kind of action depends on the stories it is trained on). Unless there are gonna be some fancy branching in your stories, right now it’s simply: if loan_type is this_type -> utter_this_type.