When asked if I could put present on Process Builder to our local Nonprofit Salesforce User Group, I was ecstatic. I love Process Builder and Flow, and am truly impressed the investment that Salesforce is putting into these point-and-click tools allowing admins to take control of their databases.
Before you start a build, you need to know which tool to use. At the first TrailheaDX, I was able to ask a panel of Salesforce Engineers the code vs click question. The answer given to a theater full of developers was a bit of a surprise: code as a last resort. Salesforce is committed to improving their point-and-click tools. When you consider that the Salesforce ecosystem is a series of shared servers, this isn't a big surprise. Badly written code, when stuck in a loop, can eat at server resources that not only affects that one org, but all the other orgs on that shared server. These point-and-click tools minimize that resource burn.
Start with Process Builder, and move forward from there. As a best practice, I try to have only two Process Builders max per object: one on creation and one on edit. This makes your automation nice and clean which means easy to maintain. Try not to create a Process Builder for every business process automation you have. Sit down and think things out before building anything. When you create the Contact record, think of ALL the changes you want made - same with on edit - map it out, and only then build. Creating Process Builders all willy nilly is just as bad as dozens of workflow rules firing randomly on creation/edit.
An important thing to note before you start working with Process Builder is that on the back-end, a Process Builder is just a Flow with a simplified user interface. When a Process Builder errors out, you will get an email saying that there was in issue with a Flow. Scroll down to the very bottom of the email to see what was the cause of the error.
If you aren't sure where to start, here are some common use cases that might help you get your automation juices flowing.
Consolidate workflow rules - an example of this is coding donations with which acknowledgement letter type: platinum, gold, silver, sustainer, memorial, etc.
Since you can't set the order of the firing of Workflow Rules, badness happens when a gift fits into more than one set of criteria such as a memorial gift that is also a gold level donation. In the past, we would still do this with Workflow Rules, but we would have to add exclusion criteria to all the workflow rules to make sure the donation gets coded appropriately. When you are talking a dozen acknowledgement letter types, this becomes a nightmare. It's just too easy to miss an exclusion and mess the entire process up. With Process Builder, you can do this in a single Process Builder.
Create records - an example of this is an organization that offers free memberships to students. The website creates a campaign member record, but you want to take advantage of the NPSP Membership functionality, so you need a $0 donation created with the appropriate member level and start/expiration dates. Easy peasy with Process Builder.
Update a field on record creation with a conditional default value - maybe you have a field that, upon record creation, you want to add a value ONLY if the field wasn't filled by the person or webform that created the record. You can't have that be a formula, because you want the field to be editable - you just want to make sure the field has a value on creation. You can use a Process Builder to check to see if the field is blank on creation, if so, populate with whatever value you want as a default value.
Automate Campaign Membership - do you want all new contacts with emails added to the newsletter Campaign? Or, maybe you want all donors that just hit Platinum Level to be added to a Campaign. Did someone opt-out? You need them removed from that newsletter Campaign. You would think that you can do this fully with Process Builder. While, technically, you can, you can't do so successfully.
If the contact is already in the campaign - maybe someone manually added them - your Process Builder will fail. You can't create something that already exists. Same with deleting Campaign Members: you can't delete something that doesn't exist. To automate Campaign Membership, you will need to use Process Builder + Flow. Stay tuned for next week's blog post on this. Can't wait? I created a managed package for you exactly for this! https://goo.gl/Zhk5Pk.
Need help with your Process Builder or automation ideas? Fill out our Contact Us page or find me on the HUB, and let us know what you are struggling with, we'll whip that automation into shape!