Automatically Assign Topics to Records Using Salesforce Flow
This video explains how to use topics within Salesforce and how to assign topics automatically to records using Salesforce Flow.
What is topic assignment in Salesforce?
Topics are tags within Salesforce that can be added to records, providing a way of grouping and organizing them.
How do I add a topic in Salesforce Lightning?
To add topics to a record, add the topics Lightning component to the Lightning record page of the object you wish you add it to. After you hit save and return to the record, type in any tag or topic to apply it to the record. Clicking on a tag will show any Chatter posts or records that are tagged with that same topic.
Is topic an object in Salesforce?
Yes, topics and topic assignments are both objects in Salesforce that you can access within Flow (as seen in the video). You can view the fields on the Topic object here.
How can I automatically assign a “large deal” topic to opportunities using Salesforce Flow?
To apply a topic automatically to an opportunity, add the topic Lightning component to the opportunity, and create a record-triggered flow. For this example, the flow should apply when an opportunity above a certain amount is created or updated.
The flow creates a topic assignment record, which is a junction object between the topic and the opportunity record.
The following steps need to be taken to create the flow:
- Click the gear in the upper right-hand corner and click on setup, and then search for flows.
- Click on the Flows menu and click new flow.
- Select the record-triggered flow for the opportunity object and set the trigger to apply when the amount is greater than a certain amount.
- Create a get step to get the ID of the topic to apply.
- Create an assignment step to create the topic assignment record, providing the entity ID and the topic ID.
To test the flow, select an opportunity that meets the criteria and run the flow. The applied topic will show up in the topic component of the opportunity record.
Topics are a useful way to casually group different records together, and combining them with automation makes them even more powerful.
This flow was created by Brian Hays as part of Rotive’s YouTube Automation of the Week series.
Don’t forget to check out our favorite gear & resources recommendations!