Expand my Community achievements bar.

SOLVED

Difficulty Implementing "user.endpoint.lastPurchasedEntity" and Creating Cart Addition List in Web SDK via Tags

Avatar

Level 3

I am encountering challenges with the implementation of "user.endpoint.lastPurchasedEntity" using the Web SDK via tags in Adobe Target. My approach involves creating a new XDM (Experience Data Model) object and integrating it within a 'send event' function.

Within this XDM object in the 'send event', I am including several key elements:

  • 'priceTotal' and 'purchaseID' within the commerce field.
  • Setting the 'purchases' value to 1.
  • Integrating an identity map.
  • Adding 'productListItems'.
    ZvoidZ_3-1704736776181.png

     

Despite closely following the Adobe documentation (Adobe Experience League), I am not seeing the desired result. The 'lastPurchasedEntity' is not being reflected in the user profile as it did when I was using at.js, where parameters such as orderId, orderTotal, and productPurchasedId were passed effortlessly.

ZvoidZ_2-1704736744248.png

 

I would greatly appreciate any insights or advice on setting up these features correctly using the Web SDK.

Thank you very much for your assistance.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

My understanding is that the event will only be shared downstream to the Target service if it includes a value in the decisionScopes array. So the documentation looks like it might be misleading.

A code example would be:

 

alloy("sendEvent", {
  "xdm": {
    "commerce": {
      "order": {
        "purchaseID": "ABC123",
        "priceTotal": 1337.89
      },
      "purchases": {
        "value": 1
      }
    },
    "productListItems": [{
      "SKU": "SKU-00002"
    }]
  },
    decisionScopes: ["purchase"]
});

 

 
If you're configuring it via the tag manager then you would just need to ensure your sendEvent action has a decisionScopes value. I've tested this in my sandbox environment and I see the user.endpoint.lastPurchasedEntity parameter being populated as expected

View solution in original post

2 Replies

Avatar

Correct answer by
Employee Advisor

My understanding is that the event will only be shared downstream to the Target service if it includes a value in the decisionScopes array. So the documentation looks like it might be misleading.

A code example would be:

 

alloy("sendEvent", {
  "xdm": {
    "commerce": {
      "order": {
        "purchaseID": "ABC123",
        "priceTotal": 1337.89
      },
      "purchases": {
        "value": 1
      }
    },
    "productListItems": [{
      "SKU": "SKU-00002"
    }]
  },
    decisionScopes: ["purchase"]
});

 

 
If you're configuring it via the tag manager then you would just need to ensure your sendEvent action has a decisionScopes value. I've tested this in my sandbox environment and I see the user.endpoint.lastPurchasedEntity parameter being populated as expected

Avatar

Level 3

Hi Alex, you're absolutely right. I've been implementing this through tags and included the decisionScopes, but the user.endpoint.lastPurchasedEntity parameter still wasn't appearing for some reason. So, I created an activity with a code offer and used the value: ${user.endpoint.lastPurchasedEntity}. After this change, it started to populate correctly. Additionally, I found that even after deactivating the activity, it continued to function normally.

Thanks once again for your guidance!