Book Image

Salesforce Process Builder Quick Start Guide

By : Rakesh Gupta
Book Image

Salesforce Process Builder Quick Start Guide

By: Rakesh Gupta

Overview of this book

Salesforce Management System is an information system used in CRM to automate business processes, such as sales and marketing. Process Builder is a visual tool created to automate business processes in Salesforce. It enables users with no coding expertise to build complex Salesforce workflows. The book starts with an introduction to Process Builder, focussing on the building blocks of creating Processes. Then you will learn about different applications of Process Builder for developing streamlined solutions. You will learn how to easily automate business processes and tackle complex business scenarios using Processes. The book explains the workings of the Process Builder so that you can create reusable processes. It also explains how you can migrate existing Workflow Rules to Process Builder. By the end of the book, you will have a clear understanding of how to use Flows and Process Builder to optimize code usage.
Table of Contents (12 chapters)
Title Page
Copyright and Credits
Packt Upsell

Hands on 4 – calling an Apex class from Process Builder

Process Builder allows you to call an Apex class that includes methods annotated with @InvocableMethod. By calling an Apex class from Process Builder, you can add customized functionalities, such as auto-converting leads, deleting records, or running lead assignment rules. You can also pass a required value into Apex class variables.

When no other process actions can get your job done, by calling an Apex method, you can add customized functionality for your users. You can only call an Apex class from Process Builder or Visual Workflow that have the @InvocableMethod annotation. This means that it is possible to extend the Process Builder functionality by writing an Apex class that executes your business logic, and then invoking the Apex from your process. If the class contains one or more invocable variables, then you have to manually enter values or reference field values from a related record.

Let's look at a business scenario. Suppose...