Is it possible to use Customer Attributes data in recommendation criteria? | Community
Skip to main content
amberb67455123
June 1, 2021
Solved

Is it possible to use Customer Attributes data in recommendation criteria?

  • June 1, 2021
  • 1 reply
  • 1773 views

I've uploaded a file under People > Customer Attributes, which maps customer ID to a variable (called restrictedItemsCatalogId) containing a numeric value. I am trying to use this inside of recommendation criteria in order to filter out items from being shown to a given customer. How I'm envisioning this working is:

 

If restrictedItemsCatalogId on the product does not match restrictedItemsCatalogId on the user profile, include this item in the recommendation.

 

When I do a Target trace I can see the restrictedItemsCatalogId and value in the user profile data, however, when I try to include this variable (as it's shown in the trace) in inclusion rules inside the recommendation criteria it does not let me save the criteria. I am attempting to do this with Profile Attribute Matching.

 

So this question has two parts:

  1. Is this something Customer Attributes can be used for?
  2. If so, how can I access this data inside of the recommendation criteria?

I've looked through all the documentation I can find on Customer Attributes, but there doesn't seem to be much on what to do with it in Target once you've gotten the file uploaded.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Gaurav_Singh_02

@amberb67455123 the Profile Attribute Mapping dropdowns in recs only show profile.attributes and user.attributes , hence we cannot use customer attributes(crs.attributes) directly for inclusion rules in criteria.

 

One workaround would be to capture customer attribute data in user.attributes using profile script and then use it within criteria.

 

Hope this helps.

1 reply

Gaurav_Singh_02Adobe EmployeeAccepted solution
Adobe Employee
June 2, 2021

@amberb67455123 the Profile Attribute Mapping dropdowns in recs only show profile.attributes and user.attributes , hence we cannot use customer attributes(crs.attributes) directly for inclusion rules in criteria.

 

One workaround would be to capture customer attribute data in user.attributes using profile script and then use it within criteria.

 

Hope this helps.

amberb67455123
June 2, 2021
@gaurav_singh_02 That's great to know, thank you! I tried capturing that data in a profile script as well, but there must be an issue with the way I'm accessing the customer attribute data in the script because it won't let me activate the profile script. What I have inside the script is: return crs.1143339.restrictedItemsCatalogId; (which is what it shows up as when I do a Target trace). The error I get is "Your updates did not publish to Adobe's delivery network : Invalid script - Syntax or runtime error while executing script". If you have any ideas on how to get that profile script set up, I'd greatly appreciate it!