Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

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

amberb67455123
Level 1
Level 1

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.

1 Accepted Solution
Gaurav_Singh
Correct answer by
Employee
Employee

@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.

View solution in original post

4 Replies
Gaurav_Singh
Correct answer by
Employee
Employee

@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.

View solution in original post

amberb67455123
Level 1
Level 1
@Gaurav_Singh 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!
Gaurav_Singh
Employee
Employee
Customer attributes can be referenced in profile scripts using format crs.get('<Datasource Name>.<Attribute name>'). Please try using this to create the profile script.
amberb67455123
Level 1
Level 1
@Gaurav_Singh That's exactly what I was looking for, and it solved my issue. Thanks so much!