Skip to content

Commit 7e85390

Browse files
committed
Add SMS re-engagement
1 parent 783346b commit 7e85390

2 files changed

Lines changed: 365 additions & 2 deletions

File tree

Lines changed: 359 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,359 @@
1+
{
2+
"name": "Re Engagement",
3+
"description": "Default description",
4+
"uuid": "387a852d-e38e-42be-a7c8-9a7af6680c6e",
5+
"resources": [
6+
{
7+
"values": [
8+
{
9+
"value": "@message",
10+
"modes": [
11+
"RICH_MESSAGING"
12+
],
13+
"content_type": "TEXT",
14+
"mime_type": "text/plain",
15+
"language_id": "cd4c148d-689d-413c-9b78-3d8f530dfa45"
16+
}
17+
],
18+
"uuid": "686b16b3-56ba-49df-b55c-3f7088e17bbe"
19+
}
20+
],
21+
"flows": [
22+
{
23+
"label": null,
24+
"name": "stack",
25+
"blocks": [
26+
{
27+
"label": null,
28+
"name": "content_data",
29+
"type": "Io.Turn.Webhook",
30+
"config": {
31+
"timeout": 5000,
32+
"mode": "sync",
33+
"body": null,
34+
"url": "https://content-repo-api-qa.prk-k8s.prd-p6t.org/api/v2/pages/",
35+
"query": [
36+
[
37+
"slug",
38+
"mnch_onboarding_reengagement_sms"
39+
],
40+
[
41+
"sms",
42+
"true"
43+
]
44+
],
45+
"headers": [
46+
[
47+
"Authorization",
48+
"Token @global.config.contentrepo_token"
49+
]
50+
],
51+
"method": "GET",
52+
"cache_ttl": 60000
53+
},
54+
"tags": [],
55+
"uuid": "f161bfa5-1985-5de7-a56e-0b68977c08ad",
56+
"ui_metadata": {
57+
"canvas_coordinates": {
58+
"x": 0,
59+
"y": 0
60+
}
61+
},
62+
"exits": [
63+
{
64+
"default": true,
65+
"name": "content_data",
66+
"config": {},
67+
"test": "",
68+
"uuid": "19889b7b-3b7e-4b45-9381-794032a99517",
69+
"destination_block": "e912c29c-549e-5a43-82f3-c61730ff74d2",
70+
"vendor_metadata": {},
71+
"semantic_label": ""
72+
}
73+
],
74+
"vendor_metadata": {
75+
"io": {
76+
"turn": {
77+
"stacks_dsl": {
78+
"0.1.0": {
79+
"card": {
80+
"code_generator": null,
81+
"condition": null,
82+
"meta": {
83+
"column": 1,
84+
"line": 4
85+
},
86+
"name": "ReEngagementSms",
87+
"uuid": "84cb3742-275e-5256-9dfe-ce8b619ac63a",
88+
"version": null
89+
},
90+
"card_item": {
91+
"meta": {
92+
"column": 3,
93+
"line": 5
94+
},
95+
"type": "webhook",
96+
"webhook": {}
97+
},
98+
"index": 0
99+
}
100+
}
101+
}
102+
}
103+
},
104+
"semantic_label": null
105+
},
106+
{
107+
"label": null,
108+
"name": "message",
109+
"type": "Core.Case",
110+
"config": {},
111+
"tags": [],
112+
"uuid": "e912c29c-549e-5a43-82f3-c61730ff74d2",
113+
"ui_metadata": {
114+
"canvas_coordinates": {
115+
"x": 0,
116+
"y": 0
117+
}
118+
},
119+
"exits": [
120+
{
121+
"default": true,
122+
"name": "content_data.body.results[0].body.text.message",
123+
"config": {},
124+
"test": "",
125+
"uuid": "3a5ad90d-b60d-40a2-969d-c136832fbee0",
126+
"destination_block": "dd714290-769b-5d1c-96a1-56e2a610d171",
127+
"vendor_metadata": {},
128+
"semantic_label": ""
129+
}
130+
],
131+
"vendor_metadata": {
132+
"io": {
133+
"turn": {
134+
"stacks_dsl": {
135+
"0.1.0": {
136+
"card": {
137+
"code_generator": null,
138+
"condition": null,
139+
"meta": {
140+
"column": 1,
141+
"line": 4
142+
},
143+
"name": "ReEngagementSms",
144+
"uuid": "84cb3742-275e-5256-9dfe-ce8b619ac63a",
145+
"version": null
146+
},
147+
"card_item": {
148+
"expression": {},
149+
"meta": {
150+
"column": 3,
151+
"line": 15
152+
},
153+
"type": "expression"
154+
},
155+
"index": 0
156+
}
157+
}
158+
}
159+
}
160+
},
161+
"semantic_label": null
162+
},
163+
{
164+
"label": null,
165+
"name": "name",
166+
"type": "Core.Case",
167+
"config": {},
168+
"tags": [],
169+
"uuid": "dd714290-769b-5d1c-96a1-56e2a610d171",
170+
"ui_metadata": {
171+
"canvas_coordinates": {
172+
"x": 0,
173+
"y": 0
174+
}
175+
},
176+
"exits": [
177+
{
178+
"default": true,
179+
"name": "if(is_nil_or_empty(contact.name), \"\", contact.name)",
180+
"config": {},
181+
"test": "",
182+
"uuid": "8e56e831-4783-4b06-9112-cbb660048e0f",
183+
"destination_block": "3b542704-3580-507b-9558-f2d5683a8bbb",
184+
"vendor_metadata": {},
185+
"semantic_label": ""
186+
}
187+
],
188+
"vendor_metadata": {
189+
"io": {
190+
"turn": {
191+
"stacks_dsl": {
192+
"0.1.0": {
193+
"card": {
194+
"code_generator": null,
195+
"condition": null,
196+
"meta": {
197+
"column": 1,
198+
"line": 4
199+
},
200+
"name": "ReEngagementSms",
201+
"uuid": "84cb3742-275e-5256-9dfe-ce8b619ac63a",
202+
"version": null
203+
},
204+
"card_item": {
205+
"expression": {},
206+
"meta": {
207+
"column": 3,
208+
"line": 16
209+
},
210+
"type": "expression"
211+
},
212+
"index": 0
213+
}
214+
}
215+
}
216+
}
217+
},
218+
"semantic_label": null
219+
},
220+
{
221+
"label": null,
222+
"name": "message",
223+
"type": "Core.Case",
224+
"config": {},
225+
"tags": [],
226+
"uuid": "3b542704-3580-507b-9558-f2d5683a8bbb",
227+
"ui_metadata": {
228+
"canvas_coordinates": {
229+
"x": 0,
230+
"y": 0
231+
}
232+
},
233+
"exits": [
234+
{
235+
"default": true,
236+
"name": "substitute(message, \"{{name}}\", \"@name\")",
237+
"config": {},
238+
"test": "",
239+
"uuid": "a3288244-2b3d-4a7c-91bd-6651352a5530",
240+
"destination_block": "ce05e7bc-5e5c-5ffe-af2b-156e0d8f3491",
241+
"vendor_metadata": {},
242+
"semantic_label": ""
243+
}
244+
],
245+
"vendor_metadata": {
246+
"io": {
247+
"turn": {
248+
"stacks_dsl": {
249+
"0.1.0": {
250+
"card": {
251+
"code_generator": null,
252+
"condition": null,
253+
"meta": {
254+
"column": 1,
255+
"line": 4
256+
},
257+
"name": "ReEngagementSms",
258+
"uuid": "84cb3742-275e-5256-9dfe-ce8b619ac63a",
259+
"version": null
260+
},
261+
"card_item": {
262+
"expression": {},
263+
"meta": {
264+
"column": 3,
265+
"line": 17
266+
},
267+
"type": "expression"
268+
},
269+
"index": 0
270+
}
271+
}
272+
}
273+
}
274+
},
275+
"semantic_label": null
276+
},
277+
{
278+
"label": null,
279+
"name": "re_engagement_sms_text",
280+
"type": "MobilePrimitives.Message",
281+
"config": {
282+
"prompt": "686b16b3-56ba-49df-b55c-3f7088e17bbe"
283+
},
284+
"tags": [],
285+
"uuid": "ce05e7bc-5e5c-5ffe-af2b-156e0d8f3491",
286+
"ui_metadata": {
287+
"canvas_coordinates": {
288+
"x": 0,
289+
"y": 0
290+
}
291+
},
292+
"exits": [
293+
{
294+
"default": true,
295+
"name": "re_engagement_sms_text",
296+
"config": {},
297+
"test": "",
298+
"uuid": "299b2198-bd3b-4fb0-b90e-3e5943859ee2",
299+
"destination_block": null,
300+
"vendor_metadata": {},
301+
"semantic_label": ""
302+
}
303+
],
304+
"vendor_metadata": {
305+
"io": {
306+
"turn": {
307+
"stacks_dsl": {
308+
"0.1.0": {
309+
"card": {
310+
"code_generator": null,
311+
"condition": null,
312+
"meta": {
313+
"column": 1,
314+
"line": 4
315+
},
316+
"name": "ReEngagementSms",
317+
"uuid": "84cb3742-275e-5256-9dfe-ce8b619ac63a",
318+
"version": null
319+
},
320+
"card_item": {
321+
"meta": {
322+
"column": 3,
323+
"line": 18
324+
},
325+
"text": {},
326+
"type": "text"
327+
},
328+
"index": 0
329+
}
330+
}
331+
}
332+
}
333+
},
334+
"semantic_label": null
335+
}
336+
],
337+
"last_modified": "2025-07-29T07:13:09.477733Z",
338+
"uuid": "04fbb107-3017-49b7-af6d-f6f155ea9262",
339+
"languages": [
340+
{
341+
"id": "cd4c148d-689d-413c-9b78-3d8f530dfa45",
342+
"label": "English",
343+
"variant": null,
344+
"iso_639_3": "eng",
345+
"bcp_47": null
346+
}
347+
],
348+
"first_block_id": "f161bfa5-1985-5de7-a56e-0b68977c08ad",
349+
"interaction_timeout": 300,
350+
"vendor_metadata": {},
351+
"supported_modes": [
352+
"RICH_MESSAGING"
353+
],
354+
"exit_block_id": ""
355+
}
356+
],
357+
"vendor_metadata": {},
358+
"specification_version": "1.0.0-rc3"
359+
}

Onboarding/QA/flows_sms/re_engagement.md renamed to Onboarding/QA/flows_sms/md/re_engagement.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
```stack
2-
trigger(on: "MESSAGE RECEIVED") when has_only_phrase(event.message.text.body, "engage")
2+
trigger(interval: "+3m", relative_to: "contact.registration_started")
3+
when contact.registration_status != "completed"
34
45
```
56

67
## Re-Engagement SMS
8+
79
```stack
810
card ReEngagementSms do
911
content_data =
@@ -17,7 +19,9 @@ card ReEngagementSms do
1719
)
1820
1921
message = content_data.body.results[0].body.text.message
22+
name = if(is_nil_or_empty(contact.name), do: "", else: contact.name)
23+
message = substitute(message, "{{name}}", "@name")
2024
text("@message")
2125
end
2226
23-
```
27+
```

0 commit comments

Comments
 (0)