Expand my Community achievements bar.

Applications are now open to join the Adobe Journey Optimizer Champion Program. Apply by June 10!

how to use contextual attributes in creating a ranking formula

Avatar

Employee Advisor

Hi

I am trying to use contextual attributes like current temp in a ranking formula to assign ranking score to offers using offer decisioning. I am using AEP Tags to send event with contextual data  to AEP, and the event is being sent correctly. But I think the current temp value in the ranking formula is always null. The screenshot from AEP debugger shows the contextual data that is being sent from AEP Tags

 

workflowuser_0-1748898208831.png

 

4 Replies

Avatar

Community Advisor

@workflowuser Did you follow this documentation on how to use contextual data in offer decisioning?

https://experienceleague.adobe.com/en/docs/journey-optimizer/using/decisioning/experience-decisionin...

Thanks, Sathees

Avatar

Employee

yes, I have followed that documentation. I was able to select the context data in my formual ranking builder  if ( context.datastream.event.`305db7ad21287bf3e904ed956d6d8008526e5433b625e71d`._techmarketingdemos.temperature > 65, 100, 0 ).

The rule is not working as expected, as it is assigning a score of 0 to offers. That means the temperature field value is not being passed correctly 

Avatar

Community Advisor

@gbedekar I'm curious if you've tried with other contextual attributes like Humidity, city name, and so on. Is that working for you?

Thanks, Sathees

Avatar

Employee Advisor

To add to my earlier post - this the json of the subproposition in the response payload [ { "id": "a6a4f845-5689-4ee9-b0a7-9fb8d065c29f", "scope": "web://gbedekar489.github.io/weather/weather-offers.html#offerContainer", "scopeDetails": { "decisionProvider": "EXD", "correlationID": "c19b9b95-4f59-41a5-9a06-1c17d4807137-0", "strategies": [ { "strategyID": "76e59b04-4ebe-4049-8b07-c86dbdd11743", "step": "decisionPolicy" }, { "strategyID": "web://gbedekar489.github.io/weather/weather-offers.html#offerContainer", "step": "placement" } ], "rank": 1, "activity": { "id": "aa1c7e3f-b7b8-4a8a-8a9f-ee3c6de29071#540b7b32-62f1-4a38-a054-1b086c790339", "priority": 0, "matchedSurfaces": [ "web://gbedekar489.github.io/weather/weather-offers.html#offerContainer" ] } }, "items": [ { "id": "dps:bf60928836947ac5190436d927b7d280e0d113d30fcb529f:1ac21b679fddfd75", "etag": "5", "name": "Sunscreen", "score": 0, "itemSelection": { "selectionDetail": { "strategyID": "dps:selection-strategy:1ac26a13478abca9", "strategyName": "weather-offers-strategy", "selectionType": "selectionStrategy" }, "rankingDetail": { "strategyID": "dps:ranking-function:1ac23903366b5333", "step": "formula" } }, "token": "7KqrlPPCNGsO+bFF9OShxg" } ] } ]