...
[
{
"log": "bridge_uuid: ${bridge_uuid}"
},
{
"if": {
"expression": "!${bridge_uuid}",
"then": [
{
"log": "Create an activity"
},
{
"httpRequest": {
"url": "https://006189-sales-team.bpmonline.com/ServiceModel/AuthService.svc/Login",
"method": "POST",
"timeout": 3000,
"exportCookie": "my_cookie",
"headers": {
"Content-Type": "application/json"
},
"data": {
"UserName": "Demo Study",
"UserPassword": "[email protected]"
}
}
},
{
"string": {
"data": "${my_cookie}",
"fn": "replace",
"setVar": "BPMCSRF",
"args": [
"/.*BPMCSRF=([\\s\\S]*?);(.*)?-._A-Za-z0-9\/]{22});/",
"$1"
]
}
},
{
"httpRequest": {
"url": "https://006189-sales-team.bpmonline.com/0/dataservice/json/reply/InsertQuery",
"method": "POST",
"timeout": 2000,
"exportCookie": "",
"headers": {
"Cookie": "${my_cookie}",
"BPMCSRF": "${BPMCSRF}",
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json"
},
"data": {
"ColumnValues": {
"Items": {
"ActivityCategory": {
"ExpressionType": 2,
"Parameter": {
"DataValueType": 0,
"Value": "E52BD583-7825-E011-8165-00155D043204"
}
},
"RemindToOwner": {
"ExpressionType": 2,
"Parameter": {
"DataValueType": 12,
"Value": true
}
},
"Title": {
"ExpressionType": 2,
"Parameter": {
"DataValueType": 1,
"Value": "Не отвечен звонок с номера ${caller_id_number}"
}
},
"Type": {
"ExpressionType": 2,
"Parameter": {
"DataValueType": 0,
"Value": "E1831DEC-CFC0-DF11-B00F-001D60E938C6"
}
}
}
},
"OperationType": 1,
"RootSchemaName": "Activity"
}
}
}
]
}
}
]
...