I'm having an issue with chaining two Custom Journey Builder Activities together.
In my first activity I have
outArguments
"outArguments": [{
"PUSH_TOKEN_ID": "",
"PUSH_DATE": "",
"PUSH_SEGMENT_NAME": ""
}],
Schema
"schema": {
"arguments": {
"execute": {
"outArguments": [{
"PUSH_TOKEN_ID": {
"dataType": "text",
"isNullable": false,
"direction": "out",
"access": "visible"
}
},
{
"PUSH_DATE": {
"dataType": "date",
"isNullable": false,
"direction": "out",
"access": "visible"
}
},
{
"PUSH_SEGMENT_NAME": {
"dataType": "text",
"isNullable": false,
"direction": "out",
"access": "visible"
}
}
]
}
}
}
And in my second activity I have as part of my schema:
"schema": {
"arguments": {
"execute": {
"inArguments": [{
"PUSH_DATE": {
"dataType": "date",
"isNullable": false,
"direction": "in",
}
},
{
"PUSH_SEGMENT_NAME": {
"dataType": "text",
"isNullable": false,
"direction": "in",
}
},
{
"PUSH_TOKEN_ID": {
"dataType": "text",
"isNullable": false,
"direction": "in",
}
}]
}
}
The issue I'm having with this is when I try and add the values from the first activity in the second activity and try and "Test" or "Activate" then I get the error
Activity REST-2 of type REST has an argument PUSH_TOKEN_ID which is not a valid argument Activity REST-2 of type REST has an argument PUSH_DATE which is not a valid argument Activity REST-2 of type REST has an argument PUSH_SEGMENT_NAME which is not a valid argument
Can anyone tell me what the issue could be?
Part 2
for(var i = 0; i < schema.schema.length; i++)
{
if(schema.schema[i].access != "Hidden")
{
var fieldKey = schema.schema[i].key;
var argName = fieldKey.split('.')[2];
toJbPayload['arguments'].execute.inArguments[0][argName] = "{{" + fieldKey + "}}";
}
}