Weâre big fans of Salesforceâs new Process Builder here at Cloud for Good. Full disclosure: Process Builder is currently in beta. Its features, user interface, and any other thing about it could change significantly before it is made generally available. As beta products often are, itâs a little rough around the edges, but you can can still do a lot of great things with it–things you might not have been able to do previously without code.
Like a lot of people who cut their teeth as nonprofit Salesforce administrators, Iâm an efficiency nut. I canât help but intervene if I see my clients doing mindless, rote work that can be easily automated. Nonprofits fight enormous problems, and solving those problems requires your brain, not your fingers clicking buttons pointlessly. It drives me crazy!
Before Process Builder, you had a lot of options for automating rote processes, but solutions for complex problems often required code. Process Builder is a great way around needing to know how to code. It lets you design complex logical rules to automate your business processes with a simple visual interface and point-and-click efficiency. Itâs a thing of beauty.
With a little raving out of the way, I want to get into the details. Hereâs a step-by-step walkthrough of some recent work I did for a client to automate a rote process that was taking up a considerable amount of their time. You can use this as an example and adapt it to your own needs.
The client I was working with uses Cloud for Goodâs free Donation Split AppExchange app to help manage their accounting data. An event management system was creating new Opportunities in their Salesforce instance automatically when new event tickets were purchased, but they had to manually associate these new Opportunities with Designations in Donation Split. It was a big pain for a busy organization, and they needed a better solution that helped save time. Process Builder was the way to go!
First, like most organizations, this client didnât have Process Builder enabled for their Salesforce instance. As a beta product, it isnât available to everyone yet, but getting it is easy. Just submit a case to Salesforce support by clicking the âHelp and Trainingâ link at the top of your Salesforce instance, then click âContact Supportâ. Ask the nice folks in Salesforce Support to turn on Process Builder for you, and theyâll be glad to help you out. Theyâre generally able to respond less than a full business day, but your mileage may vary.
Once Process Builder was enabled, it was important to figure out what kind of logic we could use to automate the process. I love computers, but itâs important to remember one crucial fact when designing solutions like this: computers are kind of dumb. They only do what you tell them to do in the most literal way possible. Thatâs why itâs important to stick to think in pure logic when designing solutions like this. Computers canât figure out exceptions to rules or make interpretations the way people can.
We needed some kind of logical condition that, when always true, would let Salesforce know to fire the process. Thankfully, business needs of the organization made this very straightforward. In all cases where the new Opportunity had a certain value in its Primary Campaign Source field, we wanted the process to fire.
You would think that simply specifying the value that went in the Primary Campaign Source field would be enough, but youâd be wrong. Remember, computers are kind of dumb! While the process we were building would be able to figure out if the Primary Campaign Source had a certain value if that field had something in it, it would get very confused if the Primary Campaign Source field was completely blank, as there was nothing for it to evaluate. To that end, we needed to tell the process to only look at Opportunities that had something in the Primary Source Campaign field. I used a formula to do that, and to save you the trouble of figuring it out yourself, here it is!
IF(
AND(
NOT(
ISBLANK( [Opportunity].CampaignId )) ,
[Opportunity].Campaign.Name = “Campaign Name Goes Here” ), TRUE, FALSE)
You wonât have to use a formula for every condition, especially if the field youâre using in your logic is a required one, but itâs good to know that you can if you have to.
Once we had defined the conditions in which the process should fire, we had to tell it what it was actually supposed to do. With Process Builderâs straightforward point-and-click interface, itâs very easy. What the process is supposed to do is called an âActionâ. Actions can fire immediately or on a schedule, and one triggering condition can fire more than one action. Actions can come in many flavors–they can create records, update related records (even beyond parent-child records!), post to Chatter, launch a trigger-ready flow, send an e-mail, or submit a record for approval. To create a new Designation, we needed to create a new record.
First, name the action. Give it a descriptive name that will have meaning if you look at it a year or two after youâve built it. Next, select the object youâll be working with. Cloud for Goodâs Donation Split stores designation relationships in the âDesignation Budgetâ object, so thatâs what we selected as the object to work with.
Next, specify the fields to make changes to. For Cloud for Goodâs Donation Split app, itâs important that the new Designation Budget records youâre creating have an amount, a budget year, a designation, and a relationship to the Opportunity youâre working with. Letâs start by specifying the amount.
In all cases, the amount is always going to be the same as the amount of the related Opportunity, so we needed to pull in that value. If you look in the screenshot below, youâll notice that some of the fields in the âValueâ column have a pencil icon while others have an icon that looks like a magnifying glass looking at a folder. If the field is marked with a pencil, that means youâre specifying the value manually. If it has the magnifying glass icon, the action will look up to a related object for the value. To that end, we clicked the pencil once, which made it from a manually edited field to a lookup field, and made it equal the amount of the related Opportunity. Easy! We did something similar with the Opportunity relationship. We made it a lookup, and told it to find the ID of the related Opportunity.
The Budget Year and Designation were a little trickier, but still pretty easy. Each Budget Year and Designation is a unique record, and youâll need to add the ID for that record to each of these fields. Getting the ID is fairly straightforward. Just navigate to the related Designation or Budget Year record and look at the URL bar. At the end of whatâs in the URL bar, youâll see a string of 15 nonsensical characters. Thatâs your unique ID!
When youâre done, activate the process with the âActivateâ button at the top and youâre just about done! The last and most important step of all is to test, test, and test your process again. If everything works as intended, congratulations! Youâve automated a business process and saved yourself or your colleagues hours of mindless drudgery!
Like this article? You might also enjoy:
