How To Evenly Distribute Leads to a Sales Team with Gravity Forms

Automate your lead distribution process in just a few minutes.

When working with a team, it’s important to make sure everyone is getting their share of the leads (or doing their share of the work). This tutorial will show you how to automatically distribute leads generated from a Gravity Form. Let’s get started!

Getting Started

This tutorial requires the Gravity Forms Round Robin snippet. Once you have it inserted into your theme’s functions.php file, follow the steps below.

Steps

  1. Add a Drop Down Field
  2. Configure Snippet
  3. Configure Notifications

Step 1 – Add a Drop Down Field

Start by adding a Drop Down field to your form. The options input into this field are what the snippet will cycle through, so we’re going to insert the email addresses for our sales team.

This field will be hidden by default, and the submitted value of this field will always be overridden by the snippet.

This field serves two purposes. First, it will identify to which salesperson the lead was assigned. Second, it will be used below to send a notification to the assigned salesperson so they can get to work on the new lead.

Send More Leads to a Specific Emails

Many email services support special characters as aliases for emails. Using aliases, you can add the same address to the Drop Down to send more leads to some addresses instead of others. Here’s a short list of common email providers and their support for email aliases:

  • Gmail supports using + and . in email addresses to create aliases. For example, all of these addresses will be delivered to scott@gmail.com:
    • scott@gmail.com
    • scott.a@gmail.com
    • scott+b@gmail.com
  • Yahoo supports only using a dot in addresses like this: scott.a@yahoo.com
  • Outlook supports only using a plus in addresses like this: scott+b@outlook.com

You can use GF Populate Anything to automatically populate their emails into the Drop Down. Here’s how.

Step 2 – Configure Snippet

Update the form_id and field_id in the snippet to match your Form ID and the Field ID for your Drop Down from above.

new GW_Round_Robin( array(
	'form_id' => 123,
	'field_id' => 4,
) );

Step 3 – Configure Notifications

Next, create a notification, set the Send To setting to “Select a Field”, and choose your Drop Down field.

That’s all there is for setup. When the first entry is submitted to the form, the Round Robin snippet will send the lead to the first name in the list, in our case to david@blacksmiff.com. The next entry will be sent to clay@griffinrider.org, and so on. Once the end of the list is reached, it will start over with David and continue cycling.

Dynamically Populate Your Recipients

With GF Populate Anything, you can automatically populate the email addresses.

Check the Populate choices dynamically checkbox and set the Type to “User”. If your sales people have a particular role, filter by role.

Want an easy way to manage custom roles? Check out User Role Editor from MemberPress.

Set the Value for the Choice Template to “User Email”.

Any sales person with the Role of Sales will automatically be added to the list. The beauty of this approach is that as your team changes over time, Populate Anything will automatically update the list without any user intervention.

Comments

    1. Mark Erickson
      Mark Erickson August 27, 2020 at 5:14 pm

      Yes, it would be the same person every time. Thank you so much Ryan for the helpful post and for answering my question!!

Leave a Reply

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

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.

Grab a bundle of free Gravity Forms plugins

Enter your email and receive our most popular free plugins and snippets, plus access to hundreds of others.

This field is for validation purposes and should be left unchanged.