내 커뮤니티 업적 표시줄을 확대합니다.

Join Adobe Journey Optimizer product experts for a live Ask Me Anything on October 15th at 8 AM PT about Expanding Your Mobile Reach with RCS & WhatsApp in AJO!
해결됨

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 채택된 해결책 개

Avatar

정확한 답변 작성자:
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}")

원본 게시물의 솔루션 보기

1 답변 개

Avatar

정확한 답변 작성자:
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}")