Expandir minha barra de realizações na Comunidade.

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

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 Solução aceita

Avatar

Resposta correta de
Employee Advisor

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

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

Ver solução na publicação original

2 Respostas

Avatar

Resposta correta de
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