Expand my Community achievements bar.

Your voice matters! Help shape the future of Adobe Journey Optimizer by sharing your feedback.
SOLVED

Date in Advanced Expressions

Avatar

Level 2

I need to create an expression where I select only people who the payment will expire in 14 days FROM today. The expiration field is called DueDate.

The logic would be currant date + 14.

 

What expression should I use and how it would look like? 

 

Thanks

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee

Looks like vacationPacakageDetails.fullDueDate is on the experience event schema ?

 

Accessing experience event attributes via #{ExperiencePlatform.ProfileFieldGroup.timeSeriesEvents._xxxx.vacationPacakageDetails.fullDueDate} will not work (if you are using this in a batch journey starting with a read audience). You will need to have a segment defined (with dueDate logic) which can be used in the journey

 

If you are using this in an event triggered journey, you will have to adapt the expression accordingly

toDateOnly(toString(<Experience_event_attribute_pointing_to_fullDueDate>))==toDateOnly(toString(nowWithDelta(14,"days")))

This is assuming fullDueDate is a not within a array or array of objects

 

View solution in original post

6 Replies

Avatar

Community Advisor

@IrisCo2 If it's in the journey condition to filter the profiles use this function.

toDateOnly(toString(nowWithDelta(14,"days")))==toDateOnly(toString(now()))

Refer this thread for more details.

 

If you want to display the due date in the email following this page and functions,

https://experienceleague.adobe.com/en/docs/journey-optimizer/using/content-management/personalizatio...

Thanks, Sathees

Avatar

Level 2

Hello Satheeskanna. I couldn't use the expression you gave me. 

 

I tried like this:

(in(#{ExperiencePlatform.ProfileFieldGroup.timeSeriesEvents._xxxx.vacationPacakageDetails.fullDueDate} getListItem(listDateOnly, integer) to toDateOnly(toString(nowWithDelta(14,days)))==toDateOnly(toString(now())" ) )

 

 

Can you help me? I'm new to this expressions.

 

Thank you for your help

Avatar

Community Advisor

@IrisCo2 Try along these lines to get the records that have a due date in the next 14days from today.

 

toDateOnly(toString(#{ExperiencePlatform.ProfileFieldGroup.timeSeriesEvents.first()._xxxx.vacationPacakageDetails.fullDueDate}))==toDateOnly(toString(nowWithDelta(14,"days")))

 

Also, make sure the schema is profile enabled to use the "fullDueDate" part of the condition.

Have a look at this documentation page on how to use these collection management functions.

Thanks, Sathees

Avatar

Correct answer by
Employee

Looks like vacationPacakageDetails.fullDueDate is on the experience event schema ?

 

Accessing experience event attributes via #{ExperiencePlatform.ProfileFieldGroup.timeSeriesEvents._xxxx.vacationPacakageDetails.fullDueDate} will not work (if you are using this in a batch journey starting with a read audience). You will need to have a segment defined (with dueDate logic) which can be used in the journey

 

If you are using this in an event triggered journey, you will have to adapt the expression accordingly

toDateOnly(toString(<Experience_event_attribute_pointing_to_fullDueDate>))==toDateOnly(toString(nowWithDelta(14,"days")))

This is assuming fullDueDate is a not within a array or array of objects

 

Avatar

Level 2

Hi @Mohan_Dugganab . You are right! It's on an event schema.

 

Can you please explain in more details how to create this ' segment defined (with dueDate logic)?

 

Thank you so much for your help. 

 

Thank you too @SatheeskannaK 

The expression didn't work, I think it's because it's an event schema, as Mohan suggested. 

 

Thanks

Avatar

Community Advisor

Got it. thanks for the update. 

If you have to create Audience (segment) logic may look like this,

Screenshot 2025-02-28 at 3.39.04 PM.png

Thanks, Sathees