Getting Started with Process Builder – Part 1 (Auto Create a record)

Idea
The purpose of this article is to discuss about Process builder. Process builder is generally available for use, after Spring’15 release. From today onwards I am going to start a series of blog post on Process builder, I will try to post at-least one article per week related to it.
What is Process Builder ?
Process builder is a combination of Flow and Workflow rule. In other word we can say that it’s a next level of Workflow rule, that allows us to automate your business process by creating Processes with point-and-click.
How to enable Process builder ?
Process builder is only available in Enterprise, Unlimited, Performance and Developer editions. After Spring’15 release it will generally available for above mentioned editions.
Why Process builder?
Workflow rule has a few limitations like using WFR you can’t create child record, Post to Chatter or Auto submit record in Approval process. Let’s start with a business use case
Business Use case :-  Corey Eridon is working as System administrator in Universal Container. She receives a requirement to auto create a child case whenever a new case is created with Case Reason Breakdown.
Solution of above business requirement
To solve this requirement, we will use Process BuilderWhenever we create a Process using Process builder Salesforce auto create a Flow and Workflow rule (With an action) to fire it. At the end of this article I will show you how to view Flow and Workflow action created by System for Process. Follow the below instructions to create a Process for the above business requirement
1. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Process Builder2. To create a new process from scratch, click on the New Button available on Process management page, A popup will open where you have to enter Name (Enter Create_Child_case_for_Breakdown as name)API Name and Description as shown in the below screenshot
Define Process Properties
DEFINE PROCESS PROPERTIES
3. Once you are click on the Save button, it will redirect you to Process canvas. Click onObject node to add object and set the evaluation criteria, Please refer to the following screenshot for more details
Evaluation criteria
EVALUATION CRITERIA
4. The next step is to define Process criteria. For this click on Add Criteria node, enterCriteria NameSet filter conditions (Similar to Rule Criteria in WFR), as shown in the following screenshot
Process Criteria
PROCESS CRITERIA
5. Now we have to add an Immediate action into the Process to create a case record.For this use Create a Record action, Please refer to the following screenshot for more details
Add action - Create a Record
ADD ACTION – CREATE A RECORD
Make sure that you have assigned data in the correct format, because Process builderobey Validation rule. If some fields are required by using Validation rule, then make sure than you have added those fields. Same time if some fields are required using Page layout, you can ignore those fields.
6. Final task is to activate your Process by clicking on the Activate button.
Now onwards if you create a case with Case Reason Breakdown, Process will auto create a child case for it.
Flow and Workflow action created by Process builder
1. There are two ways that I am aware of, to see the Flow generated by Process Builder for current Process, those are Package or Change Sets. Now I am going to create a package, don’t worry it is very easy. Follow the path to create a Package
2. Click on Setup | Build | Create | Packages and click on the New button, enter thePackage Name, as shown in the following screenshot
Create a new Package
CREATE A NEW PACKAGE
3. Click on the Add button available under Component, as shown in the following screenshot
Add Components to Package
ADD COMPONENTS TO PACKAGE
4. From Component Type drop-down select Flow, and click on the Process we have created, i.e. Create_Child_case_for_Breakdown as shown in the following
List of active Flows and Processes
LIST OF ACTIVE FLOWS AND PROCESSES
5. It will redirect you to the Flow detail page, see the Type i.e. Workflow different from normal (Flow or Autolaunched Flow). Now click on the Open link as shown in the following screenshot
Flow Created by Process builder
FLOW CREATED BY PROCESS BUILDER
6. It will open the Flow, which is generated by Process Builder for the Process we have created. There are two SObject Variables created by Process to pass old and New Id of record to Flow
Create_Child_case_for_Breakdown Flow
CREATE_CHILD_CASE_FOR_BREAKDOWN FLOW
7. To check Workflow action, use this URL https://gs0.salesforce.com/09M, change the Salesforce instance, as per your current organization instance. I have created a custom view to see additional details
Workflow action to call a Flow
WORKFLOW ACTION TO CALL A FLOW
8. If you click on the Edit link, it will look like the following screenshot
Edit action Flow param
EDIT ACTION FLOW PARAM
Note : – This is my finding and only for learning purpose. Don’t delete any actions or Flows.

0 comments:

Post a Comment