Expand my Community achievements bar.

Never miss an update of the Adobe Journey Optimizer Community Lens! Subscribe now to get the latest updates, insights, and highlights delivered straight to your inbox every time a new edition drops.
SOLVED

Unable to transform offer attributes

Avatar

Community Advisor

Hello Advisors,

I have a question regarding type casting in Offer Decisioning rules and ranking (Legacy version, not Experience Decisioning).

We have defined offer attributes across all offers, and although their values are numeric, these attributes are treated as strings by default. We need to compare these offer attributes with a profile field that is an integer.

I have not found a way to convert the string-based offer attributes to integers. I have tried functions such as toInteger() and CAST(), but none of them seem to work in this context.

Has anyone encountered this issue before, and is there a recommended solution or workaround to handle this type conversion?

 

Thanks,

Arpan 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

You can validate it by adding zero to the respective offer attribute. 

Example - offer.characteristics.get("<offer_attribute>") + 0

View solution in original post

2 Replies

Avatar

Correct answer by
Employee Advisor

You can validate it by adding zero to the respective offer attribute. 

Example - offer.characteristics.get("<offer_attribute>") + 0

Avatar

Community Advisor

Thank you so much @Mohan_Dugganab