forked from RasaHQ/rasa-calm-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
transfer_money.yml
40 lines (40 loc) · 1.5 KB
/
transfer_money.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
flows:
transfer_money:
description: This flow let's users send money to friends and family.
name: transfer money
steps:
- collect: transfer_money_recipient
description: the name of a person
- id: "ask_amount" # we keep this id, because we use it for a jump
collect: transfer_money_amount_of_money
description: the amount of money without any currency designation
- action: check_transfer_funds
next:
- if: not slots.transfer_money_has_sufficient_funds
then:
- action: utter_transfer_money_insufficient_funds
- set_slots:
- transfer_money_amount_of_money: null
- transfer_money_has_sufficient_funds: null
next: "ask_amount"
- else: transfer_money_final_confirmation
- id: transfer_money_final_confirmation
collect: transfer_money_final_confirmation
description: accepts True or False
ask_before_filling: true
next:
- if: not slots.transfer_money_final_confirmation
then:
- action: utter_transfer_cancelled
next: "END"
- else: execute_transfer
- id: execute_transfer
action: execute_transfer
next:
- if: slots.transfer_money_transfer_successful
then:
- action: utter_transfer_complete
next: "END"
- else:
- action: utter_transfer_failed
next: "END"