Expand my Community achievements bar.

SOLVED

${user.endpoint.lastViewedEntity} is not returning any value

Avatar

Community Advisor

Hi Team,

 

I am trying to access the values of ${user.endpoint.lastViewedEntity}  but it is returning as blank.

 

The statement   that I have used in the Design is :

 #set ($offerids = "\${user.endpoint.lastViewedEntity}")

 

but $offerids is coming as blank.

 

https://experienceleague.adobe.com/docs/target/using/recommendations/recommendations-design/create-d...

 

The help doc advise to use in this manner but it is not driving me any results.

 

Any advise on this would be really helpful.

 

 

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@ambikaTewari_ATCI worked for me, I just used recently viewed criteria. below is the design block i used.

 

#set ($offerids = "\${user.endpoint.lastViewedEntity}")

<h1>First: $offerids </h1>
<h2> second: $entity1.id </h2>

 

 

mboxtrace output screenshot, h1 contains the code

nnakirikanti_0-1679077920182.png

 

Share your implementation details to understand the gap.

View solution in original post

3 Replies

Avatar

Community Advisor

@ambikaTewari_ATCI : Few things to verify what's happening 

1) implemented entity parameters like these based on page types https://experienceleague.adobe.com/docs/target/using/recommendations/entities/entity-attributes.html...  then move to next.

2) In the same link you have below snippet, add and check to confirm that new visitor or returning visitor.

user.isFirstSession": "\${user.isFirstSession}

 3) if new visitor or returning visitor and have not visited any of the page where entity parameters are not passed then you wont get this value.

4) Use mboxtrace for at.js and AEP debugger with edge transactions to verify that this valued get in initialized as soon as you visit the pages where entity details are passed to target. 

 

Let me know if you need further assistance on this.

Avatar

Community Advisor

Hi @nnakirikanti  Thank you for your prompt reply.

 

1. Yes we have implemented entity.id param on our products pages

2. When I use 

user.isFirstSession": "\${user.isFirstSession}

, it comes as false

3. When I user mboTrace I could see values under user.endpoint.lastViewedEntity

user.endpoint.lastViewedEntity: {,…}

  1. modifiedAt: "2023-03-15T05:49:34.666-04:00"
  2. value: "{\n  \"entities\" : {\n    \"755\" : [ \"OFF-42427-NANSI\", \"OFF-66861-SELAK\", \"OFF-50975-DFWAP\", \"OFF-56693-ILPMD\", \"OFF-23130-NGOFJ\", \"OFF-68842-LAXRR\", \"OFF-37880-BRUSI\", \"OFF-64544-VIEAT\" ]\n  }\n}

 

Avatar

Correct answer by
Community Advisor

@ambikaTewari_ATCI worked for me, I just used recently viewed criteria. below is the design block i used.

 

#set ($offerids = "\${user.endpoint.lastViewedEntity}")

<h1>First: $offerids </h1>
<h2> second: $entity1.id </h2>

 

 

mboxtrace output screenshot, h1 contains the code

nnakirikanti_0-1679077920182.png

 

Share your implementation details to understand the gap.