Automation with Workflows
Before closing this book, we’ll dive into process automation and show the main features for providing a highly efficient process design.
In this chapter, we’ll see what process automation is and which tools the Salesforce platform delivers for an administrator to enhance process automation; then we’ll focus on workflow rules, a platform feature that delivers point and click automation, meant to automatically execute actions (such as field updates, and emails) on records based on specific conditions for the field, just like a programmer would do while coding, but without any code!
In this chapter, you’ll learn the following:
- What process automation is
- How to build workflow rules
- How to apply different automated actions
- How time-based workflows can be set up
What is process automation?
Users are humans and so they can make mistakes, forget how things have to be done, get sick, or be affected by other impediments.
Moreover, certain business process tasks can be executed by the Customer Relationship Management system (CRM), leaving agents free to execute more brain-intensive actions—this is the scope of business process automation.
Salesforce offers more than one way to implement automation in your CRM:
- Workflows: Execute a different kind of action when the given criteria (field conditions in record fields) are evaluated on a given object.
- Approvals: Act like workflows, but the kinds of action (which are mostly the same as we’ll shortly discover for workflows) are limited to record approval (for example, discount approval to an opportunity).
- Entitlement process: We covered this kind of automation in Chapter 6, Service Cloud Applications.
- Lightning process builder: This tool assists in the evolution of workflows, making more actions available (even Apex actions) and increasing criteria complexity.
- Flows: A point and click framework for creating multi-step wizards (to gather user data) or for creating complex and automated logic to manipulate data without user intervention for the most complex business requirements.
- Custom code (Apex, Lightning framework, and Visualforce): This is the developers’ realm, custom code to manage both the user interface (Visualforce and Lightning framework) and automated actions (Apex triggers).
Which tool should you choose?
As David Liu (Google engineer, Salesforce MVP, and creator of the Salesforce Coding Lessons for the 99%, www.sfdc99.com) wrote in one of his greatest posts (refer to http://www.sfdc99.com/2018/01/22/workflow-process-builder-flow-apex/), a golden rule states that you have to use the simplest tool for the job, but with Lightning Experience this is no longer the case. The rule is now that it depends on the kind of environment and business type in which your organization is working.
He identified 10 categories used to classify automation tools:
- Simplicity: Is this tool simple enough to configure?
- Functionality: What kind of things can it do?
- Limits: Which limits may I encounter when I am running the tool?
- Scale: How much can the tool be extended?
- Debugging: Can I easily debug the tool?
- User experience/error handling: How does error handling work?
- Testability: Are out-of-the-box testing tools available?
- Speed: What is the speed of execution of the tool?
- Time to deploy: How long does it take to deploy this tool in production?
- Risk: What is the risk of using this tool?
Each category is given a value in a range from Bad to Excellent.
In this analysis, you won’t find approvals as their features can be related to workflows.
As an example, considering complexity versus functionality, the result we obtain is as follows:
Automation tools compared over functionality versus complexity
This means that if you need high-level features with easy configurations, you need to go for workflows, while if you need complete control over what you are doing, accepting an increased level of complexity (you need to learn Apex and Visualforce/Lightning framework), go for custom coding.
Trust your team’s level of experience as well: charts and graphics can give you guidance, but it will always be you, as an advanced administrator, who will have the whole picture of how your CRM is going to be built.
For an overall view of process automation tools, refer to Salesforce Help at https://help.salesforce.com/articleView?id=process_which_tool.htm&type=5#table_intro and scroll down to the Automation Tool Features table.