In this episode of the ShellBlack Whiteboard, Shell introduces the topic of Workflow Actions. In this second installment of our two-part segment on Workflow, Shell explains the four different actions that can result when a Workflow rule fires. You can:
- Update a field
- Send an email
- Assign a task to a Salesforce User
- Send an outbound message
Shell then covers how you can create a series of time dependent (or delayed) workflow actions from a single rule that fire before or after a specified date. Lastly, Shell tells you where to look in Salesforce to see if there any time delayed workflow actions pending.
View this video on YouTube: http://youtu.be/0n26RLubhBA
Other blog posts on this topic:
Transcript of video below:
Welcome everyone to another segment of ShellBlack Whiteboard, where we explain an aspect of the Salesforce platform and give you some tips so you get the most out of your Salesforce experience. I am Shell Black your host, President and founder of ShellBlack.com and Salesforce MVP, and this is going to be the second part of Workflow, in the first segment we covered what is Workflow, the criteria of how you make it fire, and in this segment we are going to cover the actions that will trigger from your Workflow, both real time and time dependent. So, let’s jump into it…
So the things that you can have trigger, if your Workflow kicks off, are (1) field update, (2) you can send an email, (3) assign a Task to a User, or (4) you can send an outbound message. So let’s go into these a little bit more in depth. So, what do I mean by field update? So, if you have a field, a date field, a text field, or whatever field it might be, you can have Salesforce set the value of that field as a result of Workflow kicking off. So, you could put in a number value, you could use a formula to derive a value, so it could be today’s date plus thirty days and that sets a future date. If it is a pick list, you can have it you can have it go back and change it from what value it was, to a prior value, or you can have it select the next value in the pick list, or you can just determine a pick list value, so you just might pick value number five in an order of a pick list. So the other thing you can do is send an email. But first you have got to make sure you have your email template all ready to go. Because when you are in that step of the Workflow it assumes that you have your template already made. Now whom can you send an email to? Actually quite a lot of people, you can send an email to the owner of the record, the creator of the record, it can be a specific person in the Role Hierarchy, it can be potentially a Contact, or a custom email field that you have on the record. So, pretty flexible, you can also email up to five people outside of Salesforce, so if you have a distribution list of five people, where the email is nowhere in the system, you can also specify up to five additional people on that communication. So quick tip for you, If you are going to send an email, and that might be the only action with the Workflow, something I like to do is, I log a Task in a completed status, that says "Workflow fired email". So, that gives the User a visual clue that the Workflow actually kicked off and did what you wanted it to.
So, another thing you can do with Workflow is create a Task. Of course this assumes you are sending a Task to a Salesforce User. But you can control a lot of things about that Task… subject line, who is this assigned to, when the Task is due, and the due date can be derived off of the rule trigger date, or another date on the record, and you can also can control the status of the Task. So, whether it is an open Task and is pending, or you can go ahead and make that completed. The last thing that you can do with Workflow is send an outbound message. It is a very rare thing that you would do this. Out of a hundred Workflow actions, maybe you will do this once. It is a fairly rare. But it’s an ability to send some information to an IP address as a result of Workflow kicking off, and usually you will send the ID of the record along with some field information. It is kind of a "fire and forget" way to send some information to a third party system. A little rare, but you can do that.
Again, we talked about this earlier, but one thing you cannot do with Workflow, is that you cannot create a record, at least not today, "Safe Harbor."
So those actions, your field updates, sending an email, creating a Task, or sending an outbound message can happen either real time, or you have a nice feature in Salesforce, where you can actually make that action occur on a time delayed fashion. So, if you select time delayed Workflow actions, you get a little bit of an interface inside Salesforce where you pick a number, you will have a toggle where you can pick either number of days, or either number of hours. Another option to toggle where you can say I want this to be before or after, and then a place to specify a date. So that can either be the rule trigger date, or that can be date of any field on the record that Workflow fired off of.
So, one quick thing, you can do days or hours, you cannot not do minutes. It won’t get that granular, and it won’t necessarily be on the hour. It is going to be some time within that hour. There could be other thing that the Salesforce server is doing. An hour is about as granular as you can get. So, let me give you another couple examples of how you would use time-delayed Workflow. Let’s say that a record, an Opportunity is saved with a close date, and maybe you want to notify three days, three days before the Opportunity close date, and then send them an email. That would be something where you are using it before a day. I have kind of written out an example that would happen in the future. So, you are going to have seven days, after the rule trigger date, so after the criteria fired, maybe you send a reminder email. So, what I am trying to show here, is for each time delay that you create, you may have one or multiple actions happen in that time frame. So, you might have a second set of time-delayed actions, so let’s say fourteen days, fourteen days after the rule trigger date, not only do you want to send the reminder email, but you also want to assign a task to the record owner. So this time-delayed Workflow has one action, and this time-delayed Workflow has two actions. If you want to know there is a time delayed Workflow in the queue ready to fire, you can actually go into set up, Administrative Setup, and there is an option for Monitoring and getting into Time-delayed Workflow, and you can see time delayed Workflow that is ready to send, that is in a queue. If you have your record change, and the criteria is no longer applicable, it will actually kill any pending Workflow action.
Ok… so that raps up this segment. Where we covered actions, both real-time and delayed. I appreciate you tuning in, if you have comments or feedback, we would love to hear from you. You can get a hold of us a couple ways… You can email us at WhiteBoard@ShellBlack.com, or you can hit me on twitter at @Shell_Black would love to hear from you, see you soon.