forked from RasaHQ/financial-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
domain.yml
420 lines (420 loc) · 11.8 KB
/
domain.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
session_config:
session_expiration_time: 0
carry_over_slots_to_new_session: true
intents:
- check_human
- transfer_money:
use_entities: []
- inform
- pay_cc:
use_entities: []
- greet
- goodbye
- affirm
- deny
- thankyou
- ask_transfer_charge
- search_transactions:
use_entities: []
- check_balance:
use_entities:
- credit_card
- account_type
- check_earnings:
use_entities: []
- check_recipients
- out_of_scope
- session_start
- restart
- trigger_handoff
- handoff
- human_handoff
- help
- nlu_fallback
entities:
- amount-of-money
- credit_card
- payment_date
- vendor_name
- time
- PERSON
- number
- account_type
- handoff_to
- search_type
slots:
AA_CONTINUE_FORM:
type: any
influence_conversation: false
PERSON:
type: any
influence_conversation: false
account_type:
type: any
influence_conversation: false
amount-of-money:
type: any
influence_conversation: false
amount_transferred:
type: any
initial_value: 0
influence_conversation: false
credit_card:
type: any
influence_conversation: false
currency:
type: any
influence_conversation: false
initial_value: "$"
end_time:
type: any
influence_conversation: false
end_time_formatted:
type: any
influence_conversation: false
grain:
type: any
influence_conversation: false
handoff_to:
type: any
influence_conversation: false
next_form_name:
type: text
influence_conversation: true
number:
type: any
influence_conversation: false
payment_amount_type:
type: any
initial_value: ''
influence_conversation: false
previous_form_name:
type: text
influence_conversation: true
repeated_validation_failures:
type: any
influence_conversation: false
requested_slot:
type: any
influence_conversation: false
search_type:
type: any
influence_conversation: false
start_time:
type: any
influence_conversation: false
start_time_formatted:
type: any
influence_conversation: false
time:
type: any
influence_conversation: false
time_formatted:
type: any
influence_conversation: false
vendor_name:
type: any
influence_conversation: false
zz_confirm_form:
type: any
influence_conversation: false
responses:
utter_out_of_scope:
- text: Sorry, I'm not sure how to respond to that. Type "help" for assistance.
utter_ask_transfer_money_form_amount-of-money:
- text: How much money do you want to transfer?
utter_ask_transfer_money_form_PERSON:
- text: Who do you want to transfer money to?
utter_goodbye:
- text: Bye
utter_noworries:
- text: You're welcome :)
utter_transfer_complete:
- text: Successfully transferred {currency}{amount-of-money} to {PERSON}.
utter_transfer_charge:
- text: You are entitled to six transfers within a statement cycle before being
charged. For subsequent transfers you will be charged {currency}10 per transaction.
utter_ask_cc_payment_form_amount-of-money:
- text: How much do you want to pay?
utter_ask_cc_payment_form_credit_card:
- text: Towards which credit card account do you want to make a payment?
utter_ask_cc_payment_form_time:
- text: For which date would you like to schedule the payment?
utter_ask_transaction_search_form_vendor_name:
- text: For which vendor do you want to see transactions? e.g Starbucks, Target,
Amazon
utter_ask_transaction_search_form_time:
- text: In which timeframe would you like to search for transactions?
utter_ask_transaction_search_form_search_type:
- text: Would you like to search incoming or outgoing transactions?
buttons:
- title: Incoming (earnings)
payload: /inform{"search_type":"deposit"}'
- title: Outgoing (spending)
payload: /inform{"search_type":"spend"}'
utter_no_payment_amount:
- text: Sorry, I don't understand that payment amount.
utter_no_paymentdate:
- text: Sorry, that is not a valid payment date.
utter_no_creditcard:
- text: Sorry, that is not a valid credit card account to make payments towards.
utter_no_vendor_name:
- text: Sorry, that's not a recognized vendor.
utter_no_transactdate:
- text: Sorry, that's not a recognized time frame.
utter_cc_pay_scheduled:
- text: Payment of {currency}{amount-of-money}{payment_amount_type} towards your
{credit_card} account scheduled to be paid at {time_formatted}.
utter_searching_spend_transactions:
- text: Searching transactions{vendor_name} between {start_time_formatted} and {end_time_formatted}...
utter_found_spend_transactions:
- text: I found {numtransacts} transactions{vendor_name} totalling {currency}{total}.
utter_searching_deposit_transactions:
- text: Searching deposits made to your account between {start_time_formatted} and
{end_time_formatted}...
utter_found_deposit_transactions:
- text: I found {numtransacts} deposits made to your account totalling {currency}{total}
utter_ask_rephrase:
- text: I didn't quite understand that. Can you rephrase?
utter_ok:
- text: 👍
utter_ask_continue:
- text: Would you like to continue?
utter_default:
- text: I didn't quite understand that. Could you rephrase?
utter_ask_cc_payment_form_AA_CONTINUE_FORM:
- buttons:
- payload: /affirm
title: Yes
- payload: /deny
title: No, cancel the transaction
text: Would you like to continue scheduling the credit card payment?
utter_ask_transfer_money_form_AA_CONTINUE_FORM:
- buttons:
- payload: /affirm
title: Yes
- payload: /deny
title: No, cancel the transfer
text: Would you like to continue scheduling the money transfer?
utter_ask_transaction_search_form_AA_CONTINUE_FORM:
- buttons:
- payload: /affirm
title: Yes
- payload: /deny
title: No, cancel the search
text: Would you like to continue the transaction search?
utter_ask_cc_payment_form_zz_confirm_form:
- buttons:
- payload: /affirm
title: Yes
- payload: /deny
title: No, cancel the transaction
text: Would you like to schedule a payment of {currency}{amount-of-money}{payment_amount_type}
towards your {credit_card} account for {time_formatted}?
utter_ask_transfer_money_form_zz_confirm_form:
- buttons:
- payload: /affirm
title: Yes
- payload: /deny
title: No, cancel the transaction
text: Would you like to transfer {currency}{amount-of-money} to {PERSON}?
utter_cc_pay_cancelled:
- text: Credit card account payment cancelled.
utter_transfer_cancelled:
- text: Transfer cancelled.
utter_transaction_search_cancelled:
- text: Transaction search cancelled.
utter_account_balance:
- text: Your bank account balance is {currency}{init_account_balance}.
utter_changed_account_balance:
- text: Your bank account balance was {currency}{init_account_balance} and is now
{currency}{account_balance} after transfers and payments.
utter_unknown_recipient:
- text: Sorry, {PERSON} is not in your list of known recipients.
utter_insufficient_funds:
- text: Sorry, you don't have enough money to do that!
utter_insufficient_funds_specific:
- text: The {payment_amount_type} on your {credit_card} credit card is {amount-of-money}, so you have insufficient funds to pay it off.
utter_credit_card_balance:
- text: The current balance for your {credit_card} account is {currency}{credit_card_balance}.
utter_nothing_due:
- text: Your don't owe any money on your {credit_card} credit card bill.
utter_recipients:
- text: These are your known recpients to whom you can send money:{formatted_recipients}
utter_greet:
- text: Hi! I'm your Financial Assistant!
utter_ask_handoff:
- text: It looks like you want to be transferred to a human agent.
utter_handoff:
- text: Alright, I'll try to transfer you.
utter_wouldve_handed_off:
- text: If you were talking to me via chatroom, I would have handed you off to {handoffhost}.
utter_no_handoff:
- text: Since you haven't configured a host to hand off to, I can't send you anywhere!
utter_ask_whatelse:
- text: What else can I help you with?
utter_bot:
- text: I'm a virtual assistant made with Rasa.
utter_help:
- text: "I can help you with your financial accounts. \nYou can ask me things like:\
\ \n- What's my account balance? \n- Pay off my credit card \n- What did I spend\
\ at Target last month? \n- I need to transfer money"
actions:
- action_session_start
- action_restart
- action_show_balance
- action_show_recipients
- action_show_transfer_charge
- action_handoff
- action_handoff_options
- action_pay_cc
- action_transfer_money
- action_transaction_search
- action_ask_transaction_search_form_zz_confirm_form
- action_switch_forms_ask
- action_switch_forms_deny
- action_switch_forms_affirm
- action_switch_back_ask
- validate_cc_payment_form
- validate_transfer_money_form
- validate_transaction_search_form
forms:
cc_payment_form:
required_slots:
AA_CONTINUE_FORM:
- intent: affirm
type: from_intent
value: yes
- intent: deny
type: from_intent
value: no
- intent:
- inform
- cc_payment_form
type: from_text
credit_card:
- entity: credit_card
type: from_entity
- intent:
- inform
- cc_payment_form
type: from_text
amount-of-money:
- entity: amount-of-money
not_intent:
- check_balance
- check_earnings
type: from_entity
- entity: number
not_intent:
- check_balance
- check_earnings
type: from_entity
- intent:
- inform
- cc_payment_form
type: from_text
time:
- entity: time
type: from_entity
- intent:
- inform
- cc_payment_form
type: from_text
zz_confirm_form:
- intent: affirm
type: from_intent
value: yes
- intent: deny
type: from_intent
value: no
- intent:
- inform
- cc_payment_form
type: from_text
transfer_money_form:
required_slots:
AA_CONTINUE_FORM:
- intent: affirm
type: from_intent
value: yes
- intent: deny
type: from_intent
value: no
- intent:
- inform
- transfer_money_form
type: from_text
PERSON:
- entity: PERSON
type: from_entity
- intent:
- inform
- transfer_money_form
type: from_text
amount-of-money:
- entity: amount-of-money
not_intent:
- check_balance
- check_earnings
type: from_entity
- entity: number
not_intent:
- check_balance
- check_earnings
type: from_entity
- intent:
- inform
- transfer_money_form
type: from_text
zz_confirm_form:
- intent: affirm
type: from_intent
value: yes
- intent: deny
type: from_intent
value: no
- intent:
- inform
- transfer_money_form
type: from_text
transaction_search_form:
required_slots:
AA_CONTINUE_FORM:
- intent: affirm
type: from_intent
value: yes
- intent: deny
type: from_intent
value: no
- intent:
- inform
- transaction_search_form
type: from_text
search_type:
- intent: search_transactions
type: from_trigger_intent
value: spend
- intent: check_earnings
type: from_trigger_intent
value: deposit
- type: from_entity
entity: search_type
time:
- entity: time
type: from_entity
- intent:
- inform
- transaction_search_form
type: from_text
zz_confirm_form:
- intent: affirm
type: from_intent
value: yes
- intent: deny
type: from_intent
value: no
- intent:
- inform
- transaction_search_form
type: from_text