Skip to main content
Solved

Offboarding Date = Today Check


Fredericjvr
Contributor
Forum|alt.badge.img+2

Hello Everyone

 

I have not tried using the Expression builder yet, but I have an urgent request from the company to build an escalation on our Offboarding tickets. I just need to do a check to see if the offboarding Date = Today and if true send an escalation email to the assigned manager and agent. I have the ISO date placeholder, but I have no idea how to build the expression. AI was not able to assist me, so I am now asking the champs lol :). 

 

 

 

 

 

 

Best answer by BrynCYDEF

Hi @Fredericjvr - this Expression from @zachary.king will work for you but there is a massive problem using this parameter TODAY(‘Asia/Kolkata’)

 

There is no list anywhere to find the names of the time zones according to Fresh Works.

 

 

I created a similar expression but using DiffinDays() ** but I cannot test anymore due to a bug so I’m optimistic this will work but not sure.

**P.S.  I reported this apparent bug where I can no longer test Expression properly anymore bc the Test Expression function doesn’t “see” the name of the field being tested but always defaults to {{ticket.id}} 

Anyway, aside from this one shown in the Help Guide (Asia/Kolkata) - only “GMT” or “UTC” work and nothing else.  I tried now(‘UTC’) and now(‘GMT’) and those both worked and you can use either Date or Datetime as output options or as above with the Boolean output.

However, none of these were accepted:

“Eastern”, “Eastern Time”, “New York”, “Harare”, “Eastern Time (US & Canada)” as shown on the Contact page, “IST”, “India Standard Time” so on and so on with no luck.

@Kamakshi V could the FS team get this list of time zone names for us?

View original
Did this topic help you find an answer to your question?

10 replies

afautley
Skilled Expert
Forum|alt.badge.img+11
  • Skilled Expert
  • 194 replies
  • November 13, 2023

Not sure if there is a “todays” date. there is a today’s date and time.. but mot helpful…

 


ekrasner
Community Debut
Forum|alt.badge.img+2
  • Community Debut
  • 24 replies
  • November 13, 2023

I have not used expression builder either, but I do that exact thing using a PowerShell node


zachary.king
Skilled Expert
Forum|alt.badge.img+16
  • Skilled Expert
  • 951 replies
  • November 13, 2023

Hello @Fredericjvr you could try something like this that takes your iso value and converts it to a DateValue and then compares it to a date value of “Today”. The today value outputs a simple date (ex. 2023-11-13) Just make sure to set it for your time zone. You can output a string, number, or boolean from the if statement. Whichever makes the most sense for you. Hope this helps!

 


Fredericjvr
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • 7 replies
  • November 15, 2023
zachary.king wrote:

Hello @Fredericjvr you could try something like this that takes your iso value and converts it to a DateValue and then compares it to a date value of “Today”. The today value outputs a simple date (ex. 2023-11-13) Just make sure to set it for your time zone. You can output a string, number, or boolean from the if statement. Whichever makes the most sense for you. Hope this helps!

 

Thanks will try and let you know :)


Forum|alt.badge.img+11
  • Skilled Expert
  • 170 replies
  • Answer
  • November 15, 2023

Hi @Fredericjvr - this Expression from @zachary.king will work for you but there is a massive problem using this parameter TODAY(‘Asia/Kolkata’)

 

There is no list anywhere to find the names of the time zones according to Fresh Works.

 

 

I created a similar expression but using DiffinDays() ** but I cannot test anymore due to a bug so I’m optimistic this will work but not sure.

**P.S.  I reported this apparent bug where I can no longer test Expression properly anymore bc the Test Expression function doesn’t “see” the name of the field being tested but always defaults to {{ticket.id}} 

Anyway, aside from this one shown in the Help Guide (Asia/Kolkata) - only “GMT” or “UTC” work and nothing else.  I tried now(‘UTC’) and now(‘GMT’) and those both worked and you can use either Date or Datetime as output options or as above with the Boolean output.

However, none of these were accepted:

“Eastern”, “Eastern Time”, “New York”, “Harare”, “Eastern Time (US & Canada)” as shown on the Contact page, “IST”, “India Standard Time” so on and so on with no luck.

@Kamakshi V could the FS team get this list of time zone names for us?


Kamakshi V
Community Manager
Forum|alt.badge.img+10
  • Community Manager
  • 278 replies
  • November 15, 2023

Hii @BrynCYDEF 

Sure! I’ll loop in someone from the FS team to get you the list!


suvashini.balashanmugam
Contributor
Forum|alt.badge.img+4

Hi @BrynCYDEF - Do you think this article will be of help? This give you Value to Be Provided in Import/Export and I think this should work in your requirement, But I could be wrong too. Please let us know if this works!


Forum|alt.badge.img+11
  • Skilled Expert
  • 170 replies
  • November 15, 2023

TY @Kamakshi V for the connection to @suvashini.balashanmugam !

TY @suvashini.balashanmugam for the link!!!!  That looks exactly like what I need!  I will try it out with the Expression node today!

 

Much appreciated, team!!  :-)


zachary.king
Skilled Expert
Forum|alt.badge.img+16
  • Skilled Expert
  • 951 replies
  • November 15, 2023

Hello @BrynCYDEF and @Fredericjvr you can try this website to see Time Zone designations that could work too. For example I use “America/Detroit” for my Eastern Standard Time. https://time-zone.org/time-zones/America-Detroit

Hope that helps!


Fredericjvr
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • 7 replies
  • November 16, 2023
BrynCYDEF wrote:

Hi @Fredericjvr - this Expression from @zachary.king will work for you but there is a massive problem using this parameter TODAY(‘Asia/Kolkata’)

 

There is no list anywhere to find the names of the time zones according to Fresh Works.

 

 

I created a similar expression but using DiffinDays() ** but I cannot test anymore due to a bug so I’m optimistic this will work but not sure.

**P.S.  I reported this apparent bug where I can no longer test Expression properly anymore bc the Test Expression function doesn’t “see” the name of the field being tested but always defaults to {{ticket.id}} 

 

This is the first one that i could get to work perfectly, thank you very much for your help :)


Reply