Automatically Assign New Leads to a Sales Engagement Cadence

Automatically Assign New Leads to a Sales Engagement Cadence

Last Updated on November 21, 2023 by Rakesh Gupta

Big Idea or Enduring Question:

  • How do you automatically assign newly-created leads to a Sales Engagement Cadence?

Objectives:

After reading this blog, you’ll be able to:

  • Work with the ActionCadence object to find out about a Cadence.
  • Assign a Sales Engagement Cadence to a lead or contact.
  • And much more.

👉 Previously, I’ve penned several posts on the Sales Engagement Cadence. Why not check them out while you are at it?!

  1. Have You Traversed the Yellow Brick Road of Sales Cadence, Yet?
  2. Never Miss a Beat: Notifications for Prospect Removal in Sales Engagement Cadence

Business Use case

Benjamin Moore is a Salesforce Administrator at Gurukul On Cloud (GoC). The Sales Director has assigned him the task of automatically assigning the “Follow Up on Interested Prospects” cadence to any newly created lead with “Web” as its LeadSource.

Automation Champion Approach (I-do):

Save your sales reps from taking an extra step. To automatically add lead, contact, or person account records to a cadence when the records are created using record-triggered after-save flow. While this can be solved using various automation tools like Apex Trigger and others, we will use Salesforce Flow to solve it.

Before discussing the solution, let me show you a diagram of the process at a high level. Please spend a few minutes going through the following Flow diagram to understand it.
Let’s begin building this automation process.

Guided Practice (We-do):

There are 2 steps to solve Benjamin’s business requirement using Record-Triggered After-Save Flow. We must:
  1. Create and Activate a Sales Engagement Cadence
  2. Salesforce Flow
    1. Define flow properties for record-triggered flow.
    2. Create a formula to determine whether the record has been created or updated.
    3. Add a Decision element to check the LeadSource.
    4. Add a Get Record element to find the Cadence based on its name.
    5. Add a Decision element to determine whether the Cadence has been found or not.
    6. Add Assign Target to Cadence core action  – to assign cadence to the lead.

Things to Note

Assuming the reader has already given Sales Engagement permissions to the target assignee (i.e. lead owner in this scenario), this article will be short. If the lead owner (our target assignee) doesn’t have these permissions, the user creating the lead will encounter an error:

The target assignee doesn’t have any Sales Engagement permissions.

To avoid this:

  1. Ensure everyone managing cadences has Sales Engagement permissions.
  2. Before assigning a cadence, verify if the lead owner (our target assignee) has the necessary permissions. If not, grant them before proceeding.

Helpful Articles

  1. Profile? So Yesterday! – Auto Assign Permission Set Group to a User
  2. Automatically Assign Permission Sets to New User

Step 1: Create and Activate a Sales Engagement Cadence

  1. In the Sales Engagement app, choose Cadences from the Navigation menu.
  2. From the Actions menu, choose New.
  3. Enter a unique name and a description for the cadence. Click Save.

Step 2.1: Define Flow Properties

  1. Click Setup.
  2. In the Quick Find box, type Flows.
  3. Select Flows then click on the New Flow.
  4. Select the Record-Triggered Flow option, and click on Create and configure the flow as follows:
    1. Object: Lead
    2. Trigger the Flow When: A record is created or updated
    3. Set Entry Criteria: None
    4. Optimize the Flow For Action and Related Records
  5. Click the X at the top to save your changes.

Step 2.2: Create a Formula to Determine Whether the Record Has Been Created or Updated

  1. Under Toolbox, select Manager, then click New Resource to determine whether the record is new or old.
  2. Input the following information:
    1. Resource Type: Formula
    2. API Name: forB_IsNew
    3. Data Type: Boolean
    4. Formula: IsNew()
  3. Click Done.

Step 2.3: Using Decision Element to Check the LeadSource

Now we will use the Decision element to determine whether the LeadSource is Web or not.

  1. On Flow Designer, click on the +icon and select the Decision element.
  2. Enter a name in the Label field; the API Name will auto-populate.
  3. Under Outcome Details, enter the Label the API Name will auto-populate.
  4. Condition Requirements to Execute Outcome: All Conditions Are Met (AND)
    1. Row 1:
      1. Resource: {!$Record.LeadSource}
      2. Operator: Equals
      3. Value: Web
    2. Add Condition
    3. Row 2
      1. Resource: {!forB_IsNew}
      2. Operator: Equals
      3. Value: {!$GlobalConstant.True}
  5. When to Execute Outcome: If the condition requirements are met.
  6. Click Done.

Step 2.4: Adding a Get Record Element to Find the Cadence Based on Its Name

The next step is to find the Cadence ID we created in Step #1. Follow up on interested prospects using the Get Record element.

  1. On Flow Designer, below the Created node, click on the +icon and select the Get Records element.
  2. Enter a name in the Label field; the API Name will auto-populate.
  3. Select the Record ActionCadence object from the dropdown list.
  4. Select All Conditions Are Met (AND)
  5. Set Filter Conditions
    1. Row 1:
      1. Field: Name
      2. Operator: Equals
      3. Value: Follow Up on Interested Prospects
  6. How Many Records to Store:
    1. select Only the first record
  7. How to Store Record Data:
    1. Choose the option to Automatically store all fields
  8. Click the X at the top to save your changes.

Step 2.5: Using Decision Element to Check Whether the Cadence Has Been Found or Not

Now, we will use the Decision element to check the Get element from step 2.4 to determine if it returns the cadence.

  1. On Flow Designer, click on the +icon and select the Decision element.
  2. Enter a name in the Label field; the API Name will auto-populate.
  3. Under Outcome Details, enter the Label the API Name will auto-populate.
  4. Condition Requirements to Execute OutcomeAll Conditions Are Met (AND)
    1. Row 1:
      1. Resource: {!Get_Cadence}
      2. Operator: Is Null 
      3. Value: {!$GlobalConstant.False}
    2. Click Done.

Step 2.6: Adding Assign Target to Cadence Core Action  – to Assign Cadence to the Lead.

  1. On Flow Designer, below the Yes node, click on the +icon and select the Action element.
  2. Select the Assign Target to Cadence core action.
  3. Enter a name in the Label field- the API Name will auto-populate.
  4. Set Input Values:
    1. Cadence Name or Id: {!Get_Cadence.Id}
    2. Target Id: {!$Record.Id}
    3. User Id: {!$Record.OwnerId}
  5. Click Done.

In the end, Benjamin’s Flow will look like the following screenshot:Once everything looks good, perform the steps below: 

  1. Click Save.
  2. Enter Flow Label the API Name will auto-populate.
  3. Click Show Advanced.
  4. API Version for Running the Flow59
  5. Interview Label: Lead After – Save Flow {!$Flow.CurrentDateTime}
  6. Click Save.

Almost there! Once everything looks good, click the Activate button. 

Proof of Concept

From now on, when a lead is created with the leadSource as Web, a Record-triggered Flow will automatically be triggered and will assign the cadence to it. Let’s test it out

  1. Now create a new lead via the UI
  2. Navigate to the Sales Engagement component to verify the assigned Cadence.

Formative Assessment:

I want to hear from you!

What is one thing you learned from this post? How do you envision applying this new knowledge in the real world? Feel free to share in the comments below.

Have feedback, suggestions for posts, or need more information about Salesforce online training offered by me? Say hello, and leave a message!
Preferred Timing(required)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Automation Champion

Subscribe now to keep reading and get access to the full archive.

Continue reading