You are viewing limited content. For full access, please sign in.

Question

Question

Send email notifications based on expiry date

asked on June 14, 2016

Good afternoon,

I am new to Laserfiche workflows. I have been working on one all day. We have insurance required for specific agreements. This insurance must be updated each year. I have created a template to input the Expiry Date of the insurance. I am trying to create a workflow to retrieve this expiry date and send an email to a specific person 30 days before the expiry date.

I have read all of the discussions on here regarding the topic and I cannot seem to create a workflow that will work properly. I used one of the other discussion boards to help create this workflow. I have tried other versions of this with the date token calculator, but still no luck. I had gotten to the point where it would send an email, but it sent the email for every folder within the parent folder, not just those satisfying the expiry date requirements. Any thoughts?

Thank you,

0 0

Answer

SELECTED ANSWER
replied on June 14, 2016

It's actually backwards. Today, 6/14/2016, you want to find the documents that will expire on 7/14/2016, right? Tomorrow, you want to find all docs that will expire on 7/15/2016 and so on.

So you want to search for documents where the expiration date is 30 days after the current date. You don't need to read the field value, the LFServer will check that for us in the search.

 

0 0

Replies

replied on June 14, 2016

That's not quite how you'd do it. You don't want to use delays in this case since it would just be clutter in the database for no gain.

What you want to do is have a workflow that runs each day and finds documents that will expire 30 days from the current date. So you'd want to replace Find Entries with a Search Repository with the appropriate criteria (like the folder path you're using in Find Entries plus a field search using the expiration date field). You would need a Date Token Calculator to figure out what date 30 days from the current date is, then you'd use the token in the search.

You wouldn't need the routing decision since the search will only return the documents you need to notify people on, so For Each Entry would only need the email inside.

Let us know if you need more details.

0 0
replied on June 14, 2016

Thank you for the quick response. I was using the "Find Entries" to retrieve the field value of Expiry Dates I have entered into my templates. I want the workflow to pull the field value of "Insurance Expiry Date" from my entries and use to Date Token Calculator to subtract 30 days from this date and send a notification email.  Is there another way to pull the field values without using "Find Entries"?

0 0
SELECTED ANSWER
replied on June 14, 2016

It's actually backwards. Today, 6/14/2016, you want to find the documents that will expire on 7/14/2016, right? Tomorrow, you want to find all docs that will expire on 7/15/2016 and so on.

So you want to search for documents where the expiration date is 30 days after the current date. You don't need to read the field value, the LFServer will check that for us in the search.

 

0 0
replied on June 16, 2016

Thanks so much for your help! It is working correctly now.

0 0
replied on September 27, 2019

I have a search in workflow that I want to check todays date against an expiration date - 30 days, so I have a token for todays date and a token for todays date - 30 days and I cant seem to get it to work because of a syntax error.

Apparently I have been looking at it too long and have tried may options, this is what is in my search.

{:"%(TodaysDate_Todays date)" = "%(NumberofDays_Expiration Date)"} & {LF:LOOKIN="Harris\City Clerk\Contracts"}

0 0
replied on September 27, 2019

I have a date calculator in mine and the results are popped into the search syntax.  This is what mine looks like:

 

And the search is looking for that date in an expiry date field:

{[]:[Expiry Date]>="%(DateTokenCalculator_One Month Prior to Expiry)", <="%(DateTokenCalculator_One Month Prior to Expiry)"}

1 0
replied on September 27, 2019

I think you might have your math wrong. Today - 30 days would be things already expired. I think you want to search for things that will expire 30 days from now, so you'd add 30 days to today's date.

0 0
replied on September 28, 2019

Nope, sorry I didn't explain it correctly math is correct.

The token is the expiration date minus 30  days, if that token equals todays date then it matches the search.  

Got it figured out and working.

Thank you.

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.