-
Notifications
You must be signed in to change notification settings - Fork 18
/
transfer_money.yml
41 lines (41 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
41
flows:
transfer_money:
description: send money to friends and family
name: transfer money
always_include_in_prompt: True
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