+ Start a Discussion
OssieOssie 

Incorporate Business Days into Workflows

Hi,

I would like one of my Case Worklows to only trigger during Business Days.  Currently users are receving email alerts on a Sunday and Saturday whereas they should only receive alerts Monday to Friday. 
Unable to use the Escalation functioanlty due to limitations. 

Can this be done?

any help would be greatly appreciated.
Best Answer chosen by Ossie
ShashForceShashForce
You need to change the OR to AND. Something like this:

AND(
ISPICKVAL(Status, "Waiting for Expeditor"),
OR(
CONTAINS(Subject, "VOR"), CONTAINS(Subject, "VIP")),
AND(
Is_Business_Days__c <> "Saturday", Is_Business_Days__c <> "Sunday"
),
IsEscalated = True,
)

This should do the trick for you.

If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.

Thanks,
Shashank

All Answers

ShashForceShashForce
Hi,

You can use the formula provided in this link to calculate the day of the week and modify your workflow criteria to fire only on weekdays: https://success.salesforce.com/ideaView?id=087300000006tam

If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.

Thanks,
Shashank
OssieOssie
Hi Shashank,

I have already done this.  I have then declared in my rule criteria that only execute workflow if today is not equal to Saturday or Sunday.  But this doesn't seem to work.  Users are still recieving email alerts on the weekends.  Any idea where im going wrong.  Thank you. 
ShashForceShashForce
Would it be possible to post your criteria here?
OssieOssie
Yes of course.

Please see below.

AND(
ISPICKVAL(Status, "Waiting for Expeditor"),
OR(
CONTAINS(Subject, "VOR"), CONTAINS(Subject, "VIP")),
OR(
Is_Business_Days__c <> "Saturday", Is_Business_Days__c <> "Sunday"
),
IsEscalated = True,
)
ShashForceShashForce
You need to change the OR to AND. Something like this:

AND(
ISPICKVAL(Status, "Waiting for Expeditor"),
OR(
CONTAINS(Subject, "VOR"), CONTAINS(Subject, "VIP")),
AND(
Is_Business_Days__c <> "Saturday", Is_Business_Days__c <> "Sunday"
),
IsEscalated = True,
)

This should do the trick for you.

If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.

Thanks,
Shashank
This was selected as the best answer
OssieOssie
Thanks Shashank.

I cant believe i missed that!! 

I have amended my workflow but it still appears in the Time-Basd workflow Queue to be tiggered on Saturday.  Is that becuase the workflow logic is currently TRUE (Is_Business_Days__c <> "Saturday") and that come Saturday the logic will be FALSE ans so the Workflow will not get triggered.  Is my thinking right? 
ShashForceShashForce
That is correct!
OssieOssie
You're a legend! 

Thank you so much!!