Hi guys,
I'm trying to do the same as in at.js but in SDK with getOffer() and applyOffer() functions.
I need to reload the AT SDK library (interact) with all the experiences because one experience needs to reload the ‘view’ to launch another one. That is, in the first experience a profile parameter is launched, it must reload the same vita (i.e. reload AT) to be able to load the second experience.
This is the code I tried to do but it doesn't work:
alloy("sendEvent", {
"xdm": {},
"decisionScopes": ["__view__"],
})
.then(function (result) {
var propositions = result.propositions;
var resultProposition;
if (propositions) {
for (var i = 0; i < propositions.length; i++) {
var proposition = propositions[i];
if (proposition.scope === "__view__") {
resultProposition = proposition;
break;
}
}
}
if (resultProposition) {
alloy("applyPropositions", {
propositions: [resultProposition],
});
console.log('apply');
}
})
.catch(function (error) {
console.error("Error processing the offer:", error);
});
I am not clear about the information on:
https://experienceleague.adobe.com/en/docs/experience-platform/web-sdk/personalization/rendering-per...
Thanks in advance!
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Hi @PatriciaEs3 Are you able to resolve this?
If I understood correctly, then I think you are trying to achieve the first experience based on triggered profile parameter and then second experience will see .. means the "view" (or page ) re-load with updated offers based on the modified profile.
Is this understanding correct?
If this is correct then I would suggest below
1) Send an event to update the profile parameter.
2) Fetch updated decision using the sendEvent method.
3) Apply updated decision using applyPropositions
Hope this helps.
Hi @PatriciaEs3 Are you able to resolve this?
If I understood correctly, then I think you are trying to achieve the first experience based on triggered profile parameter and then second experience will see .. means the "view" (or page ) re-load with updated offers based on the modified profile.
Is this understanding correct?
If this is correct then I would suggest below
1) Send an event to update the profile parameter.
2) Fetch updated decision using the sendEvent method.
3) Apply updated decision using applyPropositions
Hope this helps.
Views
Likes
Replies