Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
211 lines (211 sloc) 9.12 KB
{
"formatVersion": "2.6",
"exportDate": 1532431649390,
"actionSequence": {
"name": "Add Action to Worcade chat",
"description": "This Action Sequence adds the latest addition to the TOPdesk Action field (progress trail) to the (already linked) Worcade conversation. To automatically update the Worcade chat with a new addition to the TOPdesk progress trail.",
"structureName": "incident1",
"configuration": {
"variables": [
{
"name": "worcadeApiKey",
"value": ""
},
{
"name": "urlTOPdesk",
"value": ""
},
{
"name": "urlWorcade",
"value": ""
},
{
"name": "loginTOPdesk",
"value": ""
},
{
"name": "passwordTOPdesk",
"value": ""
}
],
"mappingDefinitions": [],
"steps": [
{
"name": "loginToOwnTOPdesk_5",
"method": "GET",
"url": "${_variables.urlTOPdesk?no_esc}/tas/rest/login",
"headers": [
{
"name": "Authorization",
"value": "Basic ${_base64(_variables. loginTOPdesk+':'+_variables. passwordTOPdesk)}"
}
],
"escapeBodyValues": true,
"body": "",
"executionCondition": "ONLY_WHEN_PREVIOUS_SUCCEEDED",
"customExecutionCondition": ""
},
{
"name": "getWorcadeIdentity_5",
"method": "GET",
"url": "${_variables.urlTOPdesk?no_esc}/tas/rest/api/worcade/identity",
"headers": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Authorization",
"value": "TOKEN id=\"${_responses.loginToOwnTOPdesk_5.body}\""
},
{
"name": "Accept",
"value": "application/json"
}
],
"escapeBodyValues": true,
"body": "",
"executionCondition": "ONLY_WHEN_PREVIOUS_SUCCEEDED",
"customExecutionCondition": ""
},
{
"name": "startWorcadeHandshake",
"method": "GET",
"url": "${_variables.urlWorcade?no_esc}/api/v2/authentication/application/${_responses.getWorcadeIdentity_5.body.reference}/handshake",
"headers": [
{
"name": "Worcade-ApiKey",
"value": "${_variables. worcadeApiKey}"
}
],
"escapeBodyValues": true,
"body": "",
"executionCondition": "ONLY_WHEN_PREVIOUS_SUCCEEDED",
"customExecutionCondition": ""
},
{
"name": "decryptEncryptDigest_5",
"method": "POST",
"url": "${_variables.urlTOPdesk?no_esc}/tas/rest/api/worcade/handshake",
"headers": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Authorization",
"value": "TOKEN id=\"${_responses.loginToOwnTOPdesk_5.body}\" "
},
{
"name": "Accept",
"value": "application/json"
}
],
"escapeBodyValues": true,
"body": "{\"digest\":\"${_responses.startWorcadeHandshake.body.data.digest}\"}",
"executionCondition": "ONLY_WHEN_PREVIOUS_SUCCEEDED",
"customExecutionCondition": ""
},
{
"name": "confirmWorcadeHandshake",
"method": "POST",
"url": "${_variables.urlWorcade?no_esc}/api/v2/authentication/application/${_responses.getWorcadeIdentity_5.body.reference}/session",
"headers": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Worcade-ApiKey",
"value": "${_variables. worcadeApiKey}"
}
],
"escapeBodyValues": true,
"body": "{\"digest\":\"${_responses.decryptEncryptDigest_5.body.digest}\"}",
"executionCondition": "ONLY_WHEN_PREVIOUS_SUCCEEDED",
"customExecutionCondition": ""
},
{
"name": "getWorcadeUserId",
"method": "GET",
"url": "${_variables.urlWorcade?no_esc}/api/v2/search/remoteId?remoteId=${(_progresstrail.actions_visible?first.operator.id)!}&remoteIdType=operatorUnid",
"headers": [
{
"name": "Worcade-ApiKey",
"value": "${_variables. worcadeApiKey}"
},
{
"name": "Worcade-Application",
"value": "DIGEST ${_responses.confirmWorcadeHandshake.body.data.token}"
}
],
"escapeBodyValues": true,
"body": "",
"executionCondition": "ONLY_WHEN_PREVIOUS_SUCCEEDED",
"customExecutionCondition": ""
},
{
"name": "addMessageToWorcadeConversation",
"method": "POST",
"url": "${_variables.urlWorcade?no_esc}/api/v2/conversation/${externalcode!}/content/message",
"headers": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Worcade-ApiKey",
"value": "${_variables. worcadeApiKey}"
},
{
"name": "Worcade-Application",
"value": "DIGEST ${_responses.confirmWorcadeHandshake.body.data.token}"
},
{
"name": "Worcade-User",
"value": "${(_responses.getWorcadeUserId.body.data[0].id)!}"
}
],
"escapeBodyValues": true,
"body": "{\"text\": \"${_progresstrail.actions_visible?first.plaintext}\"}",
"executionCondition": "ONLY_WHEN_PREVIOUS_SUCCEEDED",
"customExecutionCondition": ""
},
{
"name": "logoutWorcadeApplication",
"method": "DELETE",
"url": "${_variables.urlWorcade?no_esc}/api/v2/authentication/application",
"headers": [
{
"name": "Worcade-ApiKey",
"value": "${_variables. worcadeApiKey}"
},
{
"name": "Worcade-Application",
"value": "DIGEST ${_responses.confirmWorcadeHandshake.body.data.token}"
}
],
"escapeBodyValues": true,
"body": "",
"executionCondition": "ONLY_WHEN_PREVIOUS_SUCCEEDED",
"customExecutionCondition": ""
},
{
"name": "logoutTOPdeskOperator_5",
"method": "GET",
"url": "${_variables.urlTOPdesk?no_esc}/tas/rest/logout",
"headers": [
{
"name": "Authorization",
"value": "TOKEN id=\"${_responses.loginToOwnTOPdesk_5.body}\""
}
],
"escapeBodyValues": true,
"body": "",
"executionCondition": "ONLY_WHEN_PREVIOUS_SUCCEEDED",
"customExecutionCondition": ""
}
]
}
}
}
You can’t perform that action at this time.