Hi!
I have a backend application that my user imports into his
Journey Builder
.
Before he
executes the messages he selects a field to be the subscriber key
.
I'm trying to read this field (subscriber key) on my backend application (which is using
postmonger
to communicate with SF). This is what I tried so far:
1. Inside my `config.json` file, I added this:
{
"workflowApiVersion": "1.1",
"metaData": {
"icon": "img/icon.png",
"category": "message"
},
"type": "REST",
"arguments": {
"execute": {
"inArguments": [{
// a bunch of fields
"subscriberKey": "{{Contact.Key}}"
}]
}
},
"configurationArguments": {...},
"schema": {
"arguments": {
"execute": {
// a bunch of fields
{
"subscriberKey": {
"dataType": "Text",
"isNullable": true,
"direction": "In"
}
}
}
}
}
}
My application is using JWT and is decoding it correctly. Even the oAuth is working flawless to execute and update Data Extensions. I just need that subscriberKey value.
This is what I receive on the token (after I decode it)
{
"decodedToken": {
"inArguments": [
// a bunch of fuilds
// No subscriberKey here
],
"outArguments": [],
"activityObjectID": "<uuid1>",
"journeyId": "<uuid2>",
"activityId": "<uuid1>",
"definitionInstanceId": "<uuid3>",
"activityInstanceId": "<uuid4>",
"keyValue": "<uuid5>",
"mode": 0
}
}
Unforunately it did not work.
Thanks for all the help!
Hi @Alan Naidon,
To retrieve the Subscriber Key in your backend activity, always read it from the keyValue field in the decoded JWT or request payload—as Journey Builder automatically includes it there.
Defining "subscriberKey": "{{Contact.Key}}" in inArguments is not reliable and doesn’t guarantee the value will arrive in your payload.
Similar threads:
https://salesforce.stackexchange.com/questions/180963/accessing-subscriber-profile-attribute-values-journey-builder-custom-activity
https://salesforce.stackexchange.com/questions/385787/get-journey-id-as-inargument-in-custom-activity
https://stackoverflow.com/questions/71864738/journey-builders-custom-activity-fetch-data-extension-data-in-bulk
https://salesforce.stackexchange.com/questions/317056/im-not-receiving-anyinarguments-that-involve-data-binding-with-custom-journey-b
https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/custom-activity-config.html
https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/using-postmongerThanks!