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

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

How to create birthday=today condition in Journey?

Avatar

Level 2

We created the segment with birthday attribute = today where we found the sample profiles shows only shows previous day instead of today. So we want to put the below statement inside the condition node. 

#{ExperiencePlatform.ProfileFieldGroup.profile.person.birthDate} == toDateOnly(now())
 
But, it is not giving us the right result. do we able to do ignore year in the condition level advanced editor?
In Json, we can use the below code to find the birthday accurately. Because, we dont have any function for getMonth and currentMonth kind of functions in Condition node in Journey.
 
{%#if profile.person.birthDate.getMonth() = currentMonth() and profile.person.birthDate.getDayOfMonth() = currentDayOfMonth() %}Happy Birthdate{%else%}No birthdate today{%/if%}
 
1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 2

Thanks Manoj, we got the correct code to check the comparison of birthdate with today's date. please find the below code for other's reference too. 

 

concat(substr(toString(now()),8,10),substr(toString(now()),5,7))==concat(substr(toString(#{ExperiencePlatform.ProfileFieldGroup.profile.person.birthDate}),8,10),substr(toString(#{ExperiencePlatform.ProfileFieldGroup.profile.person.birthDate}),5,7))

원본 게시물의 솔루션 보기

2 답변 개

Avatar

Community Advisor

Hello @gengaipandi11 

 

Try using this to get the day and month from the current date.

concat(substr(toString(now()),8,9),substr(toString(now()),5,6))

 


     Manoj
     Find me on LinkedIn

Avatar

정확한 답변 작성자:
Level 2

Thanks Manoj, we got the correct code to check the comparison of birthdate with today's date. please find the below code for other's reference too. 

 

concat(substr(toString(now()),8,10),substr(toString(now()),5,7))==concat(substr(toString(#{ExperiencePlatform.ProfileFieldGroup.profile.person.birthDate}),8,10),substr(toString(#{ExperiencePlatform.ProfileFieldGroup.profile.person.birthDate}),5,7))