Skip to content

Instantly share code, notes, and snippets.

@edysegura
Created February 26, 2021 11:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edysegura/70c62c9c58c58e7b31435b67bb4769d6 to your computer and use it in GitHub Desktop.
Save edysegura/70c62c9c58c58e7b31435b67bb4769d6 to your computer and use it in GitHub Desktop.
{
"onboarding": {
"$contentActions": [
{
"input": {
"bypass": false,
"$cardContent": {
"document": {
"id": "9d471950-53e9-4461-ba75-826b1193ff51",
"type": "text/plain"
},
"editable": false,
"deletable": false,
"position": "right",
"editing": false
},
"$invalid": false
},
"$invalid": false
}
],
"$conditionOutputs": [
{
"stateId": "welcome",
"conditions": [
{ "source": "input", "comparison": "matches", "values": [".*"] }
],
"$id": "de7847e0-662a-4782-a6b8-94e190e155a7",
"$connId": "con_3",
"$invalid": false
}
],
"$enteringCustomActions": [],
"$leavingCustomActions": [],
"$inputSuggestions": [],
"$defaultOutput": { "stateId": "fallback", "$invalid": false },
"$tags": [],
"id": "onboarding",
"root": true,
"$position": { "top": "231px", "left": "135px" },
"$title": "Start",
"$invalidContentActions": false,
"$invalidOutputs": false,
"$invalidCustomActions": false,
"$invalid": false
},
"fallback": {
"$contentActions": [
{
"input": {
"bypass": true,
"$cardContent": {
"document": {
"id": "d1ba30dc-918d-4f60-82eb-8565c3e484de",
"type": "text/plain",
"content": "User input"
},
"editable": false,
"deletable": true,
"position": "right",
"editing": false
},
"$invalid": false
},
"$invalid": false
}
],
"$conditionOutputs": [
{
"stateId": "error",
"conditions": [
{ "source": "input", "comparison": "matches", "values": [".*"] }
],
"$id": "496f5eb0-1fd0-48b8-bb2c-33de5ca93510",
"$connId": "con_8",
"$invalid": false
}
],
"$enteringCustomActions": [],
"$leavingCustomActions": [],
"$inputSuggestions": [],
"$defaultOutput": { "stateId": "onboarding", "$invalid": false },
"$tags": [],
"id": "fallback",
"$position": { "top": "410px", "left": "135px" },
"$title": "Exceptions",
"$invalidContentActions": false,
"$invalidOutputs": false,
"$invalidCustomActions": false,
"$invalid": false
},
"welcome": {
"$contentActions": [
{
"action": {
"$id": "385056be-333a-4dc7-a2c5-606896c5e5d0",
"type": "SendMessage",
"settings": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "application/vnd.lime.chatstate+json",
"content": { "state": "composing", "interval": 1000 }
},
"$cardContent": {
"document": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "application/vnd.lime.chatstate+json",
"content": { "state": "composing", "interval": 1000 }
},
"editable": true,
"deletable": true,
"position": "left",
"editing": false
}
},
"$invalid": false
},
{
"action": {
"$id": "ee01cf7f-e718-4d27-be8c-5504ef69fac7",
"type": "SendMessage",
"settings": {
"id": "00000000-0000-0000-0000-000000000001",
"type": "text/plain",
"content": "Olá!\nSeja bem-vindo(a)!",
"metadata": {}
},
"$cardContent": {
"document": {
"id": "00000000-0000-0000-0000-000000000001",
"type": "text/plain",
"content": "Olá!\nSeja bem-vindo(a)!"
},
"editable": true,
"deletable": true,
"position": "left",
"editing": false
}
},
"$invalid": false
},
{
"input": {
"bypass": true,
"$cardContent": {
"document": {
"id": "0f06a707-e319-4ccf-b3d1-2a4ecffdf36b",
"type": "text/plain",
"content": "cep"
},
"editable": false,
"deletable": true,
"position": "right",
"editing": false
},
"$invalid": false,
"variable": "cep",
"validation": {
"type": "text/plain",
"rule": "text",
"error": "Enter a inactivity time"
}
},
"$invalid": false
}
],
"$conditionOutputs": [
{
"stateId": "3261aaaa-60a9-41db-99b7-76043bb70137",
"$connId": "con_13",
"$id": "79b17a04-c2f3-46bc-90a3-70ee04718e35",
"conditions": [
{ "source": "input", "comparison": "exists", "values": [] }
],
"$invalid": false
}
],
"$enteringCustomActions": [],
"$leavingCustomActions": [],
"$inputSuggestions": [],
"$defaultOutput": {
"stateId": "6373939c-28f9-4cd6-a08b-60576c00f8da",
"$invalid": false
},
"$tags": [],
"id": "welcome",
"$position": { "top": "231px", "left": "413px" },
"$title": "Welcome",
"$invalidContentActions": false,
"$invalidOutputs": false,
"$invalidCustomActions": false,
"$invalid": false
},
"error": {
"$contentActions": [
{
"action": {
"$id": "78cb0ec8-a177-423e-8d20-2040629f1770",
"type": "SendMessage",
"settings": {
"id": "00000000-0000-0000-0000-000000000002",
"type": "application/vnd.lime.chatstate+json",
"content": { "state": "composing", "interval": 1000 }
},
"$cardContent": {
"document": {
"id": "00000000-0000-0000-0000-000000000002",
"type": "application/vnd.lime.chatstate+json",
"content": { "state": "composing", "interval": 1000 }
},
"editable": true,
"deletable": true,
"position": "left",
"editing": false
}
},
"$invalid": false
},
{
"action": {
"$id": "7cc8f9f1-1517-46fd-b2d3-b258de740ca8",
"type": "SendMessage",
"settings": {
"id": "00000000-0000-0000-0000-000000000003",
"type": "text/plain",
"content": "Desculpe, não consegui entender!"
},
"$cardContent": {
"document": {
"id": "00000000-0000-0000-0000-000000000003",
"type": "text/plain",
"content": "Desculpe, não consegui entender!"
},
"editable": true,
"deletable": true,
"position": "left",
"editing": false
}
},
"$invalid": false
},
{
"input": {
"bypass": true,
"$cardContent": {
"document": {
"id": "e51a5497-988a-4718-a011-e135fbfb310b",
"type": "text/plain",
"content": "User input"
},
"editable": false,
"deletable": true,
"position": "right",
"editing": false
},
"$invalid": false
},
"$invalid": false
}
],
"$conditionOutputs": [],
"$enteringCustomActions": [],
"$leavingCustomActions": [],
"$inputSuggestions": [],
"$defaultOutput": { "stateId": "onboarding", "$invalid": false },
"$tags": [],
"id": "error",
"$position": { "top": "540px", "left": "135px" },
"$title": "Default error",
"$invalidContentActions": false,
"$invalidOutputs": false,
"$invalidCustomActions": false,
"$invalid": false
},
"6373939c-28f9-4cd6-a08b-60576c00f8da": {
"$contentActions": [
{
"action": {
"$id": "7ecbfd5d-cd38-47f5-b8c1-e76ea8ce4e5f",
"type": "SendMessage",
"settings": {
"id": "c3da2337-cd74-4499-8c8a-d35dff20cf62",
"type": "application/vnd.lime.chatstate+json",
"content": { "state": "composing", "interval": 1000 }
},
"$cardContent": {
"document": {
"id": "c3da2337-cd74-4499-8c8a-d35dff20cf62",
"type": "application/vnd.lime.chatstate+json",
"content": { "state": "composing", "interval": 1000 }
},
"editable": true,
"deletable": true,
"position": "left"
}
},
"$invalid": false,
"$$hashKey": "object:596"
},
{
"action": {
"$id": "43cfb8ee-fa20-4a0b-8bb2-bf9067ba1893",
"type": "SendMessage",
"settings": {
"id": "81ddcd82-6d8e-41f1-9c53-c500d0d3bad2",
"type": "text/plain",
"content": "Sua localidade é {{cepResponse@localidade}} e o seu DDD é o {{cepResponse@ddd}}",
"metadata": {}
},
"$cardContent": {
"document": {
"id": "81ddcd82-6d8e-41f1-9c53-c500d0d3bad2",
"type": "text/plain",
"content": "Sua localidade é {{cepResponse@localidade}} e o seu DDD é o {{cepResponse@ddd}}"
},
"editable": true,
"deletable": true,
"position": "left"
}
},
"$invalid": false,
"$$hashKey": "object:597"
},
{
"action": {
"$id": "3171805e-6c20-499f-93a3-aa7b38f02902",
"type": "SendMessage",
"settings": {
"id": "708d9074-58d0-46cd-ac0b-b4b3932795b5",
"type": "application/vnd.lime.chatstate+json",
"content": { "state": "composing", "interval": 1000 }
},
"$cardContent": {
"document": {
"id": "708d9074-58d0-46cd-ac0b-b4b3932795b5",
"type": "application/vnd.lime.chatstate+json",
"content": { "state": "composing", "interval": 1000 }
},
"editable": true,
"deletable": true,
"position": "left"
}
},
"$invalid": false,
"$$hashKey": "object:598"
},
{
"action": {
"$id": "a7a551b2-7f18-4d6b-8e09-21575091419f",
"type": "SendMessage",
"settings": {
"id": "8500b840-efb7-4d75-a4ac-6d1957dda298",
"type": "application/vnd.lime.select+json",
"content": {
"text": "Deseja consultar outro CEP?",
"scope": "immediate",
"options": [
{
"text": "Sim",
"previewText": "Sim",
"value": null,
"index": 0,
"type": null
},
{
"text": "Não",
"previewText": "Não",
"value": null,
"index": 1,
"type": null
}
]
},
"metadata": {}
},
"$cardContent": {
"document": {
"id": "8500b840-efb7-4d75-a4ac-6d1957dda298",
"type": "application/vnd.lime.select+json",
"content": {
"text": "Deseja consultar outro CEP?",
"scope": "immediate",
"options": [
{
"text": "Sim",
"previewText": "Sim",
"value": null,
"index": 0,
"type": null
},
{
"text": "Não",
"previewText": "Não",
"value": null,
"index": 1,
"type": null
}
]
}
},
"editable": true,
"deletable": true,
"position": "left"
}
},
"$invalid": false,
"$$hashKey": "object:599"
},
{
"input": {
"bypass": false,
"$cardContent": {
"document": {
"id": "5095ef25-c6a5-45c8-b562-cb8d2fd2cf36",
"type": "text/plain",
"textContent": "User input",
"content": "User input"
},
"editable": false,
"deletable": true,
"position": "right",
"editing": false
},
"$invalid": false,
"validation": { "rule": "text", "error": "Enter a inactivity time" }
},
"$invalid": false,
"$$hashKey": "object:600"
}
],
"$conditionOutputs": [
{
"stateId": "3261aaaa-60a9-41db-99b7-76043bb70137",
"$connId": "con_18",
"$id": "32fe6f8a-dfe1-4241-94d6-542f3a584e1c",
"conditions": [
{
"source": "input",
"comparison": "equals",
"values": ["Sim"],
"$$hashKey": "object:837"
}
],
"$invalid": false,
"$$hashKey": "object:815"
},
{
"stateId": "319aa377-2f49-46aa-84a3-1383fd1d55d5",
"$connId": "con_23",
"$id": "b4057319-4064-47e2-9753-8045f6c15770",
"conditions": [
{
"source": "input",
"comparison": "equals",
"values": ["Não"],
"$$hashKey": "object:860"
}
],
"$invalid": false,
"$$hashKey": "object:816"
}
],
"$enteringCustomActions": [
{
"$id": "e4472eaa-889b-4422-b44f-2ee48238dbd3",
"type": "ProcessHttp",
"$title": "Process HTTP",
"$invalid": false,
"settings": {
"headers": { "accept": "text/json" },
"method": "GET",
"uri": "https://viacep.com.br/ws/{{cep}}/json/",
"responseStatusVariable": "status",
"responseBodyVariable": "cepResponse"
},
"conditions": []
}
],
"$leavingCustomActions": [],
"$inputSuggestions": ["Sim", "Não"],
"$defaultOutput": { "stateId": "fallback", "$invalid": false },
"$tags": [],
"id": "6373939c-28f9-4cd6-a08b-60576c00f8da",
"root": false,
"$title": "fetchCep",
"$position": { "top": "27px", "left": "724px" },
"$invalidContentActions": false,
"$invalidOutputs": false,
"$invalidCustomActions": false,
"$invalid": false
},
"3261aaaa-60a9-41db-99b7-76043bb70137": {
"$contentActions": [
{
"action": {
"$id": "9a3fe9ab-61a1-4ec9-a710-7bcba60b74fb",
"type": "SendMessage",
"settings": {
"id": "6077edc0-9815-4b8b-85de-4dc6b3d53ecc",
"type": "application/vnd.lime.chatstate+json",
"content": { "state": "composing", "interval": 1000 }
},
"$cardContent": {
"document": {
"id": "6077edc0-9815-4b8b-85de-4dc6b3d53ecc",
"type": "application/vnd.lime.chatstate+json",
"content": { "state": "composing", "interval": 1000 }
},
"editable": true,
"deletable": true,
"position": "left"
}
},
"$invalid": false
},
{
"action": {
"$id": "5b2fb7f6-1a80-4c28-a9be-71d3fcbbad72",
"type": "SendMessage",
"settings": {
"id": "5b10ca88-e944-4af0-aeac-8c9504ca3b77",
"type": "text/plain",
"content": "Informe seu CEP, por favor",
"metadata": {}
},
"$cardContent": {
"document": {
"id": "5b10ca88-e944-4af0-aeac-8c9504ca3b77",
"type": "text/plain",
"content": "Informe seu CEP, por favor"
},
"editable": true,
"deletable": true,
"position": "left"
}
},
"$invalid": false
},
{
"input": {
"bypass": false,
"$cardContent": {
"document": {
"id": "12b8f82d-05d5-4e32-90c1-050a4655d919",
"type": "text/plain",
"textContent": "User input",
"content": "cep"
},
"editable": false,
"deletable": true,
"position": "right",
"editing": false
},
"$invalid": false,
"variable": "cep",
"validation": {
"rule": "regex",
"regex": "\\d{5}\\-?\\d{3}",
"error": "Por favor, informe um CEP válido"
}
},
"$invalid": false
}
],
"$conditionOutputs": [
{
"stateId": "6373939c-28f9-4cd6-a08b-60576c00f8da",
"$connId": "con_28",
"$id": "55027b58-fe41-4106-9c0b-f19a30645126",
"conditions": [
{ "source": "input", "comparison": "exists", "values": [] }
],
"$invalid": false
}
],
"$enteringCustomActions": [],
"$leavingCustomActions": [],
"$inputSuggestions": [],
"$defaultOutput": { "stateId": "fallback", "$invalid": false },
"$tags": [],
"id": "3261aaaa-60a9-41db-99b7-76043bb70137",
"root": false,
"$title": "askCep",
"$position": { "top": "218px", "left": "883px" },
"$invalidContentActions": false,
"$invalidOutputs": false,
"$invalidCustomActions": false,
"$invalid": false
},
"319aa377-2f49-46aa-84a3-1383fd1d55d5": {
"$contentActions": [
{
"action": {
"$id": "79d5127f-6f79-4d3e-8e3c-e1f685b489f2",
"type": "SendMessage",
"settings": {
"id": "f87e66e3-2af1-46a3-bba4-31bced5d28ca",
"type": "application/vnd.lime.chatstate+json",
"content": { "state": "composing", "interval": 1000 }
},
"$cardContent": {
"document": {
"id": "f87e66e3-2af1-46a3-bba4-31bced5d28ca",
"type": "application/vnd.lime.chatstate+json",
"content": { "state": "composing", "interval": 1000 }
},
"editable": true,
"deletable": true,
"position": "left"
}
},
"$invalid": false
},
{
"action": {
"$id": "7283e51e-127e-4da8-b81a-7d47cbe590cc",
"type": "SendMessage",
"settings": {
"id": "b01de6ac-82a1-45f3-ad9d-99a97183f871",
"type": "text/plain",
"content": "Obrigado!",
"metadata": {}
},
"$cardContent": {
"document": {
"id": "b01de6ac-82a1-45f3-ad9d-99a97183f871",
"type": "text/plain",
"content": "Obrigado!"
},
"editable": true,
"deletable": true,
"position": "left"
}
},
"$invalid": false
},
{
"input": {
"bypass": false,
"$cardContent": {
"document": {
"id": "d0a531e7-76c8-41e4-9f0d-c28386b369f1",
"type": "text/plain",
"textContent": "User input",
"content": "User input"
},
"editable": false,
"deletable": true,
"position": "right",
"editing": false
},
"$invalid": false,
"validation": { "rule": "text", "error": "Enter a inactivity time" }
},
"$invalid": false
}
],
"$conditionOutputs": [
{
"stateId": "welcome",
"$connId": "con_33",
"$id": "b4d579d6-4268-4862-85b7-059285e0ac91",
"conditions": [
{ "source": "input", "comparison": "exists", "values": [] }
],
"$invalid": false
}
],
"$enteringCustomActions": [],
"$leavingCustomActions": [],
"$inputSuggestions": [],
"$defaultOutput": { "stateId": "fallback", "$invalid": false },
"$tags": [],
"id": "319aa377-2f49-46aa-84a3-1383fd1d55d5",
"root": false,
"$title": "Goodbye",
"$position": { "top": "27px", "left": "413px" },
"$invalidContentActions": false,
"$invalidOutputs": false,
"$invalidCustomActions": false,
"$invalid": false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment