/[Target] Web SDK sendEvent doesn’t update Recommendations entity attributes when using AEP prefetch mode
Entity attributes sent via a standalone alloy("sendEvent", ...) call don’t update when using the AEP Web SDK, despite the request succeeding and appearing in the debugger.
Description description
Environment
Adobe Experience Platform Web SDK, Adobe Target (Recommendations)
Issue/Symptoms
When using the AEP Web SDK, executing a standalone alloy("sendEvent", ...) call on the page doesn’t update the corresponding entity attributes, even though the call succeeds and appears in the debugger.
"data": {
"__adobe": {
"target": {
"entity.id": "SKU-00001-LARGE",
"entity.categoryId": "clothing,shirts",
"entity.customEntity": "some value",
"cartIds": "SKU-00002,SKU-00003",
"excludedIds": "SKU-00001-SMALL"
}
}
}
Cause
In the current Target prefetch mode architecture, including the data object in the sendEvent command doesn’t send the data to Target.
The data object is sent only when you fetch content from Target using a decisionScope or when you send a display or interact proposition notification through sendEvent.
Resolution resolution
To fix this issue, follow these steps:
Method 1: Send entity parameters as part of a Target decision call
Learn more about sending the data object through a Target decision call in the Special parameters and the data object section of the Web SDK tutorial.
To populate the data object, create the following data element, reusing data elements created in the Create data elements lesson:
- Open the tag rule
product detail pages - adobeDataLayer push - set product details variables - 20. - Add a new Action.
- Select the Adobe Experience Platform Web SDK extension.
- Select Action Type as Update variable.
- Select
Data Variableas the Data element. - Select the target object.
- Set
entity.idas theEcommerce Product Iddata element. - Set
entity.nameas theEcommerce Product Namedata element. - Set
user.categoryIdas theEcommerce Product Categorydata element. - Select Keep Changes.
- Select Save.
Method 2: Use the Recommendations Entities API or feeds to update the catalog directly.