{
    "tags": [
        {
            "name": "eng"
        }
    ],
    "editor": true,
    "type": "voice",
    "payload": "{\"id\":\"demo@0.1.0\",\"nodes\":{\"17\":{\"id\":17,\"data\":{\"extensions\":{\"tag\":\"17-start-custom-tag\"}},\"inputs\":{},\"outputs\":{\"out\":{\"connections\":[{\"node\":53,\"input\":\"in\",\"data\":{}}]}},\"position\":[-549,-140],\"name\":\"start\"},\"53\":{\"id\":53,\"data\":{\"all\":true,\"call\":{\"file\":{},\"name\":\"%(1000,6000,425);loops=-1\",\"type\":\"tone\"},\"hold\":{\"file\":{},\"name\":\"%(1000,6000,425);loops=-1\",\"type\":\"tone\"},\"transfer\":{\"file\":{},\"name\":\"%(1000,6000,425);loops=-1\",\"type\":\"tone\"},\"extensions\":{\"async\":false,\"break\":false,\"tag\":\"53-ringback-custom-tag\"}},\"inputs\":{\"in\":{\"connections\":[{\"node\":17,\"output\":\"out\",\"data\":{}}]}},\"outputs\":{\"out\":{\"connections\":[{\"node\":56,\"input\":\"in\",\"data\":{}}]}},\"position\":[-307.5519830777366,-146.26250661025912],\"name\":\"ringback\"},\"55\":{\"id\":55,\"data\":{\"data\":\"${caller_id_number}\",\"setVar\":\"reverted_caller_id_number\",\"fn\":\"reverse\",\"args\":[],\"extensions\":{\"async\":false,\"break\":false,\"tag\":\"55-string-custom-tag\"},\"set_var\":\"reverted_caller_id_number\"},\"inputs\":{\"in\":{\"connections\":[{\"node\":56,\"output\":\"out\",\"data\":{}}]}},\"outputs\":{\"out\":{\"connections\":[{\"node\":71,\"input\":\"in\",\"data\":{}}]}},\"position\":[159,-147],\"name\":\"string\"},\"56\":{\"id\":56,\"data\":{\"url\":\"https://example-service-enterprise.terrasoft.ua/ServiceModel/AuthService.svc/Login\",\"method\":\"POST\",\"timeout\":5000,\"insecureSkipVerify\":false,\"parser\":\"application/json\",\"responseCode\":\"http_response_code\",\"exportCookie\":\"my-cookie\",\"cacheCookie\":false,\"headers\":[{\"key\":\"Content-Type\",\"value\":\"application/json\"}],\"path\":[],\"data\":\"{\\n                \\\"UserName\\\": \\\"Supervisor\\\",\\n                \\\"UserPassword\\\": \\\"Supervisor\\\"\\n            }\",\"exportVariables\":[],\"extensions\":{\"async\":false,\"break\":false,\"tag\":\"56-httpRequest-custom-tag\"},\"export_cookie\":\"my_cookie\",\"export_variables\":[],\"insecure_skip_verify\":false,\"response_code\":\"http_response_code\"},\"inputs\":{\"in\":{\"connections\":[{\"node\":53,\"output\":\"out\",\"data\":{}}]}},\"outputs\":{\"out\":{\"connections\":[{\"node\":55,\"input\":\"in\",\"data\":{}}]}},\"position\":[-106.01830426523917,-129.02227594543257],\"name\":\"httpRequest\"},\"58\":{\"id\":58,\"data\":{\"url\":\"https://example-service-enterprise.terrasoft.ua/0/dataservice/json/reply/SelectQuery\",\"method\":\"POST\",\"timeout\":1000,\"insecureSkipVerify\":false,\"parser\":\"application/json\",\"responseCode\":\"http_response_code\",\"exportCookie\":\"my-cookie\",\"cacheCookie\":false,\"headers\":[{\"key\":\"Content-Type\",\"value\":\"application/json\"},{\"key\":\"Cookie\",\"value\":\"${my_cookie}\"},{\"key\":\"Accept\",\"value\":\"application/json;odata=verbose\"},{\"key\":\"BPMCSRF\",\"value\":\"${BPMCSRF}\"}],\"path\":[],\"data\":\"{\\n              \\\"QueryType\\\": 0,\\n              \\\"Columns\\\": {\\n                \\\"Items\\\": {\\n                  \\\"Name\\\": {\\n                    \\\"OrderDirection\\\": 0,\\n                    \\\"OrderPosition\\\": 0,\\n                    \\\"Caption\\\": null,\\n                    \\\"Expression\\\": {\\n                      \\\"ExpressionType\\\": 0,\\n                      \\\"ColumnPath\\\": \\\"Name\\\"\\n                    }\\n                  },\\n                  \\\"AccountName\\\": {\\n                    \\\"OrderDirection\\\": 0,\\n                    \\\"OrderPosition\\\": 0,\\n                    \\\"Caption\\\": null,\\n                    \\\"Expression\\\": {\\n                      \\\"ExpressionType\\\": 0,\\n                      \\\"ColumnPath\\\": \\\"[Account:Id:Account].Name\\\"\\n                    }\\n                  },\\n                  \\\"OwnerLogin\\\": {\\n                    \\\"OrderDirection\\\": 0,\\n                    \\\"OrderPosition\\\": 0,\\n                    \\\"Caption\\\": null,\\n                    \\\"Expression\\\": {\\n                      \\\"ExpressionType\\\": 0,\\n                      \\\"ColumnPath\\\": \\\"[WebitelUserData:WtelContact:Owner].Extension\\\"\\n                    }\\n                  },\\n                  \\\"OwnerId\\\": {\\n                    \\\"OrderDirection\\\": 0,\\n                    \\\"OrderPosition\\\": 0,\\n                    \\\"Caption\\\": null,\\n                    \\\"Expression\\\": {\\n                      \\\"ExpressionType\\\": 0,\\n                      \\\"ColumnPath\\\": \\\"Owner.Id\\\"\\n                    }\\n                  }\\n                }\\n              },\\n              \\\"AllColumns\\\": false,\\n              \\\"IsDistinct\\\": false,\\n              \\\"RowCount\\\": 1,\\n              \\\"Filters\\\": {\\n                \\\"FilterType\\\": 6,\\n                \\\"ComparisonType\\\": 0,\\n                \\\"LogicalOperation\\\": 0,\\n                \\\"IsNull\\\": true,\\n                \\\"IsEnabled\\\": true,\\n                \\\"IsNot\\\": false,\\n                \\\"Items\\\": {\\n                  \\\"FilterByPhone\\\": {\\n                    \\\"FilterType\\\": 1,\\n                    \\\"ComparisonType\\\": 9,\\n                    \\\"LogicalOperation\\\": 0,\\n                    \\\"IsNull\\\": true,\\n                    \\\"IsEnabled\\\": true,\\n                    \\\"IsNot\\\": false,\\n                    \\\"LeftExpression\\\": {\\n                      \\\"ExpressionType\\\": 0,\\n                      \\\"ColumnPath\\\": \\\"[ContactCommunication:Contact].SearchNumber\\\"\\n                    },\\n                    \\\"RightExpression\\\": {\\n                      \\\"ExpressionType\\\": 2,\\n                      \\\"ColumnPath\\\": null,\\n                      \\\"Parameter\\\": {\\n                        \\\"DataValueType\\\": 1,\\n                        \\\"Value\\\": \\\"${reverted_caller_id_number}\\\"\\n                      }\\n                    }\\n                  }\\n                }\\n              },\\n              \\\"RootSchemaName\\\": \\\"Contact\\\",\\n              \\\"OperationType\\\": 0\\n}\",\"exportVariables\":[{\"key\":\"Name\",\"value\":\"rows.0.Name\"},{\"key\":\"owner_caller_id_number\",\"value\":\"rows.0.OwnerLogin\"}],\"extensions\":{\"async\":false,\"break\":false,\"tag\":\"58-httpRequest-custom-tag\"},\"export_cookie\":\"my-cookie\",\"export_variables\":[{\"key\":\"Name\",\"value\":\"rows.0.Name\"},{\"key\":\"owner_caller_id_number\",\"value\":\"rows.0.OwnerLogin\"}],\"insecure_skip_verify\":false,\"response_code\":\"http_response_code\"},\"inputs\":{\"in\":{\"connections\":[{\"node\":71,\"output\":\"out\",\"data\":{}}]}},\"outputs\":{\"out\":{\"connections\":[{\"node\":59,\"input\":\"in\",\"data\":{}}]}},\"position\":[-531.0916940079434,35.006043861163874],\"name\":\"httpRequest\"},\"59\":{\"id\":59,\"data\":{\"set\":[{\"key\":\"continue_on_fail\",\"value\":\"true\"},{\"key\":\"hangup_after_bridge\",\"value\":\"true\"},{\"key\":\"ignore_early_media\",\"value\":\"true\"}],\"extensions\":{\"async\":false,\"break\":false,\"tag\":\"59-set-custom-tag\"}},\"inputs\":{\"in\":{\"connections\":[{\"node\":58,\"output\":\"out\",\"data\":{}}]}},\"outputs\":{\"out\":{\"connections\":[{\"node\":61,\"input\":\"in\",\"data\":{}}]}},\"position\":[-296.3519882179676,96.36892488954345],\"name\":\"set\"},\"61\":{\"id\":61,\"data\":{\"expression\":\"${owner_caller_id_number}\",\"extensions\":{\"async\":false,\"break\":false,\"tag\":\"61-if-custom-tag\"}},\"inputs\":{\"in\":{\"connections\":[{\"node\":59,\"output\":\"out\",\"data\":{}}]}},\"outputs\":{\"then\":{\"connections\":[{\"node\":62,\"input\":\"in\",\"data\":{}}]},\"else\":{\"connections\":[]},\"out\":{\"connections\":[{\"node\":66,\"input\":\"in\",\"data\":{}}]}},\"position\":[-29,131.5],\"name\":\"if\"},\"62\":{\"id\":62,\"data\":{\"strategy\":\"\",\"endpoints\":[{\"extension\":\"${owner_caller_id_number}\",\"idle\":true,\"parameters\":[],\"type\":\"user\"}],\"parameters\":[],\"extensions\":{\"async\":false,\"break\":false,\"tag\":\"62-bridge-custom-tag\"}},\"inputs\":{\"in\":{\"connections\":[{\"node\":61,\"output\":\"then\",\"data\":{}}]}},\"outputs\":{\"out\":{\"connections\":[]}},\"position\":[188,145.5],\"name\":\"bridge\"},\"66\":{\"id\":66,\"data\":{\"strategy\":\"\",\"endpoints\":[{\"extension\":\"205\",\"idle\":true,\"parameters\":[],\"type\":\"user\"}],\"parameters\":[],\"extensions\":{\"async\":false,\"break\":false,\"tag\":\"66-bridge-custom-tag\"}},\"inputs\":{\"in\":{\"connections\":[{\"node\":61,\"output\":\"out\",\"data\":{}}]}},\"outputs\":{\"out\":{\"connections\":[{\"node\":67,\"input\":\"in\",\"data\":{}}]}},\"position\":[192,307.5],\"name\":\"bridge\"},\"67\":{\"id\":67,\"data\":{\"hangup\":\"NORMAL_CLEARING\",\"extensions\":{\"async\":false,\"break\":false,\"tag\":\"67-hangup-custom-tag\"}},\"inputs\":{\"in\":{\"connections\":[{\"node\":66,\"output\":\"out\",\"data\":{}}]}},\"outputs\":{\"out\":{\"connections\":[]}},\"position\":[385.9968300690592,348.4822257443677],\"name\":\"hangup\"},\"71\":{\"id\":71,\"data\":{\"data\":\"return ${my_cookie}.replace(/.*BPMCSRF=([-._A-Za-z0-9/]{22});.*/, '$1')\",\"setVar\":\"\",\"extensions\":{\"async\":false,\"break\":false,\"tag\":\"71-js-custom-tag\"},\"set_var\":\"BPMCSRF\"},\"inputs\":{\"in\":{\"connections\":[{\"node\":55,\"output\":\"out\",\"data\":{}}]}},\"outputs\":{\"out\":{\"connections\":[{\"node\":58,\"input\":\"in\",\"data\":{}}]}},\"position\":[395.4962328541334,-120.49224384674393],\"name\":\"js\"}}}",
    "schema": "[\n    {\n        \"async\": false,\n        \"break\": false,\n        \"ringback\": {\n            \"all\": true,\n            \"call\": {\n                \"file\": {},\n                \"name\": \"%(1000,6000,425);loops=-1\",\n                \"type\": \"tone\"\n            },\n            \"hold\": {\n                \"file\": {},\n                \"name\": \"%(1000,6000,425);loops=-1\",\n                \"type\": \"tone\"\n            },\n            \"transfer\": {\n                \"file\": {},\n                \"name\": \"%(1000,6000,425);loops=-1\",\n                \"type\": \"tone\"\n            }\n        },\n        \"tag\": \"53-ringback-custom-tag\"\n    },\n    {\n        \"async\": false,\n        \"break\": false,\n        \"httpRequest\": {\n            \"cacheCookie\": false,\n            \"data\": {\n                \"UserName\": \"Supervisor\",\n                \"UserPassword\": \"Supervisor\"\n            },\n            \"exportCookie\": \"my-cookie\",\n            \"exportVariables\": {},\n            \"export_cookie\": \"my_cookie\",\n            \"export_variables\": [],\n            \"headers\": {\n                \"Content-Type\": \"application/json\"\n            },\n            \"insecureSkipVerify\": false,\n            \"insecure_skip_verify\": false,\n            \"method\": \"POST\",\n            \"parser\": \"application/json\",\n            \"path\": {},\n            \"responseCode\": \"http_response_code\",\n            \"response_code\": \"http_response_code\",\n            \"timeout\": 5000,\n            \"url\": \"https://example-service-enterprise.terrasoft.ua/ServiceModel/AuthService.svc/Login\"\n        },\n        \"tag\": \"56-httpRequest-custom-tag\"\n    },\n    {\n        \"async\": false,\n        \"break\": false,\n        \"string\": {\n            \"args\": [],\n            \"data\": \"${caller_id_number}\",\n            \"fn\": \"reverse\",\n            \"setVar\": \"reverted_caller_id_number\",\n            \"set_var\": \"reverted_caller_id_number\"\n        },\n        \"tag\": \"55-string-custom-tag\"\n    },\n    {\n        \"async\": false,\n        \"break\": false,\n        \"js\": {\n            \"data\": \"return ${my_cookie}.replace(/.*BPMCSRF=([-._A-Za-z0-9/]{22});.*/, '$1')\",\n            \"setVar\": \"\",\n            \"set_var\": \"BPMCSRF\"\n        },\n        \"tag\": \"71-js-custom-tag\"\n    },\n    {\n        \"async\": false,\n        \"break\": false,\n        \"httpRequest\": {\n            \"cacheCookie\": false,\n            \"data\": {\n                \"AllColumns\": false,\n                \"Columns\": {\n                    \"Items\": {\n                        \"AccountName\": {\n                            \"Caption\": null,\n                            \"Expression\": {\n                                \"ColumnPath\": \"[Account:Id:Account].Name\",\n                                \"ExpressionType\": 0\n                            },\n                            \"OrderDirection\": 0,\n                            \"OrderPosition\": 0\n                        },\n                        \"Name\": {\n                            \"Caption\": null,\n                            \"Expression\": {\n                                \"ColumnPath\": \"Name\",\n                                \"ExpressionType\": 0\n                            },\n                            \"OrderDirection\": 0,\n                            \"OrderPosition\": 0\n                        },\n                        \"OwnerId\": {\n                            \"Caption\": null,\n                            \"Expression\": {\n                                \"ColumnPath\": \"Owner.Id\",\n                                \"ExpressionType\": 0\n                            },\n                            \"OrderDirection\": 0,\n                            \"OrderPosition\": 0\n                        },\n                        \"OwnerLogin\": {\n                            \"Caption\": null,\n                            \"Expression\": {\n                                \"ColumnPath\": \"[WebitelUserData:WtelContact:Owner].Extension\",\n                                \"ExpressionType\": 0\n                            },\n                            \"OrderDirection\": 0,\n                            \"OrderPosition\": 0\n                        }\n                    }\n                },\n                \"Filters\": {\n                    \"ComparisonType\": 0,\n                    \"FilterType\": 6,\n                    \"IsEnabled\": true,\n                    \"IsNot\": false,\n                    \"IsNull\": true,\n                    \"Items\": {\n                        \"FilterByPhone\": {\n                            \"ComparisonType\": 9,\n                            \"FilterType\": 1,\n                            \"IsEnabled\": true,\n                            \"IsNot\": false,\n                            \"IsNull\": true,\n                            \"LeftExpression\": {\n                                \"ColumnPath\": \"[ContactCommunication:Contact].SearchNumber\",\n                                \"ExpressionType\": 0\n                            },\n                            \"LogicalOperation\": 0,\n                            \"RightExpression\": {\n                                \"ColumnPath\": null,\n                                \"ExpressionType\": 2,\n                                \"Parameter\": {\n                                    \"DataValueType\": 1,\n                                    \"Value\": \"${reverted_caller_id_number}\"\n                                }\n                            }\n                        }\n                    },\n                    \"LogicalOperation\": 0\n                },\n                \"IsDistinct\": false,\n                \"OperationType\": 0,\n                \"QueryType\": 0,\n                \"RootSchemaName\": \"Contact\",\n                \"RowCount\": 1\n            },\n            \"exportCookie\": \"my-cookie\",\n            \"exportVariables\": {\n                \"Name\": \"rows.0.Name\",\n                \"owner_caller_id_number\": \"rows.0.OwnerLogin\"\n            },\n            \"export_cookie\": \"my-cookie\",\n            \"export_variables\": [\n                {\n                    \"key\": \"Name\",\n                    \"value\": \"rows.0.Name\"\n                },\n                {\n                    \"key\": \"owner_caller_id_number\",\n                    \"value\": \"rows.0.OwnerLogin\"\n                }\n            ],\n            \"headers\": {\n                \"Accept\": \"application/json;odata=verbose\",\n                \"BPMCSRF\": \"${BPMCSRF}\",\n                \"Content-Type\": \"application/json\",\n                \"Cookie\": \"${my_cookie}\"\n            },\n            \"insecureSkipVerify\": false,\n            \"insecure_skip_verify\": false,\n            \"method\": \"POST\",\n            \"parser\": \"application/json\",\n            \"path\": {},\n            \"responseCode\": \"http_response_code\",\n            \"response_code\": \"http_response_code\",\n            \"timeout\": 1000,\n            \"url\": \"https://example-service-enterprise.terrasoft.ua/0/dataservice/json/reply/SelectQuery\"\n        },\n        \"tag\": \"58-httpRequest-custom-tag\"\n    },\n    {\n        \"async\": false,\n        \"break\": false,\n        \"set\": {\n            \"continue_on_fail\": \"true\",\n            \"hangup_after_bridge\": \"true\",\n            \"ignore_early_media\": \"true\"\n        },\n        \"tag\": \"59-set-custom-tag\"\n    },\n    {\n        \"async\": false,\n        \"break\": false,\n        \"if\": {\n            \"expression\": \"${owner_caller_id_number}\",\n            \"then\": [\n                {\n                    \"async\": false,\n                    \"break\": false,\n                    \"bridge\": {\n                        \"endpoints\": [\n                            {\n                                \"extension\": \"${owner_caller_id_number}\",\n                                \"idle\": true,\n                                \"parameters\": {},\n                                \"type\": \"user\"\n                            }\n                        ],\n                        \"parameters\": {},\n                        \"strategy\": \"\"\n                    },\n                    \"tag\": \"62-bridge-custom-tag\"\n                }\n            ]\n        },\n        \"tag\": \"61-if-custom-tag\"\n    },\n    {\n        \"async\": false,\n        \"break\": false,\n        \"bridge\": {\n            \"endpoints\": [\n                {\n                    \"extension\": \"205\",\n                    \"idle\": true,\n                    \"parameters\": {},\n                    \"type\": \"user\"\n                }\n            ],\n            \"parameters\": {},\n            \"strategy\": \"\"\n        },\n        \"tag\": \"66-bridge-custom-tag\"\n    },\n    {\n        \"async\": false,\n        \"break\": false,\n        \"hangup\": \"NORMAL_CLEARING\",\n        \"tag\": \"67-hangup-custom-tag\"\n    }\n]",
    "id": "1618",
    "createdAt": "1710798123805",
    "createdBy": {
        "id": "8864",
        "name": "John Smith"
    },
    "updatedAt": "1710798150149",
    "updatedBy": {
        "id": "8864",
        "name": "John Smith"
    },
    "name": "Route an incoming call to the responsible agent in Creatio"
}