The Process Builder is a new workflow tool from the Spring’15 release, that helps you easily automate your business processes by providing a powerful and user-friendly visual representation of your process as you build it. One can use the Process Builder to setup complex Workflows in Salesforce which otherwise required Apex.
When compared to Workflows, the Process Builder has lot additional capabilities, like updating multiple records, posting to chatter, trigger Approval Processes, kick of Flows and much more.
1. What are Processes?
2. How to Created Processes?
3. Understanding the Process Builder Interface
4. Some Common Use Cases
5. Workflows or Processes?
Join us for an expert driven webinar to learn and get started with this new feature from Salesforce.
About Suyati Technologies:
We would also like to introduce you to our company, Suyati Technologies. Suyati focuses on developing niche IT solutions and services including CMS, CRM, and e-commerce. We are an Ektron-featured implementation partner, Microsoft Gold partner, with an extensive experience in .Net, free and open source and mobile app technologies. When it comes to SalesForce, we are an app exchange partner and we offer top-notch solutions in customization, development, migration, and integration.
We have a team of 30+ developers including ten 401 certified developers who have created around 1 million LOCs delivering, finding out of the box solutions, which end up as industry benchmarks.
Speaker for today:
Now, I want to introduce you to our featured speaker, Deepak K Anand, one of the youngest SalesForce MVPs in India and one among the 180 MVPs the world over. He is also a veteran blogger who is constantly among the top 10 in the SaleSforce success community.
Deepak is also a voracious reader and a football fanatic who cannot get enough of Barcelona and Messi.
Our Social Media tabs — please feel free to post questions or even tag us. You can use the hashtags and handles you see on the screen.
I’ll walk you very quickly through the agenda of the day. Deepak will start off with what are processes and then he’ll explain where to use and why to use them. He would deep dive into process builder, show you how to use the processes with some traditional use cases and then conclude with limits and considerations. After this we’ll be answering your questions. So that’s all from my end. I would like to pass it on to Deepak.
What is salesforce Process Builder ?
So, processes is basically a new feature that was introduced in Spring 15. It was generally available in Spring 15. So like the name suggests, it is a new tool which is going to, I should not say, but it is your workflows on steroids or workflows on 2.0 much advanced. When compared to your workflows you have much more features with Processes. So basically it is something which you can use to automate your business processes and you get lots of options out there. You get the power cord which you can achieve through clicks. Previously you had triggers and impacts to do tasks that can now be done with your process builder with just a couple of clicks.
The other important aspect about processes is:
So moving on why would I use this process and what is it going to replace? Let’s see why I would use this process.
One of the most common use cases that I would say is: You had instances where you had to do 8 tasks to do your simple tasks. For example, you know, if you are an admin using a platform and if you know about the accounts and contacts, you know the relationships between the account and contacts in your Salescloud is of type lookup. So the workflows allow you to update field on the parent record only if the relation between the child and the parent is of type Master Detail.
If the relation was of type Lookup, you’ll have to run to your developer, command you’re going to write there, trigger for me which updates the field on my parent. With workflows, the advantage is such minor tasks which had to be done using Apex can now be done using Processes.
Another interesting thing is you can combine your lot of workflows into a single process. One common use case, say that you have 3 statuses on your lead status field, saying the hot, the cold, and the warm. You need to perform specific set of actions for staying out there. For heat, you have email, a task. For the cold you have another set of actions to perform, so you have a fixed set of actions to perform. For warm you another set of actions.
If you were to use a workflow to do this, you will have to set up one workflow rule for each of your picklist.
You have to set up one for the hot, one for the warm one, and one for the cold. But with Processes you can actually manage such situations. You can create a single process out there. The whole process can contain all the three workflows. It can actually be abbreviated to one single Process.
Another thing is it is easy to maintain. That doesn’t need any explanation, I guess. You are going to replace your Apex triggers. Just imagine the amount of burden that has been released when you are not going to use Apex for these and you have a point and click functionality to do that. The other important thing is it comes with a very powerful user-friendly designer. You need to use a workflow, when you are setting up workflows, you have to actually run through different steps. It’s like a wizard like in the phase.
On step 1 you have to specify your objects, on step 2 you have to specify criteria and on step 3 you specify the actions.
It’s all on 3 or 4 different screens, even though there is some context to linking, it isn’t that user friendly. You have to use 3 or 4 different screens.
But the best thing about processes is you have everything on one screen, you don’t have to travel back and forth between pages. You just have to stay on one screen, one page at a time, you can set up everything. So that’s the best aspect about Processes. What all can processes do when compared to your workflows?
The starred ones are: They represent all those actions prior to Processes they required you to write triggers. You can’t create a record with your workflows but with Processes you can. Updating fields on your related record. Imagine the parent and child were related through a lookup. You’ll have to write an Apex trigger for that. But with Processes,no worries, you can do that. Even if you had any situation where you had to update all the child records, you had to go for a trigger. But with processes irrespective of the type of relationship, may it be of lookup, may it be of master detail, you can update your parent. And it can also update your child records irrespective of the type of relation.
Maybe one of the common use cases that you would find that we’re going to discuss in this webinar is, you know, updating the mailing address on your contacts when the billing address on your account changes. That is one of the most common use cases that you are going to try out during this webinar. Some of the other interesting actions that you have not seen and that is there on processor is posting to Chatter. An opportunity was one, you want to post some congratulation message to the opportunity owner, you want to post an announcement to another chatter group. All of this can be done with the help of processes. Another more advanced and most powerful feature with the process is launching flows. You can launch visual workflows, you can launch them.
Another thing that I haven’t actually specified on the screen is submitting records for approval. Most of the time you can see users saying, “My record follows the criteria, but it hasn’t yet gone into the approval process. Why is that?” That’s because within SalesForce, as of today, record goes into the approval process only if you press the “submit for approval” button. What if you want to automate this?
When the records satisfy your entry criteria for the approval process, it should get into the approval process then and there. You don’t need a user to go in and click the “submit for approval” button to make it happen. You would just want it to be automated.
You want that to happen by itself. There you come you have processes to do this. So those are some of the areas where you can make use of processes. Now how do I create processes with the spring 15 almost all the developer production sandboxes have been added with the process builder?
It is the process builder that we use to actually create process. Process builder getting on to a built technical, it is basically built with the Lightning Component framework. I’m not sure if you are aware of that. Lightning Component is a new developer framework.
And very important, this Process builder comes only with enterprise edition. You don’t have process builder, or in other words you cannot create processes in your group edition or your professional edition.
Pretty much like your workflows. You have workflows only on enterprise edition and above by default.
Now how do I get into the process builder? You go to the setup menu, then you have create, under create you have workflows and approvals, and right below workflows and approvals you have your process builder. Now let’s get into how a process builder looks like does and what are the different parts of a process builder. Main parts of the process builder is you’re Button Bar and the Canvas.
So let’s get into my developer and see process builder live there. So right here, you can see that I have expanded my create menu. Right there, there is the workflows and approvals. You have your process builder. The easy way, you can just can simply type in “process” and see process builder right here. So if you notice the address bar, you can see that it runs on the lightning domain. The host name has changed to lightning.
You know, it’s kind of using the lightning components to build the UI. Right now, the list of processes if you haven’t actually generated the processes till now, you can actually see another screen that gives you links to SalesForce help manuals and things like that.
I have a couple of processes built out there. It is showing my process list as the first thing that I get when I get into the process builder. Right here you can see all the processes developed so far in your organization. Then you have the back to setup, to actually jump back to your setup menu. Then you have the new button right here. So let me hit the new button. So when you hit the new button, you have some of the common properties that you have to set. When you get into the details, you can see an existing process to see the different parts of the process builder. This is how the process builder looks like. You have the button bar on top which has different buttons.
You have an “expand all” and “collapse all” which you can use to expand and collapse your action groups.
Then you have the “view all processes” which takes back to the original starting screen, with all your processes listed. Then you have the clone which can be used to clone an existing process, the process that you are actually working on now.
Then you have the edit properties which you can use to change the properties of the process.
Now that’s the button bar. The next important section is the Canvas. This is where you actually draw out your process. Where you send your process up and running. You have the object node, then you have something called the criteria node here, which you see in blue, then you have action groups. These are basically called action groups in process builder. There is an immediate action group, there is a scheduled action group. And you can see that you can add criteria notes down to the bottom, as many criterion as you want, it seems you can add around 2000 criteria, criteria notes can actually be executed at the run time. So there are pretty lot of options for you to add down, right here.
So back let’s go. So now let’s try out building the process of using this new process builder and this use case that I’m going to use is, you know, updating my contacts, updating the mailing address on my contacts when the billing address on my account changes. Let me see how can I go about setting up a process that can do this. Now like I showed you before, the common properties that you have to set when creating a process is, the name and the description. You type in the name, the API name gets generated automatically. Then you have the description. This is very important. You have to specify a description. You are creating a process which is going to replace an existing workflow or maybe an existing trigger, or maybe a brand new feature of process implementation.
So it is very important. You specify the description that helps to maintain it much better.
The next thing that you do, the first thing that you do in setting up the process is adding the object. You specify the object on which this process resides on. (You know, it can be an object on which your process resides on.)
Pretty much like what you did for the workflow, the first thing that you do for setting up the workflow is selecting the object. That’s the same thing that you do here right in the processes. The next thing that you specify in the process is when the process should execute. Should it execute when a record is created or should it execute when both the record is created as well as when a record is edited? So let’s go in and just try out.
Remember the use case, that I’m basically trying to use is: I’m going to set up a process which is going to update all the contacts, the mailing address on all my contacts, when the billing address on my account changes.
Let me go back to view all processes. Yes, I have another process which does this exact same thing. So let me delete that first. From this you can see that something the workflows can never have, process can have multiple versions. Process can have up to 50 versions but at a time, only one can be active. This is another added feature that didn’t actually exist for workflows. It can have multiple versions for your process. This process is already active. So I’m not going to delete it. Let me create another process.
Hit on the new, let’s type “Webinar Contact Address Update” and so the API names get generated. Type in the description. You are not going to skip that field and then you are taken to your process builder canvass. The first that you do here is click on the add objects to specify on which object this process resides on. So like I said, when should the process execute. Whenever the billing address on my account changes, so the process is going to reside on my account object. So you type in “acc” and you can see that there’s an auto suggestion there. Click on account and it shows. So this is very, very important. You are not going to type in the whole name of the object right and there and then not select. You have to type in the name maybe three or four characters. It can give you the suggestions and then you have to click on the item right from the list. Cannot just type it and leave it. You have to click the item from the list.
The next thing that you’re gonna do is specify when the process should be executed. Should it be executed only when the record is created, or it should be executed or evaluated when both the record is created as well as when the record is edited? So in my case, you know, the process should be when the address on my account changes. So it is definitely going to be when the record is created and edited. So let’s say, the next thing that you want to do is adding a criteria. So let’s go back.
So the next thing is adding a criteria.
This is a very important step when you are building a process. This is one step that has a lot many options to configure. You have new options that have been introduced with the processes, which is not there in your workflow. There is a very interesting new feature; I would say the most anticipated feature that they have introduced to processes. It’s filter logic conditions. So let’s go and see what is all this about. So click on add criteria. Now you have to specify a name for your criteria. It’s going to say when the address changes. Then you have 3 set of actions that you have to select from. The first one is when my filter conditions are met. So how do I specify the filter conditions? You can see your dropdowns, the operators right here. It is through this section that you specify your filter condition. For example, let’s say you have a much more complicated logic which cannot be actually represented with a filter condition. I need to write a complicated formula to do that, then I have to select a formula. You can see that the formulae textbox appears there. So the 3rd one is “no criteria” just executive actions. This just executes my actions irrespective of what happens. I am not bothered about if there is any change happening on my record or anything of that sort. Just execute my process irrespective of the action that actually happens on the record.
So that is your no criteria just execute the action. In this case, my process will execute only when the billing account on my account changes. So I change and specify Filter conditions are met, and I say for the sake of this webinar, I’m only selecting one of the billing address fields. Let’s take, for example, the billing country.
So right here you can see that there is a dropdown which lists all the available fields for the account objects which you can select from. So type in the name of the field, say Billing and you’ll see suggestions based on what you typed in. Ensure that you click on the item to get it selected. So click on billing country and then hit save. So you can see that the field has been added right there. Now let’s see what are the different operators that are available on the box?
You have the equals, does not equal, starts with, ends with, some of the most common ones you’d already seen when you were creating workflows, views, reports. There is another set of 3 actions which has been introduced with, there’s something called “Is null”, then there’s something called “was set” and something called “is changes”.
Prior to Processes if you had to use a workflow, you don’t have an operator which says “Is changed” but with processes you have the operators that say “is changes”. So my condition is going to be whenever my billing country changes, how do I save that. Select “Is changed” and set it to “True”. The billing country is changed.
The next thing that I have to specify is my Filter conditions. So prior to processes in workflows, you didn’t have much customization options right here, but with processes you do. You can have an option that says, “All of my conditions are met” and then you have another option that says just one of them. So, for example, in this case, if I’m adding another row which says Billing, let me type in billing and it should give you billing city right away. The operator says “Is changed”, set it to “True.” 2 conditions right here. So imagine my process. It shouldn’t just execute when all of them are changed. It should execute when either one of them is changed. So I can say any of the conditions are met. Now the 3rd one is customize the filter logic. This was the filter logic I was speaking about. This is where you can actually set up complicated filter logics.
Say, for example, say you have 5 or 6 of them, you can write say 1 and 2 and say maybe within brackets you have 3 or 4 , the filter logic can get complicated depending on the kind of conditions you have right here.
The last available option out of the box is “do you want to execute the actions only when the specified changes are made.”
This is pretty much similar to what you add on to your workflow rule.
To create a workflow rule, you need basically 3 different evaluation criteria which was created, then there was something called created and edited, and then there is a 3rd one which is called created, and anytime it is edited to subsequently meet criteria. So, for example, I’m seeing a criteria which says the stage name is equal to closed one. And if I have this option set, it means, previously the stage was not closed one and now someone has come in and updated the record and the stage is a closed one now. So it is pretty much similar to saying “Is changed”
The staged names are changed if it is changed to closed ones.
So back to the process builder, it is the exact same thing that you see here. If I check this I should say an arrow that says, you cannot use this logic when you are using “Is changed”
So this is a very common behavior which you have for your workflows if you are writing a formula.
If you are writing a formula which is making use of “Is changed” function, you cannot make use of this evaluation criteria. This evaluation criterion if you were to use a formula which has a function called “Is changed.” So it is the same behavior, I’m not bothered about that. I’m just checking that. Just hit save.
So that’s it, you have the criteria notes set up for your process.
Let’s go to, let’s remove the filter logic and all of the conditions are just met. Now that’s my criteria node. The next thing I have to do is add an immediate action. What is the action in this case? The action is updating all my child contacts. So this option was not there in your workflow rule. The workflow rule can only be used to update on the same record or maybe a field on a related record if the relation was a type master detail.
But if you look into processes you have a lot many options to choose from and one of them is “Update records.” So this one action called the records, actually represents every possible updations that you can do. So it is the same action type which you can use to update our child records, and also to update your parent, if the relation was of type lookup.
Or maybe even updating the same field on the same object.
So in this case I’m going to update my child contact. So I’m going to specify my object which is an account, and then I can specify my child contacts which is represented as contacts in this list. Let’s hit contacts and hit save. So this now represents all the child contacts to your account. So this time, it is not just one field, it is actually a number of records that you have to deal with. Actually shown here is a number of child contacts to your account. Now you have to specify which field on each of my child record is to be updated. So I can say in my case it has to be the mailing. The mailing country on my contact record has to be updated. Now what should it be updated to? It should be updated to match the billing country on my account. So how do I see that? Right there you can see that there is text entry field. There is a button right here, which shows the pencil mark for now. This is called text entry. This particular text box has 2 modes.
There is a text entry mode and there is a field clicking mode. If you click on the button you can see that it is boxed between the two. The first one which is shown by default is a text entry field, where you can enter the text right here where you can enter USA or so.
Now if you change if you click it once more, it swaps to field picker mode. In the field picker mode the mailing country has to equal the billing country on my account. So type in billing and it should give you suggestions based on that. Click on billing country and it is saved.
So that’s it, you have your action defined.
If you want to add a name for your action, let’s say “Update Contacts” and it’s saved. So there you have the first process with your criteria node and the action setup. So now all you have to do is activate the process. So let’s go back to your presentation. So like you just saw from the demo, this was setting up immediate actions. In processes it’s called an action group. These can have so many actions, up to ten actions below that. There could be a create task or there could be post to chatter, there could be updating parent record, child record, so on and so forth. Like you added an immediate action, you can even add scheduled actions in your processes. Every action that was available for the immediate action group was available for scheduled actions too. And the same limit applies here too.
So you can add utmost ten actions to your schedule.
Now one thing that you have to keep in mind is, there are a lot of limits and apart from this, in processes you can add only one schedule within one action group. So let’s go back to my process. And, for example, if you go back to the count. If I change it to “only when a record is created” I would see that a scheduled action group becomes active. So you can see that a scheduled action group has become active. Now if I hit “Set schedule” I can specify my schedules. Say, for example, 1 day after my created date. So that’s it. You can just specify one schedule at a time within one action group. This is one limitation that you have with processes unlike workflow rules where you had an option to add multiple schedules, but in processes you cannot do that.
Scheduled action group. You can add your actions below that schedule. All right, let’s go back to the slide. That’s pretty much the new process that we’ve just created. Now let’s head on to some of the most traditional, some of the most common use cases that you have which couldn’t be solved with workflows, but can be solved with process builder. So this is one which I showed you on the demo, which is updating my child contact records when the billing address on my account changes. So right in here within the screenshot you can see that I’m changing each of my mailing address field. I’m setting my mailing city, I’m setting my mailing country, mailing postal code, the mailing street, and the mailing state. Each of them have been set into the field picker mode and I have specified which field that has to be set to. So this is one common use case that you will have. For example, you have a use case where you have to update your child opportunity products when some changes happened on an opportunity. So if you set up a process on opportunity and if you select as update records, you can see that you can select opportunity products like we’d an action to select contacts.
The next common use case is updating your Lookup Parents. Let’s go back to “My process.” There’s a process which says “Last contact created on process”. So this use case is all about updating a field on my parent record. And you know what’s specific about parent? The child and parent are related via a lookup. So you cannot use the workflow to do this. You need to write an Apex trigger on your child object to update a field on your parent. With processes you don’t have to do that anymore. You can set up a process on your child object to update fields on your parent irrespective of the type of relationship. As you all know that the type of relationship between account and contact is of type lookup, I cannot use workflow to set up a field on my account. So I went and used process to get this done. So pretty much like I said, the first thing that you have to do is set up the object.
The use case here is update a date/time/field on my account record showing the date and time on which the last contact was created. So I have a date/time/field on my account record which has to be updated with the latest date and time of the last contact that was created. So I specify, my object is obviously “Contact” process is set up. It has to be evaluated only when a new record is created. The next thing that I did was setting up my criteria node and I had specified “AccountID Not Empty” the criteria was based on “Filter conditions”. I had not used formulas nor have I used the third one.
Now here is my filter condition. This is very, very important.
For example, if you are waiting a parent, you have to make sure that the child and the parent has been linked. If your contact was a private contact, if you don’t have the account ID filled in and if you haven’t added this condition right here, your process is going to break saying that it couldn’t find an account record. It seems that the account ID field on my contact is empty. How am I supposed to know which account to update and your process is going to fail. So this is very important. If you are planning to update your parent record, you have to add a condition that says the child record has been linked to the parent. In other words, the lookup parent field is not empty. So that is what I am specifying here. The lookup field to the account on a contact record has an API name which is Account Id and that’s the reason why you’ll see account ID right here. The operator I have selected here is “Is null”. So when the account ID is not null, execute this process only if there is a valid record ID on my contact record. And my filter condition was again pretty straightforward. All of the conditions are met.
The next thing I did was adding an immediate action. The immediate action in this case was specifying an immediate action which would update the Date field on my account. All I had to do was specify the object, the related object, that was Account and then I get a list of fields that are available right here. And then I specify the value to which that should be updated to. In my case it is going to be the Contact Created date. So this is one other use case that you can use with your processes. There is updating fields on the Parent record irrespective of the type of relation. May it be a lookup or may it be a master detail you can use a process to get that done.
So back to the slide, another common use case is email alerts for my task. This is one of the most commonly asked requests that you get from your users. I need an email alert to be fired to me as well as the assignee. How do I get an email alert for the task? If a task has been assigned to say a person X, it is obvious that the email alert or the notification would be sent to the person X. How do I get a notification to myself, maybe the admin or manager? I need a notification from every task that has been created to so and so person. You don’t have an option for email on workflow tools. So this is where Process wins. With the help of processes you can make the idea of email alerts possible for your activity or task. How can I get this done?
Let’s go back to processes; there is this “Email alert for new tasks”. So the Process by itself is pretty straightforward. It is set up on the Task object. The criteria is only when a record is created. I don’t want this to be done every time a record is created as well as edited. No, not that only when the record is created. Next thing is specifying my criteria note. This is where I have utilized my 3rd condition. This is where I need a notification, irrespective of what is there on the task record. I am not bothered about the task record, who the assignee is or whatever. I just need a notification for every task that is logged on to my system. So I use the condition that says “No criteria-just execute the actions.” Now what is an immediate action that I have used. So if you notice the immediate action I have used in this example is a Flow. So as I’d mentioned in the slide, in the 3rd or 4th slide, one of the available action for a process is launching a flow. So in this example, what I have done is I have set up a flow in the name, “Send email” and that Flow has been invoked from this process. So let us just go back and look what does this Flow actually have. It is a pretty straightforward flow. You have just one, this is the flow. It is called task notification. There isn’t much within this flow. What you have is just one static action which is called send email which you get right from here. You can grab send email and drag one. Let me see what I have set up on the send email object.
I have specified the body, the subject, and to whom it has to be notified. To whom are you notifying this email when a new task is created? So that’s it. What is this body all about? Let’s go in and see that is this body. The body is basically a text template field. What is a text template? Let’s go to resources. Under the resources tab, you have lot many options to select from and one among them is called text template. I have created a new text template. It is called Task Email Alert Body.
Let’s see what is there in this text template. It is a pretty straightforward text which says “Hey! There is a New Task created in the System and this is the Subject, this is the Priority, and this is the Comments. So what are these? These are basically variables that I have created within my flow. I have created one variable to hold the comments, one variable to hold the priority, and I have created one to hold my subject. And I have used all these 3 variables, you know, corresponding to their respective labels that I have written here. Now how am I going to fill the values into these variables? So if you go back to the process, you have to notice that my process runs on the task object. So when my process runs on the task object, the record that initiated this process is there within this context. And that record is basically your task. What you can do is when you specify a flow, you have the platform automatically show that shows you the fields that you can select from. Remember that this field is listed here only if you set the type of the field to Output/Input. I’m sorry, if you select the type to Input, then only that field will be listed in the section. Because I have set the Input Output type to both Input and Output you can see that I have this field right here. So I’m specifying my comments field. So what should go into the comments? The description of my task. So I’ve used a file picked to specify that. Now what should go into the task subject variable? The subject on my task. What should go into my priority? The priority on my task. That’s it! It is pretty straightforward there. Now, when the process invokes, all the three variables within your flow will be set via these 3 flow variables. And then this flow right here evaluates by itself and the email will be fired to me. So this is one very important or very interesting use case that you can get done, you can get it done, with the processes. So back into the presentation. That is one very important usecase that you can try out. That is email alerts for your tasks, events. In other words, your activity objects.
Another important action that has been introduced with the processes is “submit for approval.” Like I mentioned, one of the most common requests that you get, how can I get this record into the approval process without a manual clicking right there. So without processes, you had to write a trigger. But with process, you can see that there’s an out-of-the-box action available called Submit for Approval which you can select to actually trigger your approval process. So let’s go back and see a process which you have actually created to get this done. So right here, I have a process which says, Contact, Do not Call Process. The use case right here is, you know, whenever the do-not-call checkbox from a contact has been unchecked; the contact has to be sent into an approval process. So I have an approval process in my ##which is basically to deal with this, i.e., when a contact do not call is unchecked I want every contact to enter into an approval process. So I have set this up on my contact object. So every time my contact is either created or edited. I have specified my criteria node saying that when the filter conditions are met, when the do not has been changed, is true. So the immediate action to this is another submit for approval that I have selected. So if you create an action called submit for approval, you can specify the approval process that has to be invoked. And you can also to which, who is the user, who is actually submitting this record, you can specify current user or you can specify other users or maybe fields on the records. Then the submission comments which you can specify. So it is pretty much straightforward, a couple of options to set and you have your process with approval processes and immediate action, right up and running. Now, that’s pretty much the use cases that you can try out.
Let’s get into what are basically the limits that you have to keep in mind before you get in and start using a process. So look out for recursive loops. This is very important. For example, you have 2 processes – one process creates a record and if this process triggers another process, which has been set up on the same object, maybe to do another action, say, Update, then that action shouldn’t trigger the process 1 back again. If this happens, this will be a cycle. Process 1 triggers Process 2 and back and forth.
So what would happen is, you would run out of your limits. You would run out of limits that have been set for an hour. There are limits that have been configured, that have been set saying you can run only maybe say 1000 or 2000 processes in one hour. I’m not sure about the number but you have limits for that. So when there’s a recursive loop out there, you are going to run out of limits for your one-hour time period. The next thing that you have to remember is you are going to play the process and this process is going to replace one of the workflow or trigger out there. So it is very important you delete or you reactivate your trigger and your workflow before you activate your process. Otherwise, you would see unexpected behaviors happening. The next thing, the next very important thing is picklist fields are evaluated as text fields within your process. So you no longer have to actually make use of your formula functions like pickval or text to deal with picklist fields. You don’t have to do that. Your picklist fields are considered as text fields. So you can right away type in your picklist field and then go ahead with the operator. You don’t have to use your “is pickval” or text functions anymore.
The next important processes don’t follow ownership transfers. You know that when you update the account owner, the opportunities, every other child record to that record will be updated. The contacts, the owner of the contact, the ownerships of an opportunity will all be updated if you are changing the owner of an account. If you are changing the owner of an account through a process that won’t happen only the owner of the account changes, the owner of the contacts or the opportunities don’t change. In other words, processes don’t respect Ownership Transfers. So in other words, you have to explicitly add immediate actions within your process to manage the owner change of your contacts, the owner change of your opportunities. The next important or my favorite is the actions that are executed in the order they are added. So, for example, say you have 2 immediate actions. The first one is post chatter and the 2nd one is submit for approval, you can assure that the 2nd one is running only after the 1st one is completed. So this is a big advantage. Say you have 2 or 3 field updates on a record; you can make sure that the order is the 1st one, then the 2nd one, and then the 3rd. So the next one is Administration Considerations that you have to keep in mind. So very important. Once you have activated a process you cannot edit it. You added the option to edit your workflows, you deactivate it, you can actually edit it. But when it comes to Processes, once you activate a process you cannot edit it. So it is very important that you design what you need to do or design your process well beforehand before you get into implementing this process because once you activate it, it is not going to be available for any edits.
The next thing is when a process faces an error, when there is an error within the process, you could see that the error message says that so and so flow failed, instead of saying so and so process failed. You know what is the reason behind this? In fact, when you create a process, you basically create flows behind the scenes. Everything that you do, i.e. that is from your posting to chatter, the action called create a record, it’s all made possible by creating hidden flows behind the scenes. So creating a process means, behind the scenes, sales was actually creating flows. Basically what is failing here is your flow. That is why I mentioned, you get error messages pointing to a flow but it is actually the process that has failed. Now, the other advantage with processes is that you can have up to 50 versions. This is where the idea of collaboration comes in. You don’t have to switch workflows. You have many versions that can be created or one process. But at a time, you have only one of them active. For example, you created say 2 processes. The first one is active, fine, and running. One fine morning, you have a new request that came in, you added a new request, you made the second process active. But you find that the second process is breaking something out there. So what you can do is, you can simply deactivate it, go to the first process and activate that. Then, the next important thing, if you don’t have ID fields configured and set within the record, it is going to fail.
For example: if you are updating the parent record, your parent account from within the contact, and the contact doesn’t have a valid account detail looked up, the process is going to fail. So you need to have ID fields set into the lookup fields or master detail fields. And it’s very important to know that once you deactivate a process, you have to wait for around 12 hours to actually delete it, or make any further modifications.
But the next thing is Scheduled Action Considerations. Like I said before, schedules actions are much more complex features. You have much more complex features to keep in mind, but these are some of them which I felt was very important. If you have a scheduled action up and running and if you have certain records that already satisfied the process criteria and have schedules actions in the queue, and if you happen to deactivate you would notice that the scheduled actions will still remain in the queue. They are not updated. The scheduled actions will still remain in the queue and will continue to execute even if you deactivate the process.
So like I mentioned before, you have to plan well beforehand if you go ahead and activate the process. The actions in the past are executed within an hour. This applies to workflows also. You are setting up a process. If records satisfy these conditions, if there are records that automatically satisfies, you can see that the actions are executed immediately within an hour. Another important thing is schedules cannot be based on Dynamic Dates. You cannot specify dynamic dates like today or now when it comes to setting up schedules. You have to specify a static date, time which has a value in it. For example, one of the created date time fields or maybe another date time fields on the record. You cannot make use of dynamic dates nor can you make use of fields on the other records or on the related records. The field has to be on the same record and it should be a field. It cannot be a dynamic date or a formulae field. Now another thing to note is when you have a schedule which is set to run when you have created a schedule which says one day maybe one hour from the point of time when the process is run, when you specify now it is the user’s time zone that is taken into consideration. If you are setting a schedule based on a date field, you can notice that the aux time zone that is considered. These are some of the considerations that you have to keep in mind. But I would strongly suggest you to read through. There are more considerations to keep in mind. Basically scheduled action is a much more complex feature with lot of limits too. So keep in mind before you head to actually implement that.
So now what are the limits that you have to keep in mind? Very important. All the limits are applied to your processes. Every governor limit, all those developers out there would know what governor limit costs you. So every governor limit applies to your processes. And, you know you have to understand when you have to update record, if you have an immediate action called update records, it actually costs you 1 SOQL and 1 DML. So like that for every action there is a corresponding DML operation that is actually happening behind the scenes. So you have to keep in mind that every action has been used cautiously keeping the governor lots in mind. It is also important to note that the processes generally do not validate your validation rules. If your process runs if you update a field on the record, and it has a validation rule there, you wouldn’t expect the process to fail. The process would run successfully, and you would notice that the mail has been validated. So it is important to keep in mind processes don’t need validation rules. And last but not the least, if you are planning to use email alerts, it does follow your organization limits. So these are some of the limits and considerations you have to keep in mind when you are into setting up a new process. So some of the references to keep in mind in order to get it started, these are all links to your help docs that you have on the help.salesforce.com. You should read and each and every doc out there. There are lots of things, lots of considerations and points to remember before you head into creating a process.
I would suggest you to post your questions. Deepak, it was a pleasure to have onboard. Now it is time for the Question & Answer session. We’re ready to address your questions. You can type in your questions using the Question feature on the Go To Webinar.
Questions and Answers
Q) Is the scenario the process should be on contact?
Seems like the person got the answer right away. You have to be very careful while you set up the process. Like I said, you have to plan beforehand, setting up a process to update your child contacts, you have to set it up on your account. Because the use case says that when there is a change on the field, the address field on my account update my child contact. So the thing is actually happening on your account record. So the process should reside on the object on which the change is actually happening.
Q) You mentioned no edits. Is the work around to create a new version of the Process.
Once you activate a process, you basically don’t have the option to edit it. And you would have actually to go with a new version or try out another one to get your conditions done.
Q) So, can you send the email to the task owner instead of a specific owner?
Yes. You sure can. What you have to do is, what I used was 3 variables. You had your comments, your description, let me show that to you.
Back here what I had was 3 views: I would go ahead and create another variable which is say, the email of the owner, say Owner Email. Then I would set it to input and output. Now what you have to do is back in your process, you have to edit, send in the email of your owner to that variable. So that should do, that should happen.
Q) Can we invoke the apex from processes?
That’s a good question. This is one added advantage I forgot to mention within the processes apart from creating records, apart from creating approval processes, there is another action called Apex which you might have seen. You can definitely invoke Apex codes from your processes but there are certain limits and restrictions, a set of guidelines you have to follow in fact. There’s something called invokable actions. There is an interface. It is pretty much technical. You have to write an Apex class which inherits the invokable actions interface and then define the methods. Only those classes that inherits or implements this interface can be used as an immediate action to the cause.
Q) When testing in Samdocs, does it also take 12 hours to activate.
It does not take 12 hours to activate, it is activated then and there. But yes I guess the deactivations take that much amount of time. Deactivations in the sense, once you deactivate your process it is no longer going to be working. In order for you to make any edits, or changes to your criteria or adding new actions, you need to wait for 12 hours.
Q) When we want to update all child records, can we restrict only some records?
No. You cannot do that. If you select your child object, every record on your child object will actually be updated. How can you get rid of this? I would say, you have to actually make use of flows. You have to actually make use of flows to deal with that. But out of the box, it just updates all the contact records then and there.
This is all the time we had.
One more question.
Q) Can I create a process to update a contact that is created by the conversion? Example, lead is converted and creates a contact. Workflow can be updated with the text field on that contact with the created date. I want to override that date if the converted field has a different date in another field.
I’m not sure. Basically you wouldn’t need a process to do that. If you had a way to transfer the lead to another field on the contact via the map field contacts option, I’m guessing we can do it even within the workflow. But it is definitely possible with Process which you can use.
A veteran blogger, he is one of the youngest MVP in India and one amongst the 118 MVP’s. He is constantly among the top 10 of the 100,823 members among the SalesForce Success Community. Deepak is a voracious reader and a football fanatic who cannot get enough of Barcelona and Messi!