+ Start a Discussion
Shannon Andreas 21Shannon Andreas 21 

Escalation workflow rule for case

So...I created a checkbox formula field on a case that clicks true if the following criteria are met:

IF( (TODAY()> Contact_Cust_Identify_Issues__c ) && ISBLANK(Contacted_Customer_Date__c) 
,true,false)

I then created a workflow that SHOULD trigger an email and create a completed task that states the email was sent. I chose to have the workflow evaulate each time the case meets criteria. The workflow is not firing. 

Here is the workflow rule:
(Case: Case Record TypeEQUALSCase; VOC Response Plan) AND (Case: > 2 DaysEQUALSTrue) AND (Case: StatusEQUALSNew)

Is the formula field update not considered an edit? What am I doing wrong here? I feel dumb because this seems so simple.

Please help,

Shannon
Best Answer chosen by Shannon Andreas 21
Shannon Andreas 21Shannon Andreas 21
Here is my total solution:

Create a time-dependent workflow based on criteria: 

(Case: Case Record TypeEQUALSCase; VOC Response Plan) AND (Case: > 2 DaysEQUALSTrue) AND (Case: StatusEQUALSNew)

Have the TDW fire 1 day after the "Contact Customer Due Date" (formula field on the case that takes the created date and adds 2 business days)

I have to wait to see if it will work, but I think it will. 

Thanks for your help!!

Shannon

 

All Answers

Marc D BehrMarc D Behr
Hi Shannon,

First, is Contact_Cust_Identify_Issues__c and Date or Date/Time field? I assume t is since you are comparing it to TODAY() but I can't tell based on the name.

Next, Workflows are only fired when a record changes. Simply having a formula field on a record does not cause the record to change. Something needs to trigger the field to change (like a record update or edit). To do what you are looking for, you will most likely need to create a scheduled job to look for records that meet the desired criteria and then either update the primary record (which would cause the workflow to fire), or simply do the required work in the scheduled job.

Marc
Laxman1975Laxman1975
Shannon,

You can setup time dependent workflow action to send email after 2 days. If criteria match then only email will be actually sent. 
Shannon Andreas 21Shannon Andreas 21
Thanks Marc and Laxman,

Marc,

What type of scheduled job would I create? Can I do it through a flow? Or would I need straight up Apex? Would it be a trigger or a Class?

Thanks for your help!

Shannon
Shannon Andreas 21Shannon Andreas 21
If I create a workflow rule to change the field to true instead of a formula field, will this trigger the escalation workflow?
Marc D BehrMarc D Behr
Hi Shannon,

If a field is changed on a case because of a user input or some external event (an API call or something else that cause a field to be changed) and you want to trigger the event to fire 2 days after that occurs, then you could use a time dependent workflow. In other words, if you wanted to say that 2 days after the Contact_Cust_Identify_Issues__c field was changed, you wanted the email to be sent, that can be done with a workflow.

Reading your initial description, I don't think this is the case. What I think you are looking to do is simply check the Contact_Cust_Identify_Issues__c field every day (regardless of whether or not the case has had any changes), and if it is now 2 days after the Contact_Cust_Identify_Issues__c date, then send the email. In order to do this, a scheduled job (probably that fires a batch process) would be needed. The scheduled job says to execute an apex class on a scheduled basis. Because there is a chance that more than 200 records might need to be updated at a time (always make this assumption), you will need to fire a batch job to process the records.

Details on how to set up a scheduled job are availble here - http://sforce.co/1VSxdwz and the batch class is detailed here http://sforce.co/1WSPetz 

Does this help?

Marc
Shannon Andreas 21Shannon Andreas 21
Here is my total solution:

Create a time-dependent workflow based on criteria: 

(Case: Case Record TypeEQUALSCase; VOC Response Plan) AND (Case: > 2 DaysEQUALSTrue) AND (Case: StatusEQUALSNew)

Have the TDW fire 1 day after the "Contact Customer Due Date" (formula field on the case that takes the created date and adds 2 business days)

I have to wait to see if it will work, but I think it will. 

Thanks for your help!!

Shannon

 
This was selected as the best answer