Product Area

Feature impact.

No results

  • What Is Experience Cloud?
  • Building Blocks of a Site
  • Find Your Way Around
  • Supported Browsers
  • Site Vision & Purpose
  • Frameworks & Templates
  • Who Does What?
  • Structure, Layout, & Design
  • Customer Engagement
  • Content Management Strategy
  • Performance & Scale
  • Promotion & Measurement
  • Enable Digital Experiences
  • Configure Digital Experiences Settings
  • Configure a Custom Domain for Your Experience Cloud Site
  • Configure Settings in Your Administration Workspace
  • Set Up Customer Insights
  • Considerations When Using Customer Insights
  • Update Your Experience Cloud Site’s Name, Status, and Description
  • Key Concepts in Page Redirection in Aura and LWR Sites
  • Setup Checklist
  • Brand Your Pages from the Administration Workspace
  • Brand Your Experience Builder Pages
  • Create a Custom Login Discovery Page
  • Customize the Apex Login Controller
  • Set Up Dynamic URLs with Experience Workspaces
  • Redirect Users to a Custom Logout URL
  • Customize Your Forgot Password and Reset Password Pages
  • Configure Your Self-Registration Page
  • Activate Your Site
  • Deactivate Your Site
  • Considerations for Archiving a Site
  • Unarchive a Site
  • Merge Fields for Experience Cloud Sites
  • Customize the One-Time Password Email Template
  • Customize the Device Activation Email Template
  • Customize the User Lockout Email Template
  • Customize the Email Address Change Template
  • Customize the Headless Registration Email Template
  • Customize the Passwordless Registration Welcome Email Template
  • Manage Your Site Email Notifications
  • Troubleshooting Steps If Site Members Don’t Receive Welcome Emails
  • Experience Cloud Sites: What’s Different or Not Available in the...
  • Enable Objects for Experience Cloud Site Users
  • Hide Fields in Lightning Knowledge Search Results
  • Set Up the Site Case Feed
  • Emails in the Site Case Feed
  • Enable Question-to-Case
  • Restrict Experience Cloud Site User Access to Cases
  • Send Emails to Leads and Contacts from an Experience Cloud Site
  • Set Up Approvals for External Users in Your Experience Cloud Site
  • Close a Conversation, Poll, or Question in an Aura Site
  • Pin Posts in an Aura Site
  • Add Groups to an Aura Site
  • Move Feed Items from One Public Group Feed to Another
  • Threaded Discussions in an Aura Site
  • Chatter Streams in Aura Sites
  • Enable Direct Messages in an Aura Site
  • Verify Answers for Your Company
  • Add Rich Publisher Apps to Your Feeds
  • Enable Upvotes and Downvotes
  • Migrate Peer-to-Peer Conversations to Your Experience Cloud Site
  • File Visibility and Sharing in Experience Cloud Sites
  • Customize Experience Cloud Site Libraries with Images
  • Limit Files in Your Experience Cloud Site
  • Make Files on Records Visible to Customers
  • Display Images Faster on All Devices
  • Display Optimized Images on Mobile Devices
  • Enable Ideas in Your Experience Cloud Site
  • Manage Users and Data Access
  • The Customer Account Portal Template
  • The Partner Central Template
  • The Customer Service Template
  • The Build Your Own Template (Aura)
  • Standard Components for LWR Templates
  • Considerations for Using Flows in LWR
  • Actions Bar Considerations in LWR Sites
  • Send Visitor Information to the Salesforce Case Object
  • Create a Microsite
  • Configure Microsite Layout and Create Navigation
  • How Do Experience Cloud Forms Connect to Marketing Cloud Engagement?
  • Connect a Form Component to Marketing Cloud Engagement
  • Send Visitor Information to the Salesforce Lead Object
  • Capture Visitor Information with the Lead Form Component
  • Objects Supported by Out-of-the-Box Components and Pages in...
  • Considerations for Changing Your Template
  • Considerations Before You Migrate an Aura Site to Lightning Web...
  • Migrate a Koa or Kokua Site to a New Template
  • Account Brand Details
  • Account Management
  • Announcement Section
  • Article Content
  • Articles with This Topic
  • Campaign Marketplace
  • Case Comments Publisher
  • Case Deflection
  • Channel Menu
  • CMS Collection
  • CMS Connect (HTML)
  • CMS Connect (JSON)
  • CMS Single Item
  • CMS Single Item (Detail)
  • Contact Request Button & Flow
  • Contact Support Button
  • Contact Support & Ask Buttons
  • Contact Support Form
  • Migrate to the Contact Support Form and Case Deflection Components
  • Create Record Button
  • Create Record Form
  • CRM Analytics Dashboard
  • Customize Code for Lightning Components on Login Pages
  • Customizable User Profile Menu
  • Customizable User Settings
  • Dashboard List
  • Deflection Tracking
  • Einstein Predictions
  • Einstein Scoring
  • Enhanced List View
  • Embedded Appointment Management
  • Embedded Messaging
  • Embedded Service
  • External Account Hierarchy List Card
  • Featured Topics
  • Featured Topics & Feeds
  • Feed Compact
  • Feed History
  • Feed Post & Comments
  • Feed Publisher
  • Allow Guest Users to Access Flows
  • Flow Orchestration Work Guide
  • Follow Button
  • Global Search Box
  • Global Search for Peer-to-Peer Communities
  • Global Search Results
  • Group Banner
  • Group Detail
  • Group Related List
  • HTML Editor
  • Knowledgeable People
  • Language Selector
  • Manage Members Section
  • Member Profile and Settings
  • Message Notification
  • Navigation Menu
  • New Message Button
  • Page Refresh
  • Path (Experience Builder Site Component)
  • Paused Flows
  • Profile Header
  • Recognition Badges
  • Recommendations
  • Recommendations Carousel
  • Record Banner
  • Record Detail
  • Record Information Tabs
  • Record List
  • Record Related List
  • Related Record List
  • Related List - Single
  • Related Articles List
  • Related Questions List
  • Related Topics List
  • Report Chart
  • Report List
  • Report Summary
  • Reputation Leaderboard
  • Rich Content Editor
  • Search Results
  • Stream Detail
  • Stream List
  • Suggested Actions
  • Top Article by Topic
  • Topic Catalog
  • Topic Description
  • Topic Metrics
  • Trending Articles by Topic
  • Trending Topics
  • Unanswered Questions
  • User Profile
  • Add Actions to Your User Profile
  • User Profile Image
  • User Profile Knows About
  • User Profile Related List
  • User Profile Menu
  • User Profile Stats
  • User Profile Summary
  • User Profile Tabs
  • Visualforce Page Component
  • Brand the Login Pages
  • Employee Login Link
  • Forgot Password
  • Self-Registration
  • Set Icons for Social Login
  • What Is the Enhanced Sites and Content Platform?
  • How Many Experience Cloud Sites Can My Org Have?
  • Find Your Way Around Experience Builder
  • Add Contributors
  • Update Roles
  • Remove Contributors
  • Prebuilt Experience Builder Themes
  • Change the Theme of Your Experience Builder Site
  • Use Branding Sets in Experience Builder
  • Adjust the Style and Layout of Your Site Theme
  • Theme Guidance: Header Components
  • Theme Guidance: Hero Component
  • Theme Guidance: Search Component
  • Change the Theme Layout of Your Experience Cloud Site’s Pages
  • Change the Content Layout in Experience Builder
  • Find and Create Asset Files in Experience Builder
  • Experience Builder Settings
  • Update Your Experience Builder Site’s Template
  • Preview Your Experience Builder Site
  • Publish Your Experience Builder Site Customizations
  • Page Properties and Types in Experience Builder
  • Considerations for Page Hierarchy and URL Conflicts in Experience...
  • Enable the App Launcher in Experience Builder Sites
  • Use a Custom Service Not Available Page for Your Experience Builder...
  • Use a Custom Too Many Requests Page for Your Experience Builder Site
  • Assign Screen-Responsive Property Values in Custom Components in...
  • Show or Hide Components on Mobile, Tablet, or Desktop for Enhanced...
  • Hide Components on Mobile Devices with Experience Builder for Aura...
  • Error Messages for Pages Without Data in Experience Builder
  • Configuring Apex Data Providers in Experience Builder (Beta)
  • Data Provider Considerations (Beta)
  • Create a Flexible Layout
  • Delete a Page in Experience Builder
  • to Customize Your Experience Builder Site" data-is-link="true" id="community_builder_page_head_leaf" role="treeitem" aria-level="4" lwc-g4l6pknunt=""> Add Markup to the Page <head> to Customize Your Experience Builder...
  • Create Component Variations in LWR Sites
  • Create Dynamic Component Visibility in LWR Sites
  • Expression-Based Visibility Rules in LWR Sites
  • Build an Expression-Based Visibility Rule in LWR Sites Using Custom...
  • Considerations for Audience Targeting in Aura Sites
  • Criteria Types and Conditions for Audience Creation
  • Assign an Audience to a Page Variation
  • Assign an Audience to a Branding Set
  • Assign an Audience to a Component
  • Assign an Audience to a Component Variation
  • Prioritize Audiences in Aura Sites
  • Use Visualforce in Experience Builder Sites
  • Add Streams to Your Experience Builder Site
  • Configure Google Analytics™ for Experience Cloud Sites
  • Create a Multilingual Site
  • Set the Default Language for Your Aura Site
  • Add Languages to Your Aura Sites
  • Set Language Options
  • Edit Language Content on the Page
  • Export Language Content
  • Import Translated Content
  • Delete a Language
  • Best Practices and Considerations for Multilingual Sites
  • Add a Translate Button to Feed Items in Experience Builder Sites
  • The Scale of Your Experience Cloud Sites
  • Scale and Performance Optimization Tools for Experience Builder Sites
  • Which Performance Tools Do I Need Based on My Experience Cloud Site?
  • Use Apex to Configure Self-Registration in Batches for High-Volume...
  • Use Apex to Configure Record Creation in Batches for High-Volume Sites
  • Use Experience Builder to Configure Micro-Batching for High-Volume...
  • High-Volume Registrations and Record Creation Fixes
  • Progressive Rendering Guidelines
  • Prioritize Component Display Order with Progressive Rendering
  • Analyze and Improve Experience Builder Site Performance
  • Improve Experience Cloud Site Performance with Browser Caching
  • Apex Caching on the Salesforce CDN
  • Set Up Your Experience Builder Site for SEO
  • Identify Your Preferred Domain to Improve SEO Results
  • SEO Page Properties in Experience Builder
  • Create a Custom robots.txt File for Your Experience Builder Site
  • Enable SEO-Friendly URLs in LWR Sites
  • Create SEO-Friendly URLs in LWR Sites
  • CSV File Format for Importing URL Slugs
  • Make Objects Available for SEO
  • Provide Search Engines with Fresh Content Snapshots
  • Generate a Manual Sitemap Refresh for Your Experience Builder Site
  • Reassign the Scheduled Jobs that Generate an Automatic Sitemap Refresh
  • Best Practices and Tips for Using SEO in Experience Builder Sites
  • SEO for Experience Builder Sites FAQ
  • Connect Experience Cloud to Data Cloud
  • Add Content to Your LWR Sites with Data Binding
  • Use a Grid Component to Show Enhanced CMS Collections and List Views...
  • Add an Image from Salesforce CMS to Your LWR Site
  • Nest Content Components in Your LWR Site
  • Bind Data to CMS Content Pages in Your LWR Site
  • Create a Manual CMS Collection for Your Aura Site
  • Edit a Manual CMS Collection in Your Aura Site
  • Create a Conditional CMS Collection for Your Aura Site
  • Salesforce CMS Topics for Aura Sites
  • Show CRM Data in Your Aura or LWR Site Using Object Pages
  • Show Record Lists in Your Aura or LWR Site Using Navigation Menus
  • Bind Data to CRM Record Detail Pages in Your LWR Site
  • Add CRM Connections to Your Aura Site
  • Create a Salesforce CRM Collection for Your Aura Site
  • Add a Salesforce CRM Collection to Your Aura Site
  • External Data Sources in Your Experience Cloud Site
  • Set Up CMS Content Search in an LWR Site
  • Set Up CRM Object Search in LWR Sites
  • Set Up Search Pages for Aura Sites
  • Enable Search Autocomplete for Guest Users
  • Add the Global Search Box to Your Customized Experience Cloud Site...
  • Allow Users to Search Salesforce Tabs + Visualforce Sites
  • Create a Branded Mobile App for Your Experience Cloud Site by Using...
  • Create a Lightning Bolt Solution
  • Export a Customized Experience Builder Template for a Lightning Bolt...
  • Export a Customized Experience Builder Theme for a Lightning Bolt...
  • Export a Customized Experience Builder Page for a Lightning Bolt...
  • Add Flows to a Lightning Bolt Solution
  • Export and Packaging Considerations for Lightning Bolt Solutions
  • Requirements for Distributing Lightning Bolt Solutions
  • Package and Distribute a Lightning Bolt Solution
  • Rename the Chatter Tab
  • Brand Your Salesforce Tabs + Visualforce Site
  • Enable the Global Header for Salesforce Tabs + Visualforce Sites
  • Choose a Landing Tab
  • Enable Leads for Visualforce Sites
  • Use a Custom Service Unavailable Page in Your Salesforce Tabs +...
  • Configure the Default Login Page to Use a Custom Home Page
  • Add Custom Pages That Don’t Require Login
  • Help Center Set Up Tasks
  • Create a Help Center
  • Help Center Template Pages
  • Change from Help Center to a New Template
  • Partner Central—Build Lightning Partner Sites
  • Create a Partner Site with Partner Central—Setup Tasks
  • What’s Your Partner Experience Cloud Site Strategy?
  • Migrate from a Partner Portal to an Experience Cloud Site
  • Set Up the Channel Manager Role
  • Disable Partner Accounts
  • Create a Channel Program
  • Create Channel Program Levels
  • Manage Channel Program Members with Sharing Groups
  • Channel Program Member Limits
  • Assign Leads to Partners
  • Create a Lead Process for Lead Distribution
  • Create a Queue for Lead Distribution
  • Create Page Layouts for Lead Distribution
  • Create Lead Record Types for Lead Distribution

Create Assignment Rules for Lead Distribution

  • Customize Partner Central for Lead Distribution
  • Create Processes for Deal Registration
  • Create Page Layouts for Deal Registration
  • Create Lead Record Types for Deal Registration
  • Create a Global Action to Let Partners Register Deals
  • Customize Opportunities for Deal Registration
  • Create Approval Workflows for Deal Registration
  • Customize Partner Central for Deal Registration
  • Create a Market Development Budget
  • Customize Page Layouts for Partner Marketing Budgets
  • Grant Channel Account Managers Access to Partner Marketing Budgets
  • Share Partner Marketing Budgets with the Channel Account Manager
  • Create Approval Workflows for Partner Marketing Budgets
  • Create a Partner Fund Allocation
  • Customize Page Layouts for Partner Fund Allocations
  • Grant Channel Account Managers Access to Partner Fund Allocations
  • Share Partner Fund Allocations with the CAM
  • Create a Partner Fund Request
  • Grant Channel Account Managers and Partner Users Access to Partner...
  • Create Approval Workflows for Partner Fund Requests
  • Customize Page Layouts for Partner Fund Requests
  • Create a Partner Fund Claim
  • Create Approval Workflows for Partner Fund Claims
  • Customize Page Layouts for Partner Fund Claims
  • Best Practices for Campaign Marketplace
  • Configure Reports for Partner Scorecard
  • Assign Cases to Partners
  • Assign Tasks and Events to Partners
  • Lead Distribution Reports
  • Deal Registration Reports
  • Market Development Fund Reports
  • Build a Portal with the Customer Account Portal Solution
  • Create a Customer Account Portal—Setup Tasks
  • What’s Your Customer Account Portal Strategy?
  • Extend Salesforce to Customers with the Correct Licenses
  • Experience Cloud Journey Data Model
  • Email Preferences
  • Triggering Journeys Based on Events
  • Triggering Journeys Based on Audiences
  • Determine If an Object Can Trigger Journeys
  • Sync an Object to the Marketing Cloud Engagement
  • Experience Cloud Objects for Creating Member Journeys
  • Sharing CRM Data in an Experience Cloud Site
  • Enable Clickjack Protection in Experience Cloud Sites
  • SAML for Experience Cloud Sites
  • Configure SAML SSO Between Salesforce Orgs or Experience Cloud Sites
  • Authentication Provider SSO with Salesforce as the Relying Party
  • Encrypt Experience Cloud Site Data
  • CSP and Lightning Locker Design Considerations
  • Where to Allowlist Third-Party Hosts for Experience Builder Sites
  • Select a Security Level in Experience Builder Sites
  • Experience Cloud Cookies
  • Deploy A Full Experience Cloud Site with Change Sets
  • Deploy Partial Experience Cloud Site Content with Change Sets
  • Considerations for Deploying Experience Cloud Sites with Change Sets
  • Troubleshoot Metadata Deployment Errors in Experience Cloud Sites
  • Assign an Experience Cloud Site Manager
  • Assign a Moderator
  • Track Experience Cloud Site Activity with the Moderation Overview Page
  • Enable Members to Flag Items in Your Experience Cloud Site
  • Create Criteria to Moderate Your Site
  • Create Rules to Moderate Your Site
  • Review and Approve Posts and Comments in Your Experience Cloud Site
  • Set Up Apex Triggers for Flagging Items
  • Experience Pulse
  • Experience Cloud Site Moderation Limits and Limitations
  • Manage Topics in Experience Cloud Sites
  • Automatically Assign Topics to Articles
  • Set Up Featured Topics
  • Set Up Navigational Topics
  • Set Up Content Topics
  • See Your Site’s Topics and Subtopics in One Place
  • Add Topics to Articles or Remove Them
  • Translate Topics Names and Descriptions for Experience Cloud Sites...
  • Create Audiences for Your Recommendations
  • Recognition Badges Limitations
  • Enable WDC Thanks
  • Turn On Recognition Badges in Experience Workspaces
  • Configure Who Can Create Recognition Badges
  • Configure Who Can Assign Recognition Badges
  • Use Components to Display Assigned Recognition Badges on Member...
  • Create, Edit, and Delete Recognition Badges
  • Manage Who Can Assign a Specific Recognition Badge
  • Display the Full List of Assigned Recognition Badges on a Member’s...
  • Create a Mission
  • Display Unearned Mission Badges
  • Assign Recognition Badges to Experience Cloud Site Members
  • Delete Assigned Badges
  • Use the API to Give Recognition Badges Sample Code
  • Enable Reputation in Your Experience Cloud Site
  • Set Up Reputation Levels
  • Set Up Reputation Points
  • How is my Experience Cloud site reputation calculated?
  • Share a Link to Your Experience Cloud Site
  • Switch Between Your Salesforce Org and Your Experience Cloud Sites
  • Track User Engagement with Google Analytics 4
  • Report on Experience Cloud Sites with AppExchange Packages
  • Enable Analytics in Your Experience Cloud Site
  • Track Site Activity with Custom Reports
  • Enable and Map Dashboards
  • Insights for Engagement
  • Create a Report from Your Site with Report Builder
  • Allow External Users to Access and Report on Tasks and Events
  • Report and Dashboard Considerations for Sites
  • How Experience Cloud Uses Lightning
  • Experience Builder Site Limitations
  • Experience Cloud Sites Usage Allocation
  • Update Public Accessibility Settings for Standard Visualforce Pages...
  • Additional Experience Cloud Site Limitations

You are here:

  • Salesforce Help
  • Experience Cloud

Assignment rules allow you to automatically apply criteria to sort, queue, or act on leads. For example, use assignment rules to automatically assign leads to the lead inbox queue for Partner Central.

Required Editions

For lead distribution, use assignment rules to define the criteria by which you want to distribute your leads, such as partner tier, geography, or specialization.

  • From Setup, enter Leads in the Quick Find box, then select Lead Assignment Rules .
  • Create a lead assignment rule, let’s call this All Channel Sales Leads.
  • Create rules to filter leads by record field values or user criteria and assign them to the lead inbox queue. You can also create rules to directly assign leads to partner users.
  • To send an email notification when a lead is assigned to the queue, select an email template. You can also create custom templates for partner email notifications .

Note

Cookie Consent Manager

General information, required cookies, functional cookies, advertising cookies.

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings. Privacy Statement

Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.

Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.

Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.

Cookie List

Automation Champion

Automation Champion

Automating Salesforce One Click at a Time

Running Lead Assignment Rules From Salesforce Flow

Running Lead Assignment Rules From Salesforce Flow

Last Updated on February 14, 2022 by Rakesh Gupta

To understand how to solve the same business use case using Process Builder . Check out this article Getting Started with Process Builder – Part 49 (Running Lead Assignment Rules From Process Builder) .

Big Idea or Enduring Question:

How do you run the lead assignment rule from the Salesforce flow? Lead assignment rules allow us to automatically assign Leads to the appropriate queue or user. A Lead assignment rule consists of multiple rule entries that define the conditions and order for assigning cases. From a Salesforce User interface, a user can trigger assignment rules by simply checking the Assign using the active assignment rules checkbox under the optional section.

The problem arises when you need to insert or update the Leads from Salesforce Flow and wants to trigger assignment rules. Using the Salesforce Flow a Lead will be inserted or updated but the assignment rule will not be triggered as there is no check box to use the organization’s assignment rule or a prompt to assign using the active assignment rule.

Let’s start with a business use case.

Objectives:

After reading this blog post, the reader will be able to:

  • Running the lead assignment rules from Salesforce Flow
  • Understand @InvocableMethod Annotation
  • How to call an Apex method using Salesforce Flow

Business Use Case

Pamela Kline is working as a System administrator at Universal Containers (UC) . She has received a requirement from the management to update the following Lead fields when Lead Source changed to Partner Referra l .

  • Status = Working – Contacted
  • Rating = Hot

As data changed by the process, she wants to fire the assignment rule as soon as the process updates the lead record.

Automation Champion Approach (I-do):

create a lead assignment rule

Guided Practice (We-do):

There are 4 steps to solve Pamela’s business requirement using Salesforce Flow and Apex. We must:

  • Setup a lead assignment rule
  • Create Apex class & Test class
  • Define flow properties for record-triggered flow
  • Add a decision element to check the lead source
  • Add an assignment element to update status & rating
  • Add a scheduled path
  • Add a decision element to check if lead source changed
  • Add action – call an Apex class to invoke lead assignment rule

Step 1: Setting Up Lead assignment Rule

  • Click Setup .
  • In the Quick Find box, type Lead Assignment Rules .
  • Click on the Lead Assignment Rules | New button .
  • Now create an assignment rule, as shown in the following screenshot:

create a lead assignment rule

Step 2: Create an Apex class and Test class

Now, we have to understand a new Apex annotation i.e . @InvocableMethod . This annotation lets us use an Apex method as being something that can be called from somewhere other than Apex . The AssignLeadsUsingAssignmentRules class contains a single method that is passing the ids of the Leads whose Lead Source changed to Partner Referral . Create the following class in your organization.

  • In the Quick Find box, type Apex Classes .
  • Click on the New button .
  • Copy code from GitHub and paste it into your Apex Class.
  • Click Save.

create a lead assignment rule

Step 3.1: Salesforce Flow – Define Flow Properties for Before-Save Flow

  • In the Quick Find box, type Flows .
  • Select Flows then click on the New Flow .
  • How do you want to start building : Freeform
  • Object : Lead
  • Trigger the Flow When : A record is created or updated
  • Condition Requirements: None
  • Optimize the Flow For : Fast Field Updates
  • Click Done .

create a lead assignment rule

Step 3.2: Salesforce Flow – Using Decision Element to Check the Lead Source

Now we will use the Decision element to check the lead source to ensure that it is equal to Partner Referral.

  • Under Toolbox , select Element .
  • Drag-and-drop Decision element onto the Flow designer.
  • Enter a name in the Label field; the API Name will auto-populate.
  • Under Outcome Details , enter the Label the API Name will auto-populate.
  • Resource: {!$Record.LeadSource}
  • Operator: Equals
  • Value: Partner Referral
  • When to Execute Outcome : Only if the record that triggered the flow to run is updated to meet the condition requirements

create a lead assignment rule

Step 3.3: Salesforce Flow – Adding an Assignment Element to Update Rating and Status

  • Drag-and-drop the Assignment Element element onto the Flow designer.
  • Enter a name in the Label field- the API Name will auto-populate.
  • Field: {!$Record.Rating}
  • Add Condition
  • Field: {!$Record.Status}
  • Value: Working – Contacted

create a lead assignment rule

  • Click Save .
  • Enter Flow Label the API Name will auto-populate.
  • Click Show Advanced .
  • API Version for Running the Flow : 53
  • Interview Label : Record-Trigger: Lead Before Save {!$Flow.CurrentDateTime}

create a lead assignment rule

Step 4.1: Salesforce Flow – Define Flow Properties for After-Save Flow

  • Field : Lead Source
  • Operator: Euqals
  • Optimize the Flow For : Action and Related Records

create a lead assignment rule

Step 4.2: Salesforce Flow – Add Scheduled Paths

create a lead assignment rule

  • Under SCHEDULED PATHS , click on the New Scheduled Path .
  • Under Scheduled Path Details , enter the Label the API Name will auto-populate.
  • Time Source : Lead: Last Modified Date
  • Offset Number : 1
  • Offset Options : Minutes After

create a lead assignment rule

Step 4.3: Salesforce Flow – Adding an Action to Call Apex class to Trigger Lead Assignment Rule

  • Drag-and-drop the Actions element onto the Flow designer.
  • Select the AssignLeadsUsingAssignmentRules Apex class.
  • Field: LeadIds
  • Value: {!$Record.Id}

create a lead assignment rule

  • Interview Label : Record-Trigger: Lead After Save {!$Flow.CurrentDateTime}

create a lead assignment rule

Proof of Concept

Now onward, if a business user updates the Lead Source to Partner Referral , Process Builder will automatically update Status , Type , and Assign it to the right user or queue based on the lead assignment rule.

create a lead assignment rule

Monitor Your Schedule Flow

To monitor Flows that are scheduled, navigate to the following path:

  • Navigate to Setup (Gear Icon) | Environments | Monitoring | Time-Based Workflow .

create a lead assignment rule

  • Use the Delete button to delete the time-based Flow job from the queue.

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? Let me know by Tweeting me at @automationchamp , or find me on LinkedIn.

Submit Query!

Similar Posts

create a lead assignment rule

Elevate Your Screen Flows with a Customizable Counter Component

create a lead assignment rule

Dynamic Progress Bar for Form Completion in Salesforce Flow

create a lead assignment rule

Launch a Flow from CRM Analytics Dashboard Text Widget

9 thoughts on “ running lead assignment rules from salesforce flow ”.

It ran repeatedly, every minute, over and over again. I was getting notification email every minute when testing. I did the same steps as you mentionned, with a record triggered flow containing the apex action.

I found that this ran repeatedly, every minute, over and over again. Was easy to spot because I modified the Apex to include sending the user notification email as well – so I was getting notification email every minute when testing.

When I updated the ‘Time Source’ in the flow scheduled path from ‘Time Source: Lead: Last Modified Date’ to ‘Time Source: When Lead is Created or Updated’ that seems to have solved the problem.

Was curious if you had the same experience or if there was some other nuance happening.

It also looks like you had originally intended to use a decision element in step 4.3 but changed that to flow entry requirements, likely because the scheduled path can’t assess the prior and current values the same way the starting node can.

Thank you for sharing your valuable feedback. I have a quick question for you: When executing the Apex class, do you utilize a Record-triggered Flow or a Scheduled-triggered Flow?

after the apex class fires, noticed the lead owner is assigned to default lead owner, instead of using lead assignment rule. Any clue?

Thank you for an excellent tutorial 🙂 you solved my problem! Very much appreciated

Anyone getting issues with an error on mass updates “Apex error occurred: System.QueryException: List has more than 1 row for assignment to SObject “? if each one is called individually, I don’t understand how there is more than 1 row for assignment. Sometimes I get an email with this error only to see that the trigger actually worked for the specified record so a bit odd. Thanks!

Thank you for the great tutorial. Why add the 1 minute wait? Is that just to take avoid too much synchronous automation? Or is it required for another reason?

You’re right Kevin (to make the process asynchronous).

  • Pingback: Getting Started with Process Builder – Part 49 (Running Lead Assignment Rules From Process Builder) - Automation Champion

Leave a Reply Cancel 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.

Type your email…

Continue reading

See why Palo Alto Networks selected LeanData to orchestrate their buying groups motion.

  • Intelligent Lead Delivery
  • Convert Signals to Revenue
  • The Authoritative Guide to Buying Groups
  • Why LeanData What makes LeanData different
  • Products Overview Discover modern Revenue Orchestration
  • Integrations Connect signals to plays
  • Pricing Plans for every company

green and blue icon shape of a person with three stars below them

Snowflake Scales Account Based Plays with LeanData Revenue Orchestration

Palo Alto Networks Sees Revenue Increases with Buying Groups Strategy

Palo Alto Networks Sees Revenue Increases with Buying Groups Strategy

  • Become a Partner Team up with LeanData
  • Technology Partner Directory Discover ISV solutions to fit your needs
  • Solutions Partner Directory Connect with our network of authorized Service Integrators

The green logo for the tech company Salesloft

LeanData’s integration with Salesloft allows a user to route prospects to the right reps.

Slack

Slack has transformed business communication– it’s the platform where work can happen.

The teal and black logo for tech company 6sense

Expertly target and engage high-value accounts when they’re ready to buy.

Outreach

LeanData’s integration with Outreach allows a user to route prospects to the right reps.

green and blue icon shape of a filing cabinet

  • Learning Center
  • Certification
  • Tips & Tricks
  • Help Center
  • About Us Learn more about us and our mission
  • Newsroom Keep up with what’s new at LeanData
  • Events Stay up to date and network with industry professionals at our upcoming events
  • Careers Join the LeanData team
  • Contact Us Get your questions answered - contact us now

LeanData Unveils Groundbreaking Products to Boost B2B Revenue Growth Through Buying Groups

LeanData Unveils Groundbreaking Products to Boost B2B Revenue Growth Through Buying Groups

Leandata announces winners of the 2024 opsstars awards, leandata launches comprehensive go-to-market (gtm) efficiency e-book, what are lead assignment rules in salesforce.

Lead assignment rules are a powerful feature within Salesforce to assist your team’s automation of its lead generation and customer support processes. Assignment rules in Salesforce are used to define to whom your Leads and Cases (customer questions, issues or feedback) are assigned based on any one of a number of specified criteria you determine. 

Organizations typically develop lead assignment rules for their GTM processes or flows:

  • Rules for inbound Leads
  • Rules for website-generated Leads
  • Rules for importing Leads from an event

For case assignments, a company might establish one case assignment rule for weekdays and another assignment rule for weekends and holidays. 

A lead or case assignment rule often consists of multiple rule entries to specify exactly how leads and cases are assigned throughout your go-to-market teams. For example, related to customer service inquiries, a standard case assignment rule might have multiple entries. Cases with “Type equals Gold” are assigned to the Gold Level service queue, cases with “Type equals Silver” are assigned to the Silver Level service” queue, and so on. 

flowchart with arrows and people

As organizations grow and scale, they operationalize multiple GTM motions: inbound, outbound, account-based, upsell/cross-sell, and hybrid. However, many are limited to having just one rule in Salesforce.

As a work-around, many organizations create one massive lead assignment ruleset. They then wedge all of their rule entries into that one big ruleset, regardless of how many different motions that represents. Over time, Salesforce lead assignment rules can quickly become unmanageable .

This post covers the best practices for Salesforce lead and case assignment rules. The ultimate goal is to fully engaging your hard-won leads and speed up your organization’s time-to-revenue.

How to Define Assignment Rules

Your Salesforce administrator can only have one rule in effect at any particular moment in your go-to-market motions, and that assignment rule is intended to both automate lead generation processes and other customer-facing processes routed through your CRM. 

Lead assignment rules specify how leads are assigned to users or queues as they are created manually, captured from your website, or imported via SFDC’s Data Import Wizard.

Case assignment rules determine how cases are assigned to users or put into queues as they are created, either manually or through the use of Web-to-Case, Email-to-Case, On-Demand Email-to-Case, the Self-Service portal, the Customer Portal, Outlook, or other data generation applications.

Criteria for Lead Assignment Rules

Okay, so you’ve decided that lead assignment rules in Salesforce make sense for your revenue operations team – now what?

Well, first, you’ll need to determine the edition of your Salesforce instance. Lead assignment rules are available in the Group, Essentials, Professional, Enterprise, Performance, Unlimited, and Developer Editions of SFDC. Case assignment rules, conversely, are available only in the Professional, Enterprise, Performance, Unlimited, and Developer editions.

With regard to User Permissions, to view assignment rules, you’ll need View Setup and Configuration permissions. However, to create or change assignment rules, you’ll need Customize Application. If you are not your organization’s Salesforce administrator, you should check with them before attempting to head off on your own.

How to Create Salesforce Lead Assignment Rules

Creating lead and case assignment rules in Salesforce is a relatively straightforward process. 

  • Login to Salesforce and select Setup in the upper right corner of the horizontal navigation bar.
  • In the Setup search box , type “assignment rules” and then select either Lead Assignment Rules or Case Assignment Rules.
  • Select New to create a new assignment rule.
  • In the Rule Name box, type a name and specify whether it should be active for leads or cases created manually and by those created automatically by web and email. When done, click Save .
  • Click open your newly created rule and select New in the Rule Entries to specify your rule criteria.
  • Step 1 in the “Enter the rule entry” window requires you to enter an Order for your new rule (the Order is the order in which the entry is processed, like a queue).
  • In Step 2, you determine whether your new rule is based on meeting a set of criteria or a formula. In the Run this rule if the dropdown box, select either “criteria are met” or “formula evaluates to true.”
  • Lastly, in Step 3, select the user or queue to whom your rule will assign your new lead or case (use the lookup feature to find specific users or a queue). After completing Step 3, select Save .

create a lead assignment rule

Why Are Your Salesforce Lead Assignment Rules Not Working?

If you discover your lead or case assignment rules are not working, here are a few tips to quickly troubleshoot the root cause.

First, check to ensure the assignment rule is active. Remember, only one case or lead assignment rule can be active at one time. Secondly, ensure the record is assigned to the correct user or queue.

Make certain to select the checkbox Assign using active assignment rule . In support of this step, enable field History tracking on case or lead owner, as well as add object History (case or lead) in your page layout. 

One common problem is overlapping rule entries, or rule entries in the wrong order. With dozens of rule entries, many will overlap, causing records to get assigned unpredictably. For example, if entry #1 assigns California leads to John, and entry #2 assigns Demo Request leads to Jane, then John might wonder why he’s receiving Demo Requests leads who are supposed to go to Jane. 

Assignment Rule Examples

The image, below, shows sample rule entries being entered into Salesforce for a variety of “what if” situations:

  • Junk leads containing “test” are sent to an unassigned queue
  • Demo requests are routed directly to SDR 3
  • Leads at accounts with over $100 million in annual revenue are routed to AE 1
  • Leads in certain states are sent to their respective representatives

sample-lead-assignment-rules

How LeanData Simplifies Salesforce Lead Assignment

Creating lead and assignment rules in Salesforce is relatively straightforward. However, as your GTM motions become more and more complex, it becomes necessary to populate that one rule with multiple defining rule entries. As you grow and scale, your rule threatens to become unwieldy. Then these problems arise:

  • Difficulty in both comprehending and managing
  • Poor visibility, making it difficult to troubleshoot and validate
  • Restrictions allowing only the criteria on the routed record

salesforce-lead-assignment-rules-example

LeanData’s lead routing flow and assignment solution is a native Salesforce application that allows users to create flows in an easy-to-understand visual graph. Its visible representation of an organization’s desired lead flow affords many benefits to users, including:

  • Easier ability to visualize and understand complex flows
  • Real-time visibility of the routing of leads and the ability to quickly troubleshoot and make adjustments
  • At-a-glance ability to use information on matched records for routing decisions and actions

create a lead assignment rule

Assignment rules in Salesforce are a relatively easy-to-learn feature that can be very quickly implemented, delivering a flexible and powerful logic to your CRM processes. Automating your lead and customer processes will accelerate your GTM motions and deliver your organization a sustainable competitive advantage.

For more best practices, read the eBook, “ Best Practices for a Winning B2B Marketing Data Strategy .”

  • lead assignment rules
  • lead assignment rules salesforce

More Related Content

How to Automate Lead Routing in Salesforce

How to Automate Lead Routing in Salesforce

How assignment rules work in Salesforce When leads come into your Salesforce instance, a rep needs to reach out to...

Salesforce Lead-to-Account Matching, the Easy Way

Salesforce Lead-to-Account Matching, the Easy Way

Salesforce lead-to-account matching is an important consideration in better aligning Sales with Marketing and increasing the efficiency and productivity of...

10 Best Lead Assignment Tools for Revenue Teams (2024)

10 Best Lead Assignment Tools for Revenue Teams (2024)

Lead assignment tools optimize sales processes by building efficiency into lead distribution. Here are the top 10 lead assignment tools worth investigating.

create a lead assignment rule

Salesforce is closed for new business in your area.

How to Create Lead Assignment Rules in Salesforce?

In our organization, the Salesforce lead team mostly manually assigns records to a specific user or queue to work on the leads. So, we thought of automating the lead assignment process. So that when a lead is created, it will automatically be assigned to a specific sales representative. In Salesforce, we have a feature that automatically assigns leads to a user using the lead assignment rule.

I will explain the lead assignment rules in Salesforce and how to create a lead assignment rule in Salesforce.

Table of Contents

Lead Assignment Rules in Salesforce

In Salesforce, the lead assignment rules help automate your organization’s lead generation and assign specific sales representatives to leads. The rules can also determine how leads are assigned to users or queues based on information present in the record.

We need to define some criteria based on record information, and we can assign a user or queue to a lead based on those criteria. The lead assignment rule can assign leads when a new lead is created. Then, that lead can be created manually or automatically.

Create a Lead Assignment Rule in Salesforce

For example, there is a team of sales representatives, and we want to automatically assign a specific sales representative to a new lead when it is created, and the Lead Source is a Phone Inquiry. After that, the assigned sales representative can attend to that lead.

We can create a lead assignment rule in Salesforce using the following steps.

1. Log in to your Salesforce account and go to Setup . In the Quick Find box , search for Assignment Rules , then select Lead Assignment Rules .

lead assignment rules salesforce

2.  Then click on the  New  button to create a new rule.

assignment rules in salesforce

3.  Enter a  Rule Name . Then, activate the rule by clicking the  Activate  button. 

We can create only one active lead assignment rule at a time. So, if you have any activated lead assignment rule, it will get deactivated as you activate the new rule.

Then, click on the  Save  button.

lead assignment notification salesforce

4.  Open the rule by clicking the  Rule Name .

salesforce lead assignment

5.  Then click on the  New  button to add rule entry criteria.

lead assignment rules

6.  As you click the new button, you need to enter the following details:

  • Sort Order: Here, you need to provide the number so that this entry can be evaluated at the time.
  • Criteria:  As per our scenario, we need to enter  Lead Source = Phone Inquiry . You can define criteria as per your requirements.
  • Select User or  Queue :  Here, we need to assign phone inquiry leads to specific user.
  • Do Not Reassign Owner: If you checked this checkbox, after assigned the lead to this user, you cannot change owner later.
  • Email Template :  We can select an email template so that when a lead is assigned to a user, they will receive an email regarding the same.

Then click on the  Save  button.

assigning leads in salesforce

We can also select Queue to assign the lead records. For that, you need to select a queue and click the lookup icon to select a queue. Here, I have selected a custom queue that I created.

Assign lead to queue in Salesforce

Proof of Concept:

7.  Now, to check how the lead assignment rule works, navigate to the Leads tab. Then, create a new lead record with the lead source as a phone inquiry and make sure you have checked the checkbox of assign using the active assignment rule. Then click on the save button.

While creating the new record, you can see the lead owner is different, and you will see that after the record gets saved, the lead owner will be another user.

salesforce lead assignment rules example

8.  As you save the record, you will see that the lead owner has automatically changed to another user. That means a new user has been assigned to this lead record.

salesforce lead assignment rules limitations

This is how we can create lead assignment rules in Salesforce.

You can also read the  Lead Assignment Rule in Salesforce .

I hope you got an idea about lead assignment rules in Salesforce. In this article, we have seen what a case assignment rule is. We have also seen how to create a lead assignment rule in Salesforce with an example and step-by-step explanation.

You may also like to read:

  • Case Assignment Rules in Salesforce
  • How to Assign Records to Queue Using Salesforce Flow
  • Web-to-Lead in Salesforce
  • Email-to-Lead Using Salesforce Flow

Bijay Kumar

I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us .

Apex Hours

  • Salesforce Admin

Salesforce Lead Assignment rules

Hema

  • Dec 28, 2023

Salesforce Lead Assignment rules automate your org lead generation and support processes. Lead Assignment Rules are a powerful tool that enables the automatic assignment of leads to the right sales representatives based on specific criteria.

What is Salesforce Lead Assignment rules?

Lead assignment rules are used to specify how leads are assigned to users or queues. This is used to assign the owner of leads based on lead generation, like leads created from the web or imported from a data loader.

YouTube video

Type of Assignment Rule 

There are two types of assignment rules we have in Salesforce.

  • Lead Assignment Rules
  • Case Assignment Rule

How to create lead Assignment Rules

Let’s see the step-by-step guide to set up the lead assignment rules.

  • Creating Lead Assignment Rule
  • Creating Lead Assignment Criteria
  • Specify the lead assignment method
  • Activate the lead assignment rules
  • Test the lead assignment rules

Consideration for Lead Assignment Rules

  • We can create as many assignment rules as possible, but only one can be active.

Lead Assignment Rules can help streamline your lead management process, improve lead conversion rates, and increase sales productivity by ensuring that the right leads are assigned to the right representatives.

Hema

Related Posts

Inline Edits with the Enhanced User List View

Inline Edits with the Enhanced User List View

Dynamic Highlights Panel

Dynamic Highlights Panel – Winter 25 release

Is Low-Code Salesforce Development

Is Low-Code Salesforce Development a Threat to Traditional Non-SalesforceDevelopers?

Leave a reply cancel reply.

Your email address will not be published. Required fields are marked *

Name  *

Email  *

Add Comment  *

Notify me of follow-up comments by email.

Notify me of new posts by email.

Post Comment

IMAGES

  1. How to Create Lead Assignment Rules in Salesforce?

    create a lead assignment rule

  2. Lead Assignment Rules Salesforce

    create a lead assignment rule

  3. Master Lead Distribution: How to Create a Round Robin Assignment Rule

    create a lead assignment rule

  4. Lead Assignment Rules Salesforce

    create a lead assignment rule

  5. How to Create Lead Assignment Rules in Salesforce?

    create a lead assignment rule

  6. Lead Assignment Rules Salesforce

    create a lead assignment rule

VIDEO

  1. Difference Between i++ , i=i+1 in Hindi

  2. Indeterminate Forms

  3. How to Create a Workflow Assign Leads in Bulk to a User in Go High Level

  4. Never Miss a Lead Again: This CRM Hack Auto-Dial Prospects to Your Agents

  5. RULES FO PLURAL NOUNS

  6. Lead Assignment Rules (Lead Part-3)

COMMENTS

  1. Create a Round Robin Lead Assignment Rule - Salesforce

    Create a Round Robin Lead Assignment Rule. Keep your team's workload even by auto-assigning new leads to each user.

  2. Set Up Assignment Rules - Salesforce

    To view assignment rules: View Setup and Configuration. To create or change assignment rules: Customize Application. From Setup, enter Assignment Rules in the Quick Find box, then select either Lead Assignment Rules or Case Assignment Rules. Choose New, and then give the rule a name.

  3. Salesforce Lead Assignment Rules Best Practices and Tricks

    Salesforce Lead Assignment Rules are a numbered set of distribution rules that determine which owner a Lead record should be assigned (either a specific user or to a Salesforce Queue). They are generally used at the point in time when a Lead is created (typically by Web-to-lead or an integrated marketing automation platform like Pardot, Marketo ...

  4. Guide to lead assignment rules in Salesforce | Calendly

    We'll cover the benefits, how to plan your lead assignment strategy, and a step-by-step walkthrough of adding lead assignment rules in Salesforce. We'll also explore the power of scheduling automation to simplify and speed up lead assignment, routing, and qualification.

  5. Create Assignment Rules for Lead Distribution

    Create rules to filter leads by record field values or user criteria and assign them to the lead inbox queue. You can also create rules to directly assign leads to partner users. To send an email notification when a lead is assigned to the queue, select an email template.

  6. Running Lead Assignment Rules From Salesforce Flow

    Lead assignment rules allow us to automatically assign Leads to the appropriate queue or user. A Lead assignment rule consists of multiple rule entries that define the conditions and order for assigning cases.

  7. What Are Lead Assignment Rules in Salesforce? - LeanData

    Lead assignment rules specify how leads are assigned to users or queues as they are created manually, captured from your website, or imported via SFDC’s Data Import Wizard.

  8. What is Lead Routing, and How to Use Assignment Rules in ...

    Learn to assign leads (or cases) that are either manually created or created using web-to-lead (or web-to-case). Official Documentation: Managing Assignment Rules. Step-by-step instructions for creating assignment rules to automate your organization’s lead generation and support processes.

  9. How to Create Lead Assignment Rules in Salesforce?

    Create a Lead Assignment Rule in Salesforce. For example, there is a team of sales representatives, and we want to automatically assign a specific sales representative to a new lead when it is created, and the Lead Source is a Phone Inquiry.

  10. Salesforce Lead Assignment rules - Apex Hours

    How to create lead Assignment Rules. Let’s see the step-by-step guide to set up the lead assignment rules. Creating Lead Assignment Rule. Creating Lead Assignment Criteria. Specify the lead assignment method. Activate the lead assignment rules. Test the lead assignment rules.