How to use stories for context switching

Accoring to the Tutorials of the rasa open source, I can not accomplish how to use stories for context switching, my rasa version is 2.0. rasa open source give a story as follow:

stories:

  • story: Context switch from credit card payment to money transfer steps:
    • intent: pay_credit_card
    • action: credit_card_payment_form
    • active_loop: credit_card_payment_form
    • intent: transfer_money
    • active_loop: null
    • action: transfer_money_form
    • active_loop: transfer_money_form
    • active_loop: null
    • action: utter_continue_credit_card_payment

what should I do? I will very be thankful if someone can support me or give me some suggestion.

@xiaolinpeter, when credit card’s form is active and your assistant identify another intent, you can just ask for a confirmation before switch to money transfer. For example:

- story: Context switch from credit card payment to money transfer:
  steps:
  - intent: pay_credit_card
  - action: credit_card_payment_form
  - active_loop: credit_card_payment_form
  - intent: transfer_money
  - action: utter_continue_credit_card_payment
  - intent: deny
  - action: action_deactivate_loop
  - active_loop: null
  - action: utter_transfer_money
  - intent: affirm
  - action: transfer_money_form
  - active_loop: transfer_money_form
  - active_loop: null

@marcos.allysson thank you very much, I will try the solution you gived soon