As an admin, there have been times when I really wanted to prompt my users to do a certain task, but only when certain criteria are met. That’s where Actions & Recommendations comes in, a Salesforce hidden gem. In my introductory blog post Actions & Recommendations- Salesforce’s best kept secret , I talked about how the Actions & Recommendations feature can give your users a list of Quick Actions and Flows that you want them to complete for that object (for example, for an Opportunity).
For example, imagine that your opportunities are for software, of which you sell some perpetual software and some subscription-based software. You only want to prompt them to fill in subscription-related data if it’s a subscription type of Opportunity, at the Negotiation stage. How do you add Actions to the component, but only under certain circumstances?
Enter Flow. Flows can be used to add those actions to the Opportunity, based on whatever criteria you would like to set. How do you say? It turns out that to add an Action to the component, a related record must be added to the Opportunity. This record is for a junction object, something that links the Opportunity to the Action. It’s called a “Record Action.” Let’s see how this would work.
- Decide how your Flow will be triggered. This is usually decided by how any automation is currently added to your Opportunity when it hits certain stages- usually by either a Process or a Flow.
- Create a Flow that adds Actions to the Opportunity based on Stage, and any other criteria you set. If it’s triggered by other automation (whether a Process or another Flow), it can be an Autolaunched Flow.
- In your flow, start with a Get Records element and get the Opportunity that launched the Flow.
- Then add a Decision element, and add whatever criteria is needed to add the Action. In this case, I’m using a custom field as a criterion.
- To the decision branch that should add the actions, add a Create Records element, and select as your object RecordAction. This is where the magic happens! The possible field values are:
- Action Type: Flow or Quick Action (this is the Flow or Quick Action you want to add to the Opportunity)
- Action Definition: The API name of the Quick Action or Flow (Note- Quick Actions start with “QuickActionDefinition…”, while Flows just list their API names)
- Order: if you want all your Actions to have a numbered order.
- Pinned: if there are certain actions you’d like to keep towards the top or bottom of the list, you can enter Top or Bottom here.
- RecordId: insert here a reference to the id of the record you are attaching the action too. In this case, the Opportunity ID from the Get Records element.
- Status: This is normally New, but you can use Flows to set the status of your actions using this field.
- I finish my Flow by using an Update Records element, checking off a custom field on the Opportunity so that I have a record that this set of Actions was added. I then use that field as one of the criteria to decide whether or not to run this Flow. You can also use this element to update any other relevant fields on your Opportunity.
- There’s an easy way to test this out in Production. In your automation, make sure it only adds the RecordActions to a set of test records you’ve created. Then, set the Component Visibility so that it is only visible to admins.
- Just getting started with Flow? Get to know the basics on Trailhead! Try the Build Flows with Flow Builder trail. Or, if you prefer watching videos and getting a walk through, Brian Kwong of the Wizard News podcast, has a great Wizard’s Apprentice video series on learning Flow.
in our Third and final installment… Case Study- see a real live example of Actions & Recommendations used to automate the Sales Process coming up. I want to thank Fred for his efforts in sharing his tips on this blog. Feel free to post your comments below or email me at email@example.com as well.
Subscribe to our mailing list and get tips to maximize salesforce to your email inbox.
I am honored to have your subscription. Stay tuned for tips to maximize your salesforce investment
Something went wrong.