Cloudy with a check list standing next to text that says "Create To-Do Lists Using Actions & Recommendations."

Help Your Users Be More Productive by Creating a To-Do List Using Actions & Recommendations

By

Our users have a million things going on. As admins, we can make their jobs more productive and drive data consistency with a to-do list on the record page, using the Actions & Recommendations component in Lightning Experience. This way, users can track their progress by completing each item on their to-do list.

The Actions & Recommendations component creates a list of actions (flows, Quick Actions, and recommendations from your Next Best Action strategies) for your users. The to-do list can be generated by using an Actions & Recommendations deployment or Salesforce automation tools (Flow Builder or Process Builder). Take a look at the example below to understand the amazing benefits of this component.

What’s the business problem?

Sunshine Cupcakes sells cupcakes on the go. Devohne Mays, Head of Sales Operations, notices that some of his staff is struggling to consistently follow the processes for a cupcake order from creation to completion. His rockstar employees follow the steps consistently, but other employees forget certain steps, leading to inconsistent customer service.

Actions & Recommendations for the win

#AwesomeAdmin Addison Dogster wants to remove the need for employees to remember what to do. Thankfully, she recently learned about the Actions & Recommendations component! With this component, she can create a to-do list for the Sunshine Cupcakes staff. All they need to do is go down the list and take the actions shown in the component. Each order can be handled consistently from now on.

Demo showcasing how to build a record-triggered flow using Flow Builder to automate the creation of the actions in the Actions & Recommendations component.

Addison decided to build a record-triggered flow using Flow Builder to automate the creation of the actions in the Actions & Recommendations component.

Record-Triggered Flow Adison created for her cupcake business.

The play-by-play

Let’s follow along as Addison builds out the solution using Flow Builder, Quick Actions, and Lightning App Builder.

1. First, Addison creates the Quick Actions, screen flows, or auto-launched flows she wants to show as actions in the Actions & Recommendations component.

2. Next, she creates the record-triggered flow shown above. In Lightning Experience, it can be found under Process Automation | Flows. Click New Flow, then select Record-Triggered Flow.

A. Addison configures the Start element to the following:

  • Trigger the Flow When: A record is created or updated
  • Run the Flow: After the record is saved
  • Configure the Object to:
    • Object: Cupcake Order
    • Condition Requirements: All Conditions Are Met (AND)
      • Status__c Equals Submitted
    • When to Run the Flow for Updated Records: Every time a record is updated and meets the condition requirements

Screenshot showcasing how Addison configured her Start element.

B. Next, she adds a Decision Flow element called “New or Status Changed?”, which would determine whether the record is new or the Status field has changed. We need to determine whether the record is new (that is, prior record does not have an id) or whether the status has changed. We’re using the Decision element since, in the Start element, we’re not able to access the prior record.

Best-practice tip: Provide a description so you and other/future admins know what this flow resource is used for.

This is how that flow resource would be configured:

  • Outcome: Yes
    • Condition Requirements to Execute Outcome: Any Condition is Met (OR)
      • {!$Record__Prior.Id} Is Null {!$GlobalConstant.True}
      • {!$Record.Status__c} Is Changed {!$GlobalConstant.True} (Note: This is available in API Version 52 or later)
      • (If you’re using API version 51 or earlier, use this condition instead of the second condition above) {!$Record__Status__c} Does Not Equal {!$Record__Prior.Status__c}
  • When to Execute Outcome: If the condition requirements are met

Screenshot showcasing how Addison configured a new Decision Flow element.

All the Flow elements below fall under the Yes Outcome path.

C. Addison adds a Create Records Flow element called “Create a Log a Call RecordAction”. This will create the Log a Call action in the Actions & Recommendations component.

This is how that flow resource would be configured:

  • How Many Records to Create: One
  • How to Set the Record Fields: Use separate resources, and literal values
  • Object: RecordAction
  • ActionDefinition: QuickActionDefinition.Cupcake_Order__c.Log_a_Call
  • ActionType: QuickAction
  • Order: 1
  • RecordId: {!$Record.Id}

The ActionDefinition is the API name of the Quick Action or flow you want to appear in the component.
Action Type: You can choose between a QuickAction or FlowDefinition (aka Flow).
Order is the display order relative to the other actions.

Screenshot showcasing how Addison adds a Create Records Flow element.

D. Addison adds a Create Records Flow element called “Create a Process Order Record Action”. This will create the Process Order action in the Actions & Recommendations component.

This is how that flow resource would be configured:

  • How Many Records to Create: One
  • How to Set the Record Fields: Use separate resources, and literal values
  • Object: RecordAction
  • ActionDefinition: QuickActionDefinition.Cupcake_Order__c.Process_Order
  • ActionType: QuickAction
  • Order: 2
  • RecordId: {!$Record.Id}

Screenshot of the Create Records flow element called "Create a Process Order Record Action."

E. She then adds a Create Records Flow element called “Create a Complete Order Record Action”. This will create the Complete Order action in the Actions & Recommendations component.

This is how that flow resource would be configured:

  • How Many Records to Create: One
  • How to Set the Record Fields: Use separate resources, and literal values
  • Object: RecordAction
  • ActionDefinition: QuickActionDefinition.Cupcake_Order__c.Complete_Order
  • ActionType: QuickAction
  • Order: 3
  • RecordId: {!$Record.Id}

Screenshot of a Create Records Flow element called "Create a Complete Order Record Action."

F. Next, Addison adds a Create Records Flow element called “Create a Send a Survey Record Action”. This will create the Send a Survey action in the Actions & Recommendations component.

This is how that flow resource would be configured:

  • How Many Records to Create: One
  • How to Set the Record Fields: Use separate resources, and literal values
  • Object: RecordAction
  • ActionDefinition: QuickActionDefinition.Cupcake_Order__c.Send_a_Survey
  • ActionType: QuickAction
  • Order: 4
  • RecordId: {!$Record.Id}

Screenshot of a Create Records Flow element called “Create a Send a Survey Record Action”.

G. She adds a Create Records Flow element called “Create a Send a Email Record Action”. This will create the Send Email action in the Actions & Recommendations component.

This is how that flow resource would be configured:

  • How Many Records to Create: One
  • How to Set the Record Fields: Use separate resources, and literal values
  • Object: RecordAction
  • ActionDefinition: Send_Email
  • ActionType: Flow
  • Order: 5
  • RecordId: {!$Record.Id}

A* Create Records* Flow element called “Create a Send a Email Record Action”.

H. Next, Addison debugs the flow by selecting a record with a status = ‘Submitted’ and specifies to run the flow as if the record is “Created”. Then, she debugs the flow again using a record with a status = ‘Submitted’ but this time specifies to run the flow as if the record is “Updated”.

I. Once you tested the flow using debug and it works as expected, save the flow with these properties. Activate the flow.

Screenshot of Addison saving and activating the flow.

3. Next, Addison navigates to the cupcake record Detail page, clicks the wrench icon, and selects Edit Page to open the Lightning Record page in Lightning App Builder.

Image showcasing how you open the Lightning Record Page in Lightning App Builder.

4. She locates the Actions & Recommendations component and drags it onto the page, then clicks Save.

GIF showing you how to locate the Actions & Recommendations component and drag it onto the page.

And we’re done!

Being the #AwesomeAdmin that she is, before Addison deploys the changes to Production, she tests her configuration changes.

  1. Create a new cupcake record (status = “Submitted”) and verify the five actions are created, as expected.
  2. Update a cupcake record to status = “Submitted” and verify the five actions are created, as expected.
  3. Update a cupcake record to a status that is not “Submitted” and verify the actions are not created.

Deployment notes/tips

  • Flows, Quick Actions, and Lightning Record pages can be deployed to Production in a change set.
  • You’ll find the flow in a change set under the Flow Definition component type.
  • Activate the flow post-deployment as flows deploy inactive in Production, unless you have opted in on the Process Automation Settings screen, to “Deploy processes and flows as active.” NOTE: With this change, in order to successfully deploy a process or flow, your org’s Apex tests must cover at least 75% of the total number of active processes and active auto-launched flows in your org or you can select 0%, which will run the Apex classes not related to your flow.

We want to learn about the things you’ve built using this feature. Tweet us (@SalesforceAdmns) and share!

Resources

New to Flow? Take the Build Flows with Flow Builder trail on Trailhead to learn more.

Astro and Cloudy on a mountain next to text that says "#3 Flow Enhancements."

Learn MOAR in Winter ’22 with Flow Enhancements 🔁

Follow and complete a Learn MOAR Winter ’22 trailmix for admins or developers by October 31 to earn a special community badge and enter for a chance to win one of five $200 USD Salesforce Certification vouchers. Restrictions apply. Learn how to participate and review the Official Rules by visiting the Trailhead Quests page. Who’s […]

READ MORE
Image of Cloudy with a computer with the Flow symbol on it and text that says "Flow Best Practices and Standards."

The Ultimate Guide to Flow Best Practices and Standards

There’s no way around it: Salesforce Flow is the automation tool of the future. Flow is not just an ‘admin tool’ — it’s the holy grail of declarative development that unites developers AND admins by allowing the use of Lightning Web Components (LWC) and Apex, and letting the admin orchestrate all of it in one […]

READ MORE

Have an Idea for a Story?

We are all about the community and sharing ideas.
Do you have an interesting idea or useful tip that you want to share?

SHARE YOUR IDEA