Expand my Community achievements bar.

Dive in, experiment, and see how our AI Assistant Content Accelerator can transform your workflows with personalized, efficient content solutions through our newly designed playground experience.
SOLVED

Possibility to define offer attributes as string array instead of string?

Avatar

Community Advisor

We are using offer attributes in AJO to define few dates and later we want to use this offer attribute to calculate the ranking of the offers

 

The offer attribute has the following structure

offerApplicableOn 21-09-2024,23-09-2024,25-09-2024

 

In our ranking we are using offer.characteristics.get("offerApplicableOn") to fetch the value of the dates. Now we want to split it by comma and check compare each date. Suprisingly there is not split functionality available to do so in pql https://experienceleague.adobe.com/en/docs/experience-platform/segmentation/pql/string-functions

 

Is there any way to define offer characteristics as a string array instead of string? 

 

Thanks,

Arpan

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @arpan-garg , Not sure if this helps, but can you please check if RegEx can be used? Something like below.

 

{STRING}.regexGroup("\\d{2}-\\d{2}-\\d{4}")

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @arpan-garg , Not sure if this helps, but can you please check if RegEx can be used? Something like below.

 

{STRING}.regexGroup("\\d{2}-\\d{2}-\\d{4}")