The custom-activity-deskapi-node example application helpfully demonstrates how two Custom Activites can be used to pass outArguments
from one 'create-case' Custom Activity:
"outArguments": [
{ "caseID":"number" }
]
To another 'update-case' Custom Activity in the Interaction as an inArgument:
inArguments":[
"caseID":"{{Interaction.__your-activity-customer-key__.caseID}}" }
]
This works well and I want to achieve something similar, but instead of using two Custom Activities, I would like to just use one.
Continuing with the scenario provided in this example application, let's say you want to create a case using the selected caseId
value when a Contact reaches the Custom Activity in an Interaction. In order to achieve this, the config.json file would need to look something like this:
"arguments": {
"execute": {
"inArguments":[
{ "firstName":"{{Contact.Attribute.__your-de-name__.FirstName}}"},
{ "lastName":"{{Contact.Attribute.__your-de-name__.LastName}}"},
{ "emailAddress": "{{Contact.Default.Email}}"},
{ "caseID":"{{Interaction.__your-activity-customer-key__.caseID}}" }
],
"outArguments": [
{ "caseID":"number" }
],
"url": "https://__insert_your_custom_activity_endpoint__/ixn/activities/create-case/execute/",
"verb": "POST",
"body": "",
"header": "",
"format": "json",
"useJwt": false,
"timeout": 10000
}
}
Is this actually possible or supported? That is, can you define an outArgument
in a Custom Activity, then use that value as an inArgument
(using the Interaction context) within the same Activity?