What follows is a blog post that will help us understand
System administrator Pamela Kline is employed by Universal Containers (UC). Currently, she has a requirement from management that if a new opportunity over 1M is created, then the existing account #KeyAccount should be automatically added to the opportunity record.
Topics for Objects allow us to organize the records by using topics similar to Chatter. By using topics, you can organize records better and make your search easier. You might want to use the hashtag #Dreamforce20 in your updates if you're working on a presentation for Dreamforce20.
You can click on these topics to find out more about Dreamforce20 and see what groups and people are talking about Dreamforce20. The topic Dreamforce20 is also found in all records.
For the above business scenario, there are a few possible solutions. Process Builder will be used to address the problem. Learn why we are using after-save record-triggered flow in this scenario by reading this article.
Here, let's familiarize ourselves with TopicAssignment and TopicObjects in Salesforce.
Object Name | Details |
TopicAssignment | It represents the assignment of a topic to a particular feed item or record. |
Topic | It Represents a topic on a Chatter post or record. |
Let me show you a high-level Process Flow before discussing the solution. Spend a few minutes looking at the flow diagram below and understand it.
Let’s begin building this automation process.
Guided Practice (We-do):
There are 2 steps to solve Pamela’s business requirement using Flow and Process Builder. We must:
1.Lightning Flow Steps:
2.Steps in the Process Builder:
Step 1.1: Lightning Flow – Define Flow Properties
5.Click Done.
Step 1.2: Lightning Flow – Add a Record Variable to Store Opportunity Record
3.Click Done.
Step 1.3: Lightning Flow – Adding a Get Record Element to Find the Topic (KeyAccount) Id
To find the topic #KeyAccount Id, use the Get Records element.
1.Row 1:
7.How Many Records to Store:
1.select Only the first record
8.How to Store Record Data:
1.Choose the option to Automatically store all fields.
9.Click Done.
step 1.4 Adding the #KeyAccount topic to the opportunity is the final step. Add the Record Create flow to the flow designer and map the fields according to the below details. In this case, I am assuming that a Topic with the name KeyAccount already exists in your organization.
1.Field: EntityId
2.Value: {!varROpportunity.d}
7.Click Add Field
8.Row 2:
1.Field: TopicId
2.Value: {!Topic_keyAccount_Id.Id}
3.Click Done.
In the end, Pamela’s Flow will look like the following screenshot:
Once everything looks good, perform the steps below:
Almost there! Once everything looks good, click the Activate button.
Our next task is to create a Process Builder on the Opportunity object to launch a Flow. To create a Process Builder on the Opportunity object follow the below instructions.
Step 2.1: Define Process Properties
Step 2.2: Define Evaluation Criteria
Step 2.3: Define Process Criteria
1.Row 1
5.Select All of the conditions are met (AND).
6.Click Save.
Step 2.4: Add Action – Flows
1.Row 1:
1.varROpportunity: Flow Variable
2.Field Reference Type
3.Choose the Opportunity record that started your process
6.Save the file.
Pamela's Process will end up looking like this:
We're almost there! Click the Activate button as soon as everything looks good.
Whenever a sales rep creates or updates an opportunity with more than $1.2M, Process Builder automatically adds #KeyTopic to it.
1.k on the Opportunities tab and create a new Opportunity record with an amount of 1.2 M, as shown in the screenshot below:
2.Check out the Topic section of the page
I want to hear from you!
What did you learn from this post, is it relevant to your business, and how will you use the concepts taught in the post to improve your business processes?
Tweet me @automationchamp and use #AutomationChampionPB.