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

Question

Question

Email notifications with special date criteria

asked on October 22, 2014

I've been presented with a new task that will send an email notification based on a set of rules that correspond with certain dates, and add another set amount of days to a specific date. I'm not sure how to make this happen, I'll explain the scenario and see fi you guys can help out. (This is Health Benefits, based on state laws as to when benefits are to be offered to employee's (Construction, high turn around)).

 

If a person is hired on the 1st of a month, then send an email 30 days (20 is my actual number I want to use) to HR to have his/her benefits package ready for the 1st of the following month.

If a person is hired on the 2nd day or any day after of a month, the benefits package needs to be sent 60 days past the hire date. Example: Your hire date is Jan 2nd, I need to have your benefits ready for March 1st. The reason for this is because the enrollment date is only on the first day of each month. (or first business day of each month)

I've been staring at a blank canvas for 2 days trying to understand how to do this, but am lost.

I'm open to any suggestions.

0 0

Replies

replied on October 22, 2014 Show version history

How is the hire date coming in? The following workflow reads a date field from a document, then extracts the day. It then runs conditions on the day to check if it's the first or not.

If the day is the first, then just adding 1 month to the date will get you the first of the next month. If the date is not the first, the calculations to get the first of the month after next is slightly more convoluted (add 2 months, subtract 1 day less than the current day to get to the first).

 

The classes will add another layer of routing decisions here to figure out how many months extra to add.

1 0
replied on October 22, 2014 Show version history

So, you are saying in your example, at the top, that its the 1st business day of the month, or just XX/01/2014?

I first would create a small workflow that you input a date parameter and it returns to you a token, with true or false. False will indicate that you are not starting on the 1st business day of the month. Then, you can use the date token calculator to calculate to the proper month, but have it set to be the 1st of that month. You then use your workflow that tells you if it's the first of the month again. This will tell you if you need to add more days to get to the first business day of the month. You can keep adding 1 day and retesting in a repeat activity. Doing it this way, you can add some logic to your first business date of the month workflow to account for holidays. 

 

The workflow to calculate the first business day of the month should simply take the input, and do a variety of tests. I would use a date token calculator to take the input's month and year values, but set the date to be 8. This way I can use a Conditional Decision to test if the date is past or equal to the 8th, which would automatically make it not the first business day of a month (I cannot imagine a month or series of holidays that would cause that to not be true). I would do other calculations as well till I felt comfortable that I accounted for everything. then store a true or false to a token that will be an output parameter

0 0
replied on October 22, 2014

to give you an example, I have 3 classes that I will be using to determine the range:

 

class 1 = 30 days after hire, + 30 days if day does not equal 1st day of month

class 2 = 60 days after hire, + 30 days if day does not equal 1st day of month

class 3 = 90 days after hire, + 30 days if day does not equal 1st day of month

I'm sure that this is a simple workflow, I would like to make sure that the notifications are not to early or too late. I would hate to have a notification to have something done 1 day before its due. 

0 0
replied on October 22, 2014 Show version history

Well, you can use a conditional decision to outline three possible paths. The first if the class is 1, second if class is 2, and the last being if the class is 3. You would simply need a way of getting a token to have the value of the class, which you have not indicated any information on how you will know that. I assume it's a DB, so you may want to use a Query Data activity and set it to only return the first row if you know it should only ever return 1 row. then use that token from the Query data activity in the conditional decision activity. Use the separate workflow I mentioned to determine if you need to add 1st day of the month exceptions, regardless of the class. 

 

EDIT: Once you have the due date, a simple Date token Calculation to subtract a day would need to be done to find the notification date. You might want to also test that for being a weekend or holiday and continue subtracting if that is the case.

0 0
replied on October 22, 2014

I have part working, based on days past todays date, working on understanding how to do the "1st" day of the month rule..

0 0
replied on October 22, 2014

Also, how would I tell workflow to always send a notification on a specific day of a month? For example: Send email with attachment the "last Friday" of every month.

0 0
replied on October 22, 2014 Show version history

Is this a notification sent by a stand-alone workflow? Maybe you create this current workflow to store the data it needs to send in a DB, then call that data from a stand-alone WF.

 

Set the stand-alone workflow to initiate like this schedule rule:

 

EDIT: Or you can simply set the above as your starting rule for the Workflow and have everything we discussed be performed to figure out what emails need to go out on that date. 

0 0
replied on October 22, 2014

stand alone workflow

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

Sign in to reply to this post.