Last week I attended our Eastern Iowa Salesforce users group for the fourth time (its a very new group). During our breakout sessions the topic of having Salesforce ‘do things for you’ came up. I was surprised at how few of the members were aware of workflows. As the discussion continued they were fascinated at the number of things Salesforce could do for you automagically (shout out to @SFDC_Nerd for the term) or also known as Workflows.
To begin creating a workflow the first thing you need to do is decide what the ‘real world’ process is that your are trying to replicate. (I bet you thought I was going to say: Setup> App Setup> Workflows, right?) By first figuring out what the real world process you can reinforce the use of Salesforce and it will lead to more relevant tasks and/or emails being sent from Salesforce. Workflows can send emails, tasks, and perform field updates; I will focus on those three and give you examples of each. I do realize that Workflows can send Outbound messages. But we are button-click admins and need to focus on the simple solutions first.
The Situation: When a testing center comes online (or goes offline) the CA rep should be able to update 1 field in Salesforce to change its status. When the status changes all support staff should get an email that the status has changed. And when the center status is equal to offline the record needs to be locked and the CA rep should get a task to follow up with the center 1 month after the status has changed. Because centers go online and offline I can accomplish this criteria in two workflow rules.
Email Alerts
For the situation above we need to setup the workflow to fire on the field Center Status and set up two different email templates- one for open and one for closed.
Setup> App Setup> Workflow Rules> New Rule.
First we will select the object, in this case it will be Account and click next. Now we name the rule, you can choose anything but try and make naming consistant across all rules. In this case I would use: Center Closed Rule. Salesforce gives you the option of putting in a description. It is not an option for me, I always put in a description because I think it helps me when I have to troubleshoot later on.
Now we put in the evaluation criteria. Because centers can go online and offline at various times throughout the year I will chose “Every time a record is created or edited“. For the rule criteria we will use: (Field) Account Status (operator) Equals (value) Offline. Now click save and next.
Let’s add the workflow action, we will start with the email. So click on Add Workflow Action- New Email Alert. If you’re like me and probably forgot to create the email template first you can do a ctrl+click open a new tab and do that real quick. After doing that we can continue with the workflow by naming our email alert, selecting the recipients (additional emails if necessary) and saving it. For this case I created a CA Rep group to recieve the emails and include the CA Rep manager as well.

Tasks
The nice thing about creating workflows is that I don’t have to start over and create a workflow rule for every single thing I need Salesforce to do. For the field update action I can add it to my already existing “Center Offline” rule. Picking up on the Add Workflow Action step from above we select Add workflow action- New Task. Here I can set who the task will be assigned to, what the subject is and most importantly when it is due. Based on how Salesforce needs to work in the real world process I will set this to 30 days after the trigger.
Field update
For both rules (Center offline and Center online) I have salesforce update the record type via a field update. This will accomplish the goal of having the Account fields locked when the center is offline and unlocked when the center is online. Prior to creating this step in the rule I created a record type called “Center Offline” and associated a page layout to it where all fields are locked except for the status field. This action can be added to our existing Workflow rule- Center offline by clicking Add Workflow action- New Field Update.
So let’s double check our requirements- When a center goes offline and the CA Rep changes the status to offline Salesforce will send an email to the group- check. It will assign a task to the CA Rep with a due date of thirty days to check on the center- check. And lock the record with a field update- check. One click, three actions executed. To reverse just create a Center Online rule with the opposite criteria and a different email template, just don’t include the task.
Guh. That sounds like a lot of work Mike, I’m the admin but I don’t have time for this. Ok, if you are new to Salesforce creating workflows may seem like a lot of work. But let’s look at the time savings. If you spent an hour creating these two workflows does that equal time savings? In our case we manage over 250 testing centers each of which can go online or offline. If each center went online and offline once a year that is 500 emails alone sent. If it takes 30 seconds to send an email (compose and send to correct addresses) that is 250 minutes or 4 hours and 9 minutes you just saved the organization in sending emails alone.
Workflow emails are a big selling factor I use to get new departments onboard. By giving them the ability to change one field and have many actions executed it looks like magic and it happens automatically. So my question to you is this- “What can you do to make Salesforce execute actions automagically tomorrow that will save countless hours in the future?”