How to display Offer to specific users
Hi,
I'm very new to Target Classic and have been searching the documentation for a solution to my question but with no luck.
What I need to do is serve a specific Offer depending on whether a custom mbox parameter value exists in an array of values.
So far, this is what I have:
1. Pass in my mbox parameter
2. Create 3 experiences and target a Custom Segment for each Offer. Each Custom Segment uses Visitor Behavior to check if my custom parameter is equal to a single value.
3. If the mbox parameter is equal to specific value then, show that Offer.
This all works right now, but I'm only checking against one unique value in each Offer. I need to compare the mbox parameter to an array of values for each Offer and if the value is found in the array then show that Offer.
I've tried creating Profile Attributes for each Offer, for example:
var offerBArray = [ '1','2','3' ];
if ( offerBArray.indexOf( profile.parameter2 ) != -1 ) {
return true;
} else {
return false;
}
Then setting the Visitor Behavior to this Custom Profile and checking if the value is true.
But this isn't working. I'm at my wits end. Could someone please help? Eventually, I would like to make it so that instead of hard coding the array of values, I can compare to the results of a SQL query. But, I'm not sure if that can be done.
Thank you,
Lawrence