forked from RasaHQ/rasa-calm-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
order_pizza.yml
98 lines (93 loc) · 2.57 KB
/
order_pizza.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
flows:
order_pizza:
name: order pizza
description: user asks for a pizza
nlu_trigger:
- intent:
name: request_pizza
confidence_threshold: 0.5
steps:
- call: fill_pizza_order
next:
- if: slots.confirmation_order
then: payment_options
- else: cancel_order
- id: payment_options
collect: payment_option
next:
- if: slots.payment_option is 'card'
then: use_card_details
- if: slots.payment_option is 'membership_points'
then: use_membership_points
- else: cancel_order
- id: use_card_details
collect: card_details
next:
- if: slots.card_details and slots.confirmation_order
then: take_payment
- else: cancel_order
- id: take_payment
action: utter_execute_payment
next: END
- id: use_membership_points
call: use_membership_points
next:
- if: slots.membership_points and slots.confirmation_order
then: take_payment
- else: cancel_order
- id: cancel_order
action: utter_cancel_order
next: END
fill_pizza_order:
name: fill pizza order
description: user is asked to fill out pizza order details
steps:
- collect: pizza
- collect: num_pizza
- collect: address
- collect: confirmation_order
reset_after_flow_ends: False
ask_before_filling: True
use_membership_points:
if: False
name: use membership points
description: user asks to use membership or loyalty points
steps:
- call: authenticate_user
next:
- if: slots.is_user_logged_in
then:
- action: action_check_points
next: END
- else: END
correct_order:
name: correct_order
description: user wants to correct order details
nlu_trigger:
- intent:
name: correct_order
confidence_threshold: 0.5
steps:
- collect: correct_order
- call: fill_pizza_order
correct_address:
name: correct_address
description: user wants to correct the delivery address
nlu_trigger:
- intent:
name: correct_address
confidence_threshold: 0.7
steps:
- action: action_correct_address
- call: fill_pizza_order
job_vacancies:
name: job vacancies
description: user asks for job vacancies
steps:
- collect: department
next:
- if: slots.department
then: show_vacancies
- else: END
- id: show_vacancies
action: action_show_vacancies