I recently helped create some workflow logic for a client that encompassed a Lead Escalation process-flow.
Basic Summary: A person is notified at the beginning of the Lead stage – after record creation – that they have a new Lead (this is the trigger of the workflow). They are then allotted 48 hours to follow-up with that particular Lead – in the form of saving a Task record (created by the workflow at fire) as completed. If they don’t do anything, they get notified after 48 hours – an email is sent to them (and their manager) telling them to get with the program, and they have 24 more hours left to do it. After 24 more hours, if they still haven’t followed-up, another email is sent, the Task record is deactivated, and the Lead record is reassigned to a neutral employee for redistribution.
Reasoning: This workflow job will hopefully move Leads through their initial stage at a much faster rate. Lead shouldn’t be kept as “Leads” for a long time – less than a week before you either know they have potential or know they’re crap. However, how can you filter them down between good/bad unless you follow-up with them and see what kind of business could potentially ensue?
I’ve outlined some steps towards testing the effectiveness of the particular workflow that I’ve created. Its one thing to spend hours creating a workflow (or minutes if you’re just that good) that you think looks glorious. But it’s a whole other thing when it comes to troubleshooting. How do you know it’s doing what needs to be done? There have been plenty of times where I’ve created a workflow job that seems perfect, and the logic just isn’t right. If you don’t troubleshoot it properly, days or weeks of lost profitability could result (I’m not trying to being a drama queen; workflow ineffectiveness just makes me feel nauseated).
I’ve included some screenshots that should help illustrate what needs to be examined in order to know that this workflow is doing its job (some of these steps will be handy with other workflow varieties as well):
1. TRIGGERING THE WORKFLOW: To make sure the workflow fired, go to the Workflow area under the Details section of the respective Lead. You should see a workflow job listed in the listview that has the correct date and time on it.

Possible Status Reasons: “What do these mean?”
- WAITING FOR RESOURCES – it’s going to go, you just need to give it a minute. If it stays there for a while, there’s could potentially be an internal issue.
- WAITING – the foremost situation regarding this status reason is that there’s a WAIT CONDITION in the workflow that is requiring this workflow job to hover in this state, before it can most onto the other steps in the workflow (in the case of the Lead Escalation workflow, there’s a TIMEOUT WAIT CONDITION that is requiring the workflow to basically hover for 2 days. It will wait for exactly two days, and then resume. See the screenshot in Number __)
- IN PROGRESS – it’s going; it’s just not done yet.
- SUCCEEDED – regardless of how self explanatory this seems, it merely means it’s done. Whether or not the logic is working to its best ability or even doing what it needs to do – it’s not being taken into effect. You will need to double check two things: the results of the job (did the required actions happen?) and the SYSTEM JOB, seen later in this email.
- CANCELED – means you canceled it manually, or it cancelled itself through a clause in the workflow (“If blah blah happens, cancel workflow job.”)
2. DID WHAT NEEDED TO HAPPEN, HAPPEN? You need to make sure that any records that needed to be created are created, any records that needed to be updated are updated, and any other actions that need to be taken are taken. Workflow’s very good about this (there’s usually an obvious reason it wouldn’t work), but as part of the troubleshooting phase, it’s imperative that you double check to make sure that it’s doing what is necessary, mainly to make sure you created it right. Below is the listview showing the Task that was created after the Lead was created.

a. Note the due date – two days after the workflow fired. This is important as well. If you have a due date that’s on the form, make sure it’s reflecting the correct information. If it’s not, you will need to go back in and rework the data fields on the Task creation clause.
b. Double click the record and check the data fields – make sure they’re pulling through properly.
3. VIEWING THE SYSTEM JOB: You will also need to look at the system job. Go to the Workflow section under the Details area, and double click on the particular job you are testing. As you can see below, you will see when it fired (9/9/2009, 3:34 PM), the reason it started (Record was created [this is the trigger], or it can display a manual start – meaning you clicked on a button that says “Run Workflow”). If the workflow job is either Succeeded or Canceled, you will see a datestamp in the Completed On field.

As you can see, the workflow job illustrates the progress of the workflow job – what has happened, why is it hovering (if that’s the case), what has yet to happen, etc. If you come across a little red circle with an X in the middle of it, this means something went wrong – there’s something potentially wrong with the logic, someone doesn’t have an email address that’s supposed to be getting an email, a particular record doesn’t exist in the system anymore (if this particular record is deleted from the system before the job is finished, the little red X will show it’s pretty face), etc. There are several reasons why this could happen. Sometimes it explains what’s wrong, but other times the message given is a little vague. Workflow likes to make you investigate.
When it comes to the TIMEOUT functionality – merely looking at this job and saying “Yay, it’s timing out” isn’t really the best. You need to look at the SUSPENDED JOBS LISTVIEW. This is located in the System Jobs area. See the later in the post.
4. SYSTEM JOB LISTVIEW: You want to look at the SUSPENDED JOB LISTVIEW in order to see more information on jobs with timeout functionality. See the screenshot below for location.

Tip: the SUSPENDED SYSTEM JOBS listview is really handy as well in order to see if there are a lot of jobs that are WAITING FOR RESOURCES. If there are numerous jobs in this state, and it doesn’t look like their “waiting” is paying off, there’s most likely an internal issue (i.e. you import 250,000 Leads a day into the system, and a workflow fires every…single…time. Yes workflow is doing its job – it’s firing. No it’s not going to actually work – too much of a good thing is indeed, a bad thing. It will hose up your system.)
You’ll want to look at the POSTPONE UNTIL date (see below). This will let you know when the workflow will wake back up and continue its course. If your timeout expression states two days and it’s postponing for two days – hooray. However, if it says something like 12/30/9999, there’s something wrong with the timeout expression, and the workflow logic needs some TLC.
