Hi,
I am trying to access mbox parameter in profile script, for WebSDK implementation. Below is the code-
For triggering mbox in Target activity-
alloy("sendEvent", {
xdm: {
eventType: "decisioning.propositionDisplay",
_experience: {
decisioning: {
propositions: [{
scope: "test"
}]
}
}
},
data: {
action: "testing",
data: "recipe1"
}
});
In profile script-
if(mbox.name === 'test'){
return mbox.param('action') + mbox.param('data');
}
But I am not getting any value. I have enabled the response token as well. If anyone knows how to send adobe target mbox params in WebSDK, please let me know.
Thanks in advance!
Views
Replies
Total Likes
Hi @TNxx
have you tried putting your Target related mbox data into data.__adobe.target (mind the two underscores)
alloy("sendEvent", {
xdm: {
eventType: "decisioning.propositionDisplay",
_experience: {
decisioning: {
propositions: [{
scope: "test"
}]
}
}
},
data: {
__adobe: {
target: {
action: "testing",
data: "recipe1"
}
}
}
});
and to fetch it from there using your code to retrieve the data?
mbox.param('action') + mbox.param('data')
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi @TNxx So what I understood from your question that, you are trying to access mbox parameters in profile script right?
But ideally custom mbox parameters must be passed in XDM data with sendEvent command to be consumable by Target. And mbox parameters cannot be passed as part of the data object.
Check here https://experienceleague.adobe.com/en/docs/platform-learn/migrate-target-to-websdk/send-parameters
In case you want to send them in as profile attribute then use data.__adobe.target
Hops this helps.
Thanks.
Views
Replies
Total Likes
Views
Likes
Replies