Packages

An open source two way communication platform for the social sector

Current section

Files

Jump to
glific priv data flows test.json
Raw

priv/data/flows/test.json

{
"_ui": {
"nodes": {
"1826c405-38f8-4d4e-a7d3-400c4d5ba1dc": {
"type": "execute_actions",
"position": { "top": 20, "left": 180 }
},
"1a9d6fcc-c920-4d12-a198-3c82fd531040": {
"type": "execute_actions",
"position": { "top": 560, "left": 400 }
},
"1cede315-fcef-4edf-a38a-125f2223b66d": {
"type": "execute_actions",
"position": { "top": 400, "left": 420 }
},
"1de225f7-d863-4a84-a393-c2e3a3f43dee": {
"type": "execute_actions",
"position": { "top": 420, "left": 100 }
},
"3b15e405-8863-452a-9d96-d9609986bc66": {
"type": "execute_actions",
"position": { "top": 300, "left": 20 }
},
"4c93f93c-0677-42c1-ab8f-fda7023bc0e8": {
"type": "wait_for_response",
"config": { "cases": {} },
"position": { "top": 40, "left": 600 }
},
"5b3f4a08-b7f5-4a81-991d-ff63cb0f3964": {
"type": "execute_actions",
"position": { "top": 820, "left": 640 }
},
"667bff37-fb11-4ce6-a196-fa11b286233c": {
"type": "execute_actions",
"position": { "top": 280, "left": 420 }
},
"6882967b-2777-4774-9a90-b14614cbb3d5": {
"type": "split_by_subflow",
"config": {},
"position": { "top": 400, "left": 680 }
},
"6bf22f36-a365-4fc8-ad95-87084989fbdd": {
"type": "split_by_subflow",
"config": {},
"position": { "top": 220, "left": 700 }
},
"8966125b-6dd9-4b9a-b540-9d796e22f65b": {
"type": "execute_actions",
"position": { "top": 200, "left": 200 }
},
"a01ab1d6-49b8-4d88-90f2-0cb6cff26a93": {
"type": "execute_actions",
"position": { "top": 520, "left": 80 }
},
"f5539329-71de-49ef-88ec-df0b37b84582": {
"type": "split_by_expression",
"config": { "cases": {} },
"position": { "top": 680, "left": 920 }
},
"f8407d51-749a-4686-906e-b8a96ff1a0f7": {
"type": "execute_actions",
"position": { "top": 400, "left": 940 }
}
}
},
"name": "Test Workflow",
"type": "messaging",
"uuid": "defda715-c520-499d-851e-4428be87def6",
"vars": ["defda715-c520-499d-851e-4428be87def6"],
"nodes": [
{
"uuid": "1826c405-38f8-4d4e-a7d3-400c4d5ba1dc",
"exits": [
{
"uuid": "07de70d4-a403-4e52-86d0-ffc61a20bc49",
"destination_uuid": "4c93f93c-0677-42c1-ab8f-fda7023bc0e8"
}
],
"actions": [
{
"text": "hello",
"type": "send_msg",
"uuid": "fb500222-04db-4c0f-9781-36bf081e4926",
"all_urns": false,
"attachments": [],
"quick_replies": []
}
]
},
{
"uuid": "4c93f93c-0677-42c1-ab8f-fda7023bc0e8",
"exits": [
{
"uuid": "59807f76-a427-4ae9-b59a-150f6dbfe66b",
"destination_uuid": "8966125b-6dd9-4b9a-b540-9d796e22f65b"
},
{
"uuid": "cb3fbe88-5e6b-4e7d-8374-225eca6b1ea6",
"destination_uuid": "667bff37-fb11-4ce6-a196-fa11b286233c"
},
{
"uuid": "31fe1720-cf5b-4862-a98b-8096d1f01469",
"destination_uuid": "6bf22f36-a365-4fc8-ad95-87084989fbdd"
},
{ "uuid": "fd8ce994-2c42-49d4-ab4b-07bedb111bcb" },
{
"uuid": "754a48fe-47c2-482e-b6a2-b1c65d5321a4",
"destination_uuid": null
}
],
"router": {
"type": "switch",
"wait": { "type": "msg" },
"cases": [
{
"type": "has_any_word",
"uuid": "5d5b8be6-22f7-4d0c-ab3d-689f3b7806b2",
"arguments": ["1"],
"category_uuid": "7b6ac2eb-7605-48e7-ab4e-97356e5da6cc"
},
{
"type": "has_any_word",
"uuid": "75ee6b84-ee9d-44f3-a11f-7e67fc6b6be5",
"arguments": ["2"],
"category_uuid": "b8847dc0-b3fc-4560-b919-84b055f2e3b4"
},
{
"type": "has_any_word",
"uuid": "fc05a8cf-f9eb-4b41-816a-647a9de7e4ad",
"arguments": ["newcontact"],
"category_uuid": "0b8c1825-0dd7-45d8-ab50-df1be11534f7"
},
{
"type": "has_number",
"uuid": "ff80e5f4-955a-4786-a07a-9ab9040bfa91",
"arguments": [],
"category_uuid": "f19db8df-8d37-440d-9096-a7b422f9511b"
}
],
"operand": "@input.text",
"categories": [
{
"name": "1",
"uuid": "7b6ac2eb-7605-48e7-ab4e-97356e5da6cc",
"exit_uuid": "59807f76-a427-4ae9-b59a-150f6dbfe66b"
},
{
"name": "2",
"uuid": "b8847dc0-b3fc-4560-b919-84b055f2e3b4",
"exit_uuid": "cb3fbe88-5e6b-4e7d-8374-225eca6b1ea6"
},
{
"name": "3",
"uuid": "0b8c1825-0dd7-45d8-ab50-df1be11534f7",
"exit_uuid": "31fe1720-cf5b-4862-a98b-8096d1f01469"
},
{
"name": "Has Number",
"uuid": "f19db8df-8d37-440d-9096-a7b422f9511b",
"exit_uuid": "fd8ce994-2c42-49d4-ab4b-07bedb111bcb"
},
{
"name": "Other",
"uuid": "7f3392b1-5acb-4f9c-be03-3379ea7345c3",
"exit_uuid": "754a48fe-47c2-482e-b6a2-b1c65d5321a4"
}
],
"result_name": "Result 1",
"default_category_uuid": "7f3392b1-5acb-4f9c-be03-3379ea7345c3"
},
"actions": []
},
{
"uuid": "8966125b-6dd9-4b9a-b540-9d796e22f65b",
"exits": [
{
"uuid": "3b6f1dbd-c023-4ec8-b47d-6e9b2496d78d",
"destination_uuid": "3b15e405-8863-452a-9d96-d9609986bc66"
}
],
"actions": [
{
"type": "wait_for_time",
"uuid": "3f3ca5ae-0455-459f-bd31-cf0dadb10c7f",
"delay": "1800"
}
]
},
{
"uuid": "6bf22f36-a365-4fc8-ad95-87084989fbdd",
"exits": [
{
"uuid": "ddeef684-505f-4f8d-8058-188305b5e3b4",
"destination_uuid": "6882967b-2777-4774-9a90-b14614cbb3d5"
},
{
"uuid": "365c3924-8768-4094-9abd-635ce4280c76",
"destination_uuid": "6882967b-2777-4774-9a90-b14614cbb3d5"
}
],
"router": {
"type": "switch",
"cases": [
{
"type": "has_only_text",
"uuid": "57d7b2db-02b4-418f-b221-60a8cee82c2f",
"arguments": ["completed"],
"category_uuid": "921e5e99-eb80-4002-842d-878f4214a3c4"
},
{
"type": "has_only_text",
"uuid": "a66aa31a-89cc-4db2-95ad-9433aed82555",
"arguments": ["expired"],
"category_uuid": "84e0f04c-0eaf-49b2-9b57-8fa50284d41c"
}
],
"operand": "@child.run.status",
"categories": [
{
"name": "Complete",
"uuid": "921e5e99-eb80-4002-842d-878f4214a3c4",
"exit_uuid": "ddeef684-505f-4f8d-8058-188305b5e3b4"
},
{
"name": "Expired",
"uuid": "84e0f04c-0eaf-49b2-9b57-8fa50284d41c",
"exit_uuid": "365c3924-8768-4094-9abd-635ce4280c76"
}
],
"default_category_uuid": "84e0f04c-0eaf-49b2-9b57-8fa50284d41c"
},
"actions": [
{
"flow": {
"name": "Help Workflow",
"uuid": "3fa22108-f464-41e5-81d9-d8a298854429"
},
"type": "enter_flow",
"uuid": "b067f36d-c9d2-4281-8fde-0b1880e95688"
}
]
},
{
"uuid": "667bff37-fb11-4ce6-a196-fa11b286233c",
"exits": [
{
"uuid": "02f4d2ce-6f54-4e44-9a3b-9c229549036c",
"destination_uuid": "1cede315-fcef-4edf-a38a-125f2223b66d"
}
],
"actions": [
{
"type": "wait_for_time",
"uuid": "a5888f28-89e2-4efb-b80c-960111e1c417",
"delay": "129600"
}
]
},
{
"uuid": "3b15e405-8863-452a-9d96-d9609986bc66",
"exits": [
{
"uuid": "bad0ec50-b3a8-4a48-a869-12f0a786c953",
"destination_uuid": "1de225f7-d863-4a84-a393-c2e3a3f43dee"
}
],
"actions": [
{
"text": "Not an HSM, but ok\n",
"type": "send_msg",
"uuid": "e9c56804-db4d-4624-a47f-ab53b477ed00",
"all_urns": false,
"attachments": [],
"quick_replies": []
}
]
},
{
"uuid": "1cede315-fcef-4edf-a38a-125f2223b66d",
"exits": [
{
"uuid": "2ca6bcb7-efd2-4fef-b0ce-101a40435db3",
"destination_uuid": "1a9d6fcc-c920-4d12-a198-3c82fd531040"
}
],
"actions": [
{
"text": "Not an HSM message",
"type": "send_broadcast",
"uuid": "e57d70d7-2da3-45bd-a147-953b491fce1d",
"groups": [],
"contacts": [{ "name": "SaaS Admin", "uuid": "7" }],
"attachments": [],
"legacy_vars": []
}
]
},
{
"uuid": "6882967b-2777-4774-9a90-b14614cbb3d5",
"exits": [
{
"uuid": "34a24e3a-ab9e-4040-bf7a-7f058ba3327d",
"destination_uuid": null
},
{
"uuid": "e09877b3-7477-433e-9b7e-4bcbb6445014",
"destination_uuid": "f5539329-71de-49ef-88ec-df0b37b84582"
}
],
"router": {
"type": "switch",
"cases": [
{
"type": "has_only_text",
"uuid": "5a4a41d8-56b7-447e-83ee-8f98deb62217",
"arguments": ["completed"],
"category_uuid": "10c04292-12f6-4664-9be3-09a70e29a751"
},
{
"type": "has_only_text",
"uuid": "6bbeaa02-9bd1-4956-9413-a02ec1e3a575",
"arguments": ["expired"],
"category_uuid": "f96f80cb-20c8-4c2c-b37d-033b3679010a"
}
],
"operand": "@child.run.status",
"categories": [
{
"name": "Complete",
"uuid": "10c04292-12f6-4664-9be3-09a70e29a751",
"exit_uuid": "34a24e3a-ab9e-4040-bf7a-7f058ba3327d"
},
{
"name": "Expired",
"uuid": "f96f80cb-20c8-4c2c-b37d-033b3679010a",
"exit_uuid": "e09877b3-7477-433e-9b7e-4bcbb6445014"
}
],
"default_category_uuid": "f96f80cb-20c8-4c2c-b37d-033b3679010a"
},
"actions": [
{
"flow": {
"name": "Out of Office Workflow",
"uuid": "af8a0aaa-dd10-4eee-b3b8-e59530e2f5f7"
},
"type": "enter_flow",
"uuid": "09f3a90e-071e-4e04-b97b-92fefec84fa0"
}
]
},
{
"uuid": "f8407d51-749a-4686-906e-b8a96ff1a0f7",
"exits": [
{
"uuid": "125f5608-ec2d-4e57-beff-01397827afc5",
"destination_uuid": null
}
],
"actions": [
{
"text": "Lets dangle this node",
"type": "send_msg",
"uuid": "7113b243-562e-42b8-9af7-d5413b658352",
"all_urns": false,
"attachments": [],
"quick_replies": []
}
]
},
{
"uuid": "1de225f7-d863-4a84-a393-c2e3a3f43dee",
"exits": [
{
"uuid": "8d232c28-cca8-4aef-9ed0-31ddab1636c9",
"destination_uuid": "a01ab1d6-49b8-4d88-90f2-0cb6cff26a93"
}
],
"actions": [
{
"type": "add_contact_groups",
"uuid": "f29028db-1320-4832-b0ac-4a438f26ffbf",
"groups": [{ "name": "Default Group", "type": "group", "uuid": "1" }]
}
]
},
{
"uuid": "a01ab1d6-49b8-4d88-90f2-0cb6cff26a93",
"exits": [
{
"uuid": "d59264b9-baad-4e3b-bffb-775a5cc1f039",
"destination_uuid": null
}
],
"actions": [
{
"text": "hello, is it me you are looking for\n",
"type": "send_broadcast",
"uuid": "7c3a2b24-2893-4a27-8f58-f1a9d94ed107",
"groups": [],
"contacts": [{ "name": "NGO Staff", "uuid": "12" }],
"attachments": [],
"legacy_vars": []
}
]
},
{
"uuid": "1a9d6fcc-c920-4d12-a198-3c82fd531040",
"exits": [
{
"uuid": "6036629d-ae4b-4fb5-8e53-531752a5a910",
"destination_uuid": null
}
],
"actions": [
{
"type": "add_contact_groups",
"uuid": "1b2f8376-abcd-4d16-8c6e-983199e3fbdf",
"groups": [
{
"name": "Does Not Exist",
"type": "group",
"uuid": "this is a bad uuid"
}
]
}
]
},
{
"uuid": "f5539329-71de-49ef-88ec-df0b37b84582",
"exits": [
{
"uuid": "5e8cbd47-84f9-4eca-9f89-62cf0958ab9a",
"destination_uuid": "5b3f4a08-b7f5-4a81-991d-ff63cb0f3964"
},
{ "uuid": "dc6108f6-d93b-4218-83ab-0885340dd5e8" },
{ "uuid": "dc5dcf7a-5da2-400b-a2e8-e0b0f352ad50" }
],
"router": {
"type": "switch",
"cases": [
{
"type": "has_any_word",
"uuid": "071a20ea-bdd6-4982-b275-d64bf300b965",
"arguments": ["help"],
"category_uuid": "0d61ec76-ec05-4ae2-afbf-a2e55851847b"
},
{
"type": "has_number",
"uuid": "88330ecd-163a-4cbe-b57a-1fc82bb8c267",
"arguments": [],
"category_uuid": "06df9f04-4a0a-4491-b15a-1f286a189849"
}
],
"operand": "@results.flow_keyword.input",
"categories": [
{
"name": "Hello",
"uuid": "0d61ec76-ec05-4ae2-afbf-a2e55851847b",
"exit_uuid": "5e8cbd47-84f9-4eca-9f89-62cf0958ab9a"
},
{
"name": "Has Number",
"uuid": "06df9f04-4a0a-4491-b15a-1f286a189849",
"exit_uuid": "dc6108f6-d93b-4218-83ab-0885340dd5e8"
},
{
"name": "Other",
"uuid": "12c26f90-63a3-46e6-ac04-efe59a719513",
"exit_uuid": "dc5dcf7a-5da2-400b-a2e8-e0b0f352ad50"
}
],
"default_category_uuid": "12c26f90-63a3-46e6-ac04-efe59a719513"
},
"actions": []
},
{
"uuid": "5b3f4a08-b7f5-4a81-991d-ff63cb0f3964",
"exits": [
{
"uuid": "d58c89a4-dd28-4a1c-9bd9-7eb7338c3c61",
"destination_uuid": null
}
],
"actions": [
{
"text": "Contact joined using help keyword",
"type": "send_msg",
"uuid": "517da1a9-91b5-4d4a-98c1-580bab63b256",
"labels": [],
"all_urns": false,
"attachments": [],
"quick_replies": []
}
]
}
],
"language": "base",
"localization": {},
"spec_version": "13.1.0",
"expire_after_minutes": 10080
}