-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrules.json
124 lines (124 loc) · 3.68 KB
/
rules.json
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
{
"rules": [
{
"terms": ["help", "what can you do"],
"response": "This is the help screen\nSome things I understand:\n'simple questionnaire'\n'pizza questionnaire'\n"
},
{
"terms": ["simple questionnaire"],
"response": "Hey {{.Username}}, I'm going to ask you some questions. If you want to finish early, just send me the word 'stop'.",
"interactions": [
{
"interaction_id": "q1",
"stop_word": "stop",
"type": "text",
"question": "How was your day yesterday?",
"next_interaction": "q2"
},
{
"interaction_id": "q2",
"stop_word": "stop",
"type": "text",
"question": "Do you think you'll have a good day tomorrow?",
"next_interaction": "end"
}
],
"interaction_start": "q1"
},
{
"terms": ["pizza questionnaire"],
"response": "A quick q",
"interactions": [
{
"interaction_id": "a1",
"stop_word": "stop",
"type": "attachment",
"question": "Do you like pineapple on pizza?",
"attachment": {
"fallback": "Do you like pineapple on pizza?",
"callback_id": "a1",
"actions": [
{
"name": "pineapple",
"text": "Yes",
"style": "danger",
"type": "button",
"value": "yes",
"confirm": {
"title": "Are you sure?",
"text": "You actually like pineapple on pizza?",
"ok_text": "Yes",
"dismiss_text": "No"
}
},
{
"name": "pineapple",
"text": "No",
"type": "button",
"value": "no"
}
]
},
"next_interaction_dynamic": [
{
"response": "no",
"next_interaction": "end"
},
{
"response": "yes",
"next_interaction": "a2"
}
],
"next_interaction": "end"
},
{
"interaction_id": "a2",
"stop_word": "stop",
"type": "text",
"question": "Why do you like pineapple on pizza?",
"next_interaction": "a3"
},
{
"interaction_id": "a3",
"stop_word": "stop",
"type": "attachment",
"question": "Okay, but surely there's at least one other thing you like with pineapple:",
"attachment": {
"fallback": "What else you like with pineapple",
"callback_id": "a3",
"actions": [
{
"name": "othertopping",
"text": "Pick a topping..",
"type": "select",
"options": [
{
"text": "Ham",
"value": "ham"
},
{
"text": "Anchovies",
"value": "anchovies"
},
{
"text": "Sausage",
"value": "sausage"
}
]
}
]
},
"next_interaction": "end"
}
],
"interaction_start": "a1"
},
{
"terms": ["what is my userid", "what's my userid", "what is my user id", "what's my user id"],
"response": "[[Hi||Hey]] {{.Username}}, your User ID is '{{.UserID}}'"
}
],
"default": "[[Hi||Heylo||Hey]] {{.Username}}. How's [[things||stuff]]? For help simply ask for \"help\", or ask me what I can do",
"interaction_cancelled_response": "Thanks {{.Username}}, this interaction is cancelled",
"interaction_complete_response": "Thanks {{.Username}}, we'll get back to you shortly"
}