Getting Started with Process Builder – Part 14 (Automatically assign Pricebook based on Opportunity Record Type)

Posted on

Pricebook A 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 New button, Enter Name, API Name and click on the Save button

Define Process Properties
Define Process Properties

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

Evaluation Criteria
Evaluation Criteria

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

Select Record type field
Select Record type field

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

Process Criteria - Manufacturing record type
Process Criteria – Manufacturing record type

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

add action update records add price book manufacturing
Add action – Update records (Add price book manufacturing)

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

Process Criteria - Retail record type
Process Criteria – Retail record type

6. Our next task is to add Immediate action to Process for the above mentioned criteria (Record type Retail). 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

Add action - Update Records (Add price book Retail)
Add action – Update Records (Add price book Retail)

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

Automatically assign Price book based on Opportunity Record Type
Automatically assign Price book based on Opportunity Record Type

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

Opportunity with record type Manufacturing
Opportunity with record type Manufacturing

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

Final Output
Final Output


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

Getting Started with Process Builder – Part 13 (Post to Chatter)

Posted on

Post to ChatterIn Salesforce Chatter Group represent group of people. It’s a great way to boost collaboration in your organization. You can add unlimited members into Chatter Group, but a user can join maximum of 100 Groups. In this article Post Opportunity details to a Chatter Group, I had discussed how to post Opportunity closed information to a Chatter Group using the Flow and Flow Trigger. In this article we will discuss how to post a message to the Chatter Group using the Process Builder. Let’s start with a business use case

Business Use case :-  Brandon Schaefer is working as System administrator in Universal Container. His organization wants to post a message to the Chatter Group “UC Internal Announcement“, whenever an event is created for the public calendar Universal Container Conference Rooms

Solution of above business requirement

To solve the above business requirement, we will use  Process Builder. Before proceeding we have to understand Public Calender in Salesforce. Public calendars and resources are for managing group activities or shared resources. Using public calendars a group of people can track events of interest to all of them (such as Sales events, weekly knowledge sharing session, or training classes) or schedule a common activity (such as a team vacation calendar). For example with resource calendars multiple people can coordinate their usage of a shared resource such as a conference room etc. An organization can create an unlimited number of calendars. Our first task is to get the 15 digit record Id of public calender Universal Container Conference Rooms follow the below instructions

1. Click on Setup | Build | Customize | Activities | Public Calendars and Resources
2. Click on the public calender Universal Container Conference Rooms and grab the 15 digit record id from the URL, as shown in the following screenshot

Record Id of public calender
Record Id of public calender

3. The next step is to convert the 15 digit Id into 18 digit Id. We will use this as an entry criteria in the Process Builder.

Our next task is to create a Process on Event object to post a message to the Chatter group. To create a Process on the Event object follow the below instructions

4. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Process Builder  and click on the New button, Enter Name, API Name and click on the Save button, as shown in the following screenshot

Define Process Properties
Define Process Properties

5. Click on Add Object, select Event 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

Evaluation Criteria
Evaluation Criteria

6. The next task is to add Process Criteria, To do this click on Add Criteria, enter Name, Type of action and set filter conditions  (In this case set [Event].OwnerId Equals 023B00000012HLlIAM and click on the Save button, as shown in the following screenshot

Process Criteria
Process Criteria

7. Our final task is to add an Immediate action to the Process. Click on Add Action (Under Immediate actions) and select the type of action to create (In our case Post to Chatter) , enter the Name Post to Chatter. This action allows you to post a message on User Profile or Chatter Group or on Record Chatter Feed. In this case select Chatter Group UC Internal Announcement, as shown in the following screenshot

Post to Chatter - Select Chatter Group
Post to Chatter – Select Chatter Group

The next step is to add a message to the Chatter post, for this you can use message TextBox. It also allows you to add fields from the object on which you have created the Process Builder, as shown in the following screenshot

Post to Chatter - Enter the message
Post to Chatter – Enter the message

It also allows you to add the existing Topics into the Chatter post. For this you can enter the Topic name in the TextBox Add Topics and select the topic you want to include in the Chatter post as shown in the following screenshot

Post to Chatter - Add Topics
Post to Chatter – Add Topics

Finally Post to Chatter action will look like the following screenshot

Add action - Post to Chatter
Add action – Post to Chatter

8. 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

Post to Chatter
Post to Chatter

Don’t forget to active the Process by clicking on the Activate button

It’s time to test this App

Now onwards if a user creates an event for the public calendar Universal Container Conference Rooms, then Process Builder will automatically post a message in the Chatter group UC Internal Announcement. To create an event for public calendar Universal Container Conference Rooms follow the below instructions

1. Click on the Home tab then navigate to Calendar related list and click on the Single User View.
2. Now click on the Change link to change the calendar view from single user to the public calendar, as shown in the following screenshot

Change calendar view
Change calendar view

3. Now select the public calendar Universal Container Conference Rooms as shown in the following screenshot

Select public calendar
Select public calendar

4. The next step is to create an event. For this click on the New Event button once you are done, navigate to the chatter group UC Internal Announcement and check out the Chatter group wall, it will look like the following screenshot

Final Output
Note:-  Process Builder is only allows you to post message type TextPost. If you want to post LinkPost or PollPost then in that case you have to use Flow and Process Builder.

Getting Started with Process Builder – Part 12 (Implement Gamification to Your Salesforce)

Posted on

GamificationThe term gamification describes the use of game mechanics, such as challenges, achievements and rewards, to motivate your sales team. Gamification is a way to harness the competitive spirit of sales reps, the creative drive of marketers, and the desire for recognition and reward of everyone in between. It helps your organization to boost the adoption of Salesforce by applying proven game mechanics to reward valuable Sales representative to drive real business results. There are three major pillars of gamification is Challenge, Competition and Recognition. The next question is how we can implement Gamification in Salesforce using click not code. 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 implement gamification, so that it will boost Sales Pipeline. He received a requirement from his manager, whenever an Opportunity is closed within 7days of its creation do the following

  • Give a Deal Maker badge to the Opportunity owner from VP of Sales (i.e. Tushar Gupta)
  • Post this info into Opportunity owner’s Chatter profile, Similar to the following screenshot

Gamification in Salesforce Solution of above business requirement

There are multiple solutions possible for the above business scenario. We will use Flow and Process Builder to solve the above business requirement. Before proceeding you have to understand below mentioned objects in Salesforce

A) WorkBadge :- This object contains information about who the badge was given to and which badge was given.
B) WorkThanks :- This object represents the source and message of a thanks post.

First of all we will use Flow to create WorkThanks, WorkBadge and Chatter Post  records. To launch the Flow whenever Opportunity gets Closed Won we will use Process Builder. This article will help you to understand how to Implement gamification in Salesforce by using Work.com. Follow the below instructions to create a Flow for the above business requirement

1. Click on Setup | Build | create | Workflows & Approvals | Flows
2. Click on New Flow, it will open the Flow Canvas for you. Create Few Variables as Shown in the following table

Name Data Type Input/Output Type
Description
VarDT_CreatedDate DateTime Input and Output To store Opportunity Created Date
VarDT_LastModifiedDate DateTime Input and Output To store Opportunity Last Modified Date
VarT_OpportunityId Text Input and Output To store Opportunity ID
VarT_OpportunityName Text Input and Output To store Opportunity Name
VarT_OpportunityOwnerId Text Input and Output To store Opportunity Owner’s ID
VarT_WorkBadgeId Text Input and Output To store WorkBadge ID
VarT_WorkThanksId Text Input and Output To store WorkThank ID

3. We have to create a few more variables. First, create a Text variable VP_SalesVP_UserId to store the User ID of VP Sales, in this case User Id of Tushar Gupta, as shown in the following screenshot

User ID of VP Sales
User ID of VP Sales

Second Variable VarT_BadgeId is to store BadgeId. In this case Badge Deal Maker, as shown in the following screenshot

Variable to store Badge ID
Variable to store Badge ID

And third variable VarT_Message to store the message that you want to use in Chatter Post, as shown in the following screenshot

Variable to store Message
Variable to store Message

4. Next task is to calculate the days difference between CraetedDate and LastModifiedDate. We will pass value to these variables form the Process Builder. For this we will use Formula as shown in the following screenshot for more details

Formula - Day elapsed
Formula – Day elapsed

5. Now drag-and-drop Decision Element (Give the name Number of Days Taken) to the time taken to successfully close a deal. Please refer to the following screenshot for more details

Decision - To calculate day elapsed
Decision – To calculate day elapsed

6. If the time taken to successfully close a deal is less than 7 then the next step is to create a WorkThanks record. Drag-and-drop Record Create element (Enter the name Create Work Thanks Record) on the Flow Canvas and fill the details as shown in the following screenshot

Record Create - Crete WorkThanks record
Record Create – Crete a WorkThanks record

Save the WorkThanks RecordId into a variable {!VarT_WorkThanksId}, as shown in the preceding screenshot.

7. The next step is to create WorkBadge record. For this drag-and-drop Record Create element (Enter the name Create Work Badge record) on the Flow Canvas and fill the details as shown in the following screenshot

Record Create - Create WorkBadge record
Record Create – Create WorkBadge record

Save the WorkBadge RecordId into a variable {!VarT_WorkBadgeId}, as shown in the preceding screenshot.

8. Final step is to post Thank badge information to Chatter. For this For this drag-and-drop Record Create element (Enter the name Post notification to Chatter) on the Flow Canvas and fill the details as shown in the following screenshot

Record Create - Post notification to Chatter
Record Create – Post notification to Chatter

Please make sure that you have selected Type = RypplePost, a shown in the following screenshot

10. Finally your Flow will look like the following screenshot

Gamification11. Save your flow with name Implement Gamification to Your Salesforce and close the canvas. Don’t forget to Activate the Flow.

Launch a Flow from Process Builder

Our next task is to create a Process on Opportunity object to launch a Flow. To create a Process on the Opportunity object follow the below instructions

1. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Process Builder  and click on the New button, Enter Name, API Name and click on the Save button
2. Click on Add Object, select Opportunity object and for the entry criteria, Select when a record is created or edited, as shown in the below screenshot and also click on the Save button

Record Evaluation Criteria
Evaluation Criteria

3. The next task is to add Process Criteria, To do this click on Add Criteria, enter Name, Type of action and set filter conditions  (In this case set [Opportunity].StageName Equals Closed Won and click on the Save button, as shown in the following screenshot

Process Criteria
Process Criteria

4. Our final task is to add Immediate action to Process. Click on Add Action (Under Immediate actions), Select the type of action to create (In our case Flows) , and then fill out the fields to define the action, as shown in the following screenshot

Add action – Flows
Add action – Flows

5. 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

Process Builder

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 updates the Opportunity Stage Closed Won, then Process Builder will automatically trigger and Launch the Flow

1. Currently Opportunity “Burlington Textiles Weaving Plant Generator – Third Phase” is in Stage Qualification and created on 3/17/2015 12:54 PM, as shown in the following screenshot

Opportunity information before update
Opportunity information before update

2. Now update the Opportunity status to Closed Won and check your Chatter profile ( Currently I am logged In through as Brandon Schaefer)

Final Output

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

Getting Started with Process Builder – Part 11 (Mass delete Paused and Waiting Interviews)

Posted on Updated on

mass-delete

In this article Getting Started with Process Builder – Part 2 (Time-dependent actions), I had discussed how to add a Time-based action into a Process. I also discussed a way to check the Paused and Waiting Interviews in the Flow and Process Builder. Click on Setup | Build | create | Workflows & Approvals | Flows and navigate to a section Paused and Waiting Interviews as shown in the following screenshot

Paused and Waiting Interviews
Paused and Waiting Interviews

Use Del link to remove an Interview (An interview is a running instance of a Flow) from Paused and Waiting Interviews queue, but it doesn’t allow you to mass delete/remove Paused and Waiting Interview. In this article we are going to discuss a way to mass delete/remove Waiting and Paused Interviews. Let’s start with a business use case

Business Use case :-  Martin Jones is working as System administrator in Universal Container. He developed a Process to update the Account Description after 5 days of its creation. For testing purpose he has created 10 records, it means there are 10 Jobs/Interviews waiting in Paused and Waiting Interviews queue. He wants to delete all the Interviews from a Single click instead of deleting each one-by-one. Below is the Process Properties screenshot of the most active version of a Process.

Process Properties
Process Properties

Solution of above business requirement

There are multiple solutions possible for the above business scenario. We will use Flow to solve the above business requirement. Before proceeding you have to understand below mentioned objects in Salesforce

A) FlowInterview :-This object represents a flow interview. An interview is a running instance of a Flow. 

This article will help you to understand how you can mass delete Paused and Waiting Interviews. Follow the below instructions to create a Flow for the above business requirement

1. Click on Setup | Build | create | Workflows & Approvals | Flows
2. Click on New Flow, it will open the Flow canvas for you. Drag-and-drop Record Delete Element on the Flow Canvas and fill the details as shown in the following screenshot

Record Delete - Mass delete Paused and Waiting Interviews
Record Delete – Mass delete Paused and Waiting Interviews

Once you are done, click on OK.  The question arises here why we have chosen InterviewLabel in the Preceding screenshot, why not any other fields.

  • This is because of there are a limited number of fields that you can select in Record Delete element for FlowInterview.
  • InterviwLabel field is made up with ProcessAPIName-VersionNo_ObjectName and API Name is always same for all versions of a Process
  • It also gives you the flexibility to mass delete Interviews of a specific version of a Process

3. Finally your Flow will look like the following screenshot

Mass delete Paused and Waiting Interviews

4. Click on the Save button and save the Flow with the name Mass delete Paused and Waiting Interviews as shown in the following screenshot

Mass delete Paused and Waiting Interviews
Mass delete Paused and Waiting Interviews

5. Don’t forget to Activate the Flow.

It’s time to test this Process

1) Currently there are 10 Interviews waiting in Paused and Waiting Interviews queue for Process “Update Description after 5 days“, as shown in the following screenshot

Paused and Waiting Interviews Queue
Paused and Waiting Interviews Queue (Before Running the Flow)

2) It’s time to Run the Flow to mass delete Interview those belongs to Process “Update Description after 5 days“. To do this navigate to Setup | Build | create | Workflows & Approvals | Flows and click on the Flow Mass delete Paused and Waiting Interviews, it will redirect you to the Flow detail page. Now click on the Run button, a shown in the following screenshot

Run a Flow

3) Go back to Paused and Waiting Interviews section available on Flow Management page and check it out

Paused and Waiting Interviews Queue ( After Running the Flow)
Paused and Waiting Interviews Queue ( After Running the Flow)

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

Getting Started with Process Builder – Part 10 (Auto forward Records to a Connection)

Posted on Updated on

2

Salesforce to Salesforce can be used to share the data both within and across Salesforce organizations. Salesforce to Salesforce is a natively supported feature of the Force.com platform, and easily enables two dealing partners to share relevant data records in real time. It allows you to share records with your business partners that use Salesforce and get real-time updates on the shared data. For example, you can share Opportunity and Lead data with business partners. Key Pain Points in Salesforce to Salesforce connection is to share the data manually. If you want to automate data sharing process, then you have to use Apex code. Let’s start with a business use case

Business Use case:-  Martin Jones is working as System administrator in Universal Container. His company as well as another company (Acme Corp), has enabled Salesforce to Salesforce. He received a requirement from higher management to auto share the new Opportunity with Acme Corp, if opportunity Lead Source doesn’t equal to Web.

 Solution of above business requirement

There are multiple solutions possible for the above business scenario. We will use Flow and Process Builder to solve the above business requirement. Before proceeding you have to understand below mentioned objects in Salesforce

A) PartnerNetworkConnection :-This object represents a Salesforce to Salesforce connection between Salesforce organizations.
B) PartnerNetworkRecordConnection :- This object represents a record shared between Salesforce organizations using Salesforce to Salesforce.

If you haven’t enabled Salesforce-to-Salesforce connection and want to do so, then please have a look of An Introduction to Salesforce to Salesforce article published by Salesforce.com

This article will help you to understand how to auto forward records to a Connection and way to Launch a Flow from Process Builder. Follow the below instructions to create a Flow and Process for the above business requirement

1. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Flows
2. Click on New Flow, it will open the Flow canvas for you, now create one Text variable VarT_OpportunityId to pass the Opportunity Id. We will use this variable in the flow, as shown in the following screenshot

Text Variable (To store Opportunity ID)
Text Variable (To store Opportunity ID)

Likewise, create one more Text variable VarT_ConnectionId to store the ID of the connection a record is shared with. To get the Partner Network Connection Id one possible workaround is to use the Developer console. Click on Name | Developer Console and run the below SOQL query

select ConnectionName,id from PartnerNetworkConnection where ConnectionStatus=’Accepted’

It will look like the following screenshot

SOQL Query - To get Partner Network Connection Id
SOQL Query – To get Partner Network Connection Id

You can also find this information from Connection Tab. VarT_ConnectionId will look like the following screenshot

Text Variable (To store Partner Network Connection ID)
Text Variable (To store Partner Network Connection ID)

3. The next step is to auto share the Opportunity records with Partner connection. For this we will use Record Create element. Drag-and-drop Record Update Element on the Flow Canvas and fill the details as shown in the following screenshot

Record Create Element (Share records with Partner Network Connection)
Record Create Element (Share records with Partner Network Connection)

4. Finally your Flow will look like the following screenshot

5. Click on the Save button and save the Flow with the name Auto Share Opportunity with Connection as shown in the following screenshot

Save a Flow

6. Don’t forget to Activate the Flow.

Launch a Flow from the Process Builder

Our next task is to create a Process on Opportunity object to Launch a Flow, only when an Opportunity Lead Source doesn’t equal to Web. To create a Process on the Opportunity object follow the below instructions

1. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Process Builder  and click on the New button, Enter Name, API Name and click on the Save button

Define Process Properties
Define Process Properties

2. Once you are done click on the Save button, it will redirect you to Process canvas. Click on Object node to add object, Select Opportunity object, in this case and set the evaluation criteria, Please refer to the following screenshot for more details

Evaluation Criteria
Evaluation Criteria

3. Once you are done click on the Save button, it will redirect you to Process canvas. The next step is to define Process criteria. For this click on Add Criteria node, enter Criteria Name, Set filter conditions (Similar to Rule Criteria in WFR), as shown in the following screenshot

 Process Criteria

Process Criteria

4. Once you are done click on the Save button, it will redirect you to Process canvas. Now we have to add an Immediate action into the Process to Launch a Flow. For this use Flows action. Use Field Picker to select the field Description and Text Entry field to enter a comment or sentence. Please refer the following screenshot for more information

Add action - Flows
Add action – Flows

5. 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

Auto forward Records to a Connection

Don’t forget to active the Process by clicking on the Activate button

It’s time to test this Process

Now onwards if a business user creates a new Opportunity record with Lead Source other than the Web, then Process Builder will automatically share it with Partner Network Connection Acme Corp

1. Now create a new Opportunity with Name “Burlington Textiles Weaving Plant Generator – Second Phase” and Lead Source blank. Then check the External Sharing related list available on the Opportunity detail page, as shown in the following screenshot

Auto Share Opportunity with Connection
Auto Share Opportunity with Connection

Process Builder automatically shared the new Opportunity with partner network connection Acme Corp.

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

Getting Started with Process Builder – Part 9 (Auto Revenue Splitting in Opportunities)

Posted on Updated on

Revenue Split

Few days back, I have received an email from Community member. She asked me, is it possible to auto split Opportunity revenue with Opportunity Team Members, when someone add new member to Opportunity Team by clicking on Add button (Available under Opportunity Team related list on Opportunity detail page) and not for Add Default Team, as shown in the following screenshot

Opportunity TeamInitially I wasn’t sure about it, but after few hours of work I can able to manage it. Let’s start with a business use case

Business Use case:-  Martin Jones is working as System administrator in Universal Container. He receives a requirement from higher management to auto share 1% of Opportunity revenue with, Opportunity team members as soon as they added to Opportunity team. Same time they don’t want to implement this feature when user use Add Default Team button to add a default Opportunity team to an Opportunity.

Solution of above business requirement

There are multiple solutions possible for the above business scenario. You can either use a combination of Flow and Inline Visualforce Page, Flow and Process Builder and few more. We will use Process Builder to solve the above business requirement. Before proceeding you have to understand below mentioned objects in Salesforce

A) OpportunityTeamMember :-This object represent a User on the opportunity team of an Opportunity.
B) OpportunitySplit :- This object represent credits one or more opportunity team members with a portion of the opportunity amount.
C) OpportunitySplitType :- This object represent provides unique labels and behavior for each split type.

If you haven’t enabled Team Selling in your Salesforce Organization and want to do so, then please have a look of Splitting Credit across Your Sales Team article.

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 New button, Enter Name, API Name and click on the Save button

Define Process Properties
Define Process Properties

 2. Once you are done click on the Save button, it will redirect you to Process Canvas. Click on Object node to add object, Select Opportunity Team Member object, in this case and set the evaluation criteria. Please refer to the following screenshot for more details

Object Selection and Evaluation Criteria
Object Selection and Evaluation Criteria

3. Once you are done, click on the Save button it will redirect you to Process Canvas. The next step is to define Process criteria. For this click on Add Criteria node, enter Criteria Name, Set filter conditions (Similar to Rule Criteria in WFR). For Process Criteria select No criteria—just execute the actions! As want to fire our Process every time whenever a record is created irrespective of any criteria, as shown in the following screenshot

Process Criteria
Process Criteria

4. Once you are done, click on the Save button it will redirect you to Process Canvas. Now we have to add an Immediate action to Split the Opportunity revenue with new Opportunity Team Member. For this use Create a Record action. Use Field Picker to select the field Description and Text Entry field to enter a comment or sentence. Please refer the following screenshot for more information

Add action - Create a Record
Add action – Create a Record

The next task is to find out Id of split type Revenue (Used in Preceding Screenshot). One possible workaround is to use the Developer console. Click on Name | Developer Console and run the below SOQL query

Select id,MasterLabel from opportunitySplitType

It will look like the following screenshot

SOQL Query - To get Split Type Revenue Id
SOQL Query – To get Split Type Revenue Id

5. 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 Process

Now onwards if a business users add new members in Opportunity Team by clicking on Add button (Available under Opportunity Team related list on the Opportunity detail page, then Process builder will automatically Share 1% of Opportunity revenue with them.

1. Currently there are no member in Opportunity Team for Opportunity “Burlington Textiles Weaving Plant Generator” except Opportunity Owner , as shown in the following screenshot

Opportunity Team with no Member
Opportunity Team with no Member

Below is the current status of Opportunity Splits

Opportunity Split (When There are no Members in Opportunity Team)
Opportunity Split (When There are no Members in Opportunity Team)

2. Now we will try to add a new team member in Opportunity Burlington Textiles Weaving Plant Generator by clicking on Add button, as shown in the following screenshot

Add New member into Opportunity Team
Add New member into Opportunity Team

It will redirect you to the page from where you can add new members into an Opportunity, as shown in the following screenshot

New members in Opportunity Team
New members in Opportunity Team

3. Once you are done, click on the Save button and navigate to the Opportunity Splits related list available on the Opportunity detail page. 1% of Opportunity revenue is automatically shared with new Team members by Process Builder, as shown in the following screenshot

Opportunity Split ( After adding few members)
Opportunity Split ( After adding few members)

Note:-Process Builder won’t work if you add members into Opportunity Team by clicking on “Add Default Team“. I will suggest you to implement this first on your developer org test it and then move it to Production.

Getting Started with Process Builder – Part 8 (Auto Sync Accepted Quote with Opportunity)

Posted on Updated on

sm1

In this article working with related records , I had discussed a way to use the Process Builder to update the Status of related Quotes to Denied for an Opportunity, whenever a Quote is accepted by the customer. Once a Quote is accepted by the customer the next step is to Sync Accepted Quote with Opportunity. In this article I am going to discuss how to automate Quote Sync Process. Let’s start with a business use case

Business Use case:- Steve Cartwright is working as System administrator in Universal Container. He receives a requirement to Automatically Sync accepted Quote with Opportunity, because business users always forget to Sync accepted Quote with Opportunity and it create problems in reporting.

Solution of above business requirement

There are multiple solutions possible for the above business scenario. You can either use Apex trigger, combination of Flow and Inline Visualforce Page, and few more. We will use Flow and Process Builder to solve the above business requirement. Before starting the Implementation,  you have to understand one important concept related to the Sync Quote feature. There is a field on Opportunity object i.e. Synced Quote, It’s nothing but a Lookup of the Quote Object. To automate Quote Sync Process you have to populate value in this field.

Synced Quote
Synced Quote

This article will help you to understand how to automate Quote sync process and way to Launch a Flow from Process builder. Follow the below instructions to create a Flow and Process for the above business requirement

1. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Flows
2. Click on New Flow, it will open flow canvas for you, now create one Text variable VarT_QuoteId to pass the Quote ID. We will use this variable in the flow, as shown in the following screenshot

Text Variable (To store Quote ID)
Text Variable (To store Quote ID)

Likewise, create one more Text variable VarT_OpportunityId to pass the Opportunity Id.

3. The next step is to update the Synced Quote field with Quote Id. For this we will use Record Update element. Drag-and-drop Record Update Element on the window and fill the details as shown in the following screenshot

Record Update (Update Opportunity - Sync Quote)
Record Update (Update Opportunity – Sync Quote)

4. Finally your Flow will look like the following screenshot

Update Sync Quote5. Click on the Save button and save the Flow with the name Update Sync Quote as shown in the following screenshot

Save Flow6. Don’t forget to Activate the Flow.

Launch a Flow from the Process Builder

Our next task is to create a Process on Quote object to Launch a Flow, only when a Quote is accepted by the customer. To create a Process on the Quote object follow the below instructions

1. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Process Builder  and click on the New button, Enter Name, API Name and click on the Save button

Define Process Properties
Define Process Properties

2. Once you are done click on the Save button, it will redirect you to Process canvas. Click on Object node to add object, Select Quote object, in this case and set the evaluation criteria, Please refer to the following screenshot for more details

Evaluation Criteria
Evaluation Criteria

3. Once you are done click on the Save button, it will redirect you to Process canvas. The next step is to define Process criteria. For this click on Add Criteria node, enter Criteria Name, Set filter conditions (Similar to Rule Criteria in WFR), as shown in the following screenshot

Process Criteria
Process Criteria

If you want to understand why I have selected Do you want to execute the actions only when specified changes are made to the record? check-box then please refer this article Auto Create and Activate the Contract

4. Once you are done click on the Save button, it will redirect you to Process canvas. Now we have to add an Immediate action into the Process to Launch a Flow. For this use Flows action. Use Field Picker to select the field Description and Text Entry field to enter a comment or sentence. Please refer the following screenshot for more information

Add action - Flows
Add action – Flows

5. 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

Auto Sync Accepted Quote with Opportunity Don’t forget to active the Process by clicking on the Activate button

It’s time to test this Process

Now onwards if a business user updates the Quote Status to Accepted, Process builder will automatically Sync Accepted Quote with Opportunity.

1. Currently Quote “Burlington Textiles Weaving Plant Generator” in Presented Status, as shown in the following screenshot

Quote Status - Before Update
Quote Status – Before Update

2. Now we will try to update the Quote Burlington Textiles Weaving Plant Generator Status to Accepted, as shown in the following screenshot

Quote Status - After Update
Update Quote Status to Accepted

3. Once you are done, click on the Save button and check the Syncing Check-box available on the Quote object. It’s already checked because of Process Builder Auto Sync Accepted Quote with Opportunity, as shown in the following screenshot

Synced Quote
Synced Quote

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