Process Builder: Automatically assign Pricebook...



Price book is a book in which the normal prices of an item are listed. Currently business users have to select a price book as soon as Opportunity gets created. In this article I am going to discuss a way to auto assign Price book based on the Opportunity record type using the Process Builder. Let’s start with a business use case
Business Use case :-  Martin Jones is working as System administrator in Universal Container His organization wants to develop a Process to automate price book assignment based on the Opportunity record type and implement the following requirements
  • If the Opportunity record type is Manufacturing then assign a price book Manufacturing
  • If the Opportunity record type is Retail then assign a price book Retail
Solution of above business requirement
To solve the above business requirement, we will use Process Builder. Before proceeding ahead, you have to understand the Opportunity object and fields to automate this process. To automate this process we have to update the PricebookId field with valid price book ID. Our first task is to get the 15 digit record Id of price books, as mentioned below 
  • Manufacturing (15 digit price book Id) :- 01sB00000006aeb
  • Retail (15 digit price book Id) :- 01sB00000006aeg
Follow the below instructions to create a Process for the above business requirement
1. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Process Builder  and click on the Newbutton, Enter NameAPI Name and click on the Save button

2. Click on Add Object, select Opportunity object and for the entry criteria, Select only when a record is created, as shown in the below screenshot and also click on the Save button

3. The step is to add Process Criteria for record type Manufacturing. To do this click on Add Criteria, enter Name,Type of action and set filter conditions  (In this case set [Opportunity].RecordType.Name Equals Manufacturing.Use Field Picker to select the field Record Type Name and Text Entry field to enter the name, as shown in the following screenshot

Once you are done click on the Save button. Finally it will look like the following screenshot

4. Our next task is to add Immediate action to Process for the above mentioned criteria (Record type Manufacturing). Click on Add Action (Under Immediate actions), Select the type of action to create (In our case Record Updates) , and then fill out the fields to define the action, as shown in the following screenshot

5. The step is to add another Process Criteria for record type Retail. To do this click on Add Criteria, enter Name,Type of action and set filter conditions  (In this case set [Opportunity].RecordType.Name Equals Retail and click on the Save button, as shown in the following screenshot

6. Our next task is to add Immediate action to Process for the above mentioned criteria (Record type Retail). Click onAdd Action (Under Immediate actions), Select the type of action to create (In our case Record Updates) , and then fill out the fields to define the action, as shown in the following screenshot

6. Once you are done, click on the Save button, it will redirect you to Process canvas. Finally the Process will look like the following screenshot

Don’t forget to active the Process by clicking on the Activate button
It’s time to test this App
Now onwards if a business user creates an Opportunity with these two record type, then Process Builder will automatically add price book to it.
1. Create an Opportunity with record type Manufacturing, as shown in the following screenshot

2. Once you are done check out the Product related list available on Opportunity detail page.

Note:-  I will suggest you to implement this first on your developer org test it and then move it to Production.

Post a Comment

MKRdezign

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget