How to Automatically Assign Salesforce Leads to Campaigns

Salesforce’s Web-to-Lead functionality is a great way to get leads directly into Salesforce. And Salesforce Campaigns provide useful data on what happened to the leads and contacts produced from various marketing activities.

Besides making sure inquiries don’t fall through the cracks by using web-to-lead functionality with Salesforce, any additional data you can add to your web site forms can help your business. Source and keyword data can be added in through an app like our Campaign Tracker, and there are a number of other things that can be added to the form through hidden fields.

One easy addition is to hard-code a particular Salesforce Campaign value in your web-to-lead forms.

This is especially useful if you have many landing pages that are specific to certain advertising campaigns, but you can even do it with your standard “Contact Us” form. Here’s how to do it:

 

  1. Create a Campaign in Salesforce (or go to an existing Campaign)

  2. Copy the ID of the Campaign from your web browser’s address bar

  3. Have your web designer add the following hidden field to your web-to-lead forms, replacing the value with the ID you copied earlier.
    <input type="hidden" name="Campaign_ID" value="7010V000001ufMI">
    
    
    
  4. That’s it! (But run a couple of test leads!)

 

These instructions assume you are using the HTML Salesforce provides in its Web-to-Lead form builder, but it should work (with some degree of modifications) on any form that posts leads into Salesforce.

You can also automatically assign a Lead Source to a particular form, in much the same way.

Be careful of doing this if you are getting the lead source from somewhere else, such as a picklist field on the form that the user fills out, or tracking software. You don’t want to overwrite any other data.

(The CloudAmp apps use their own lead source fields (First UTM Source, Last UTM Source, Lead Source Type, etc. and so will never put data in the standard Salesforce Lead Source field).

<input type=hidden id="lead_source" name="lead_source" value="Contact Us Form">

If you use these tricks, let me know your tips and tricks in the comments below, or hit me up with questions there as well.

Happy Campaigning.

Advertisements

How to get a detailed Email about every new lead in Salesforce

Many online marketers and demand generation professionals want to track their leads in Salesforce, and understand the performance and ROI of their efforts in as near real-time as possible. This post is a step by step tutorial on how to receive a detailed email with all of the lead contact information and tracking details, each time a lead is created in Salesforce via the Salesforce web-to-lead forms on your website.

Your Salesforce administrator (or marketing / sales manager with the appropriate permissions) can assign new leads manually. But if you use assignment rules to automatically assign Salesforce leads to a user or queue, you can specify an email template for the notification in the matching entry. This allows you to receive an immediate, custom email with any information you want, every time a lead from your web site is created in Salesforce.

Default-Lead-Assignment-Email

Step 1: Turn off the Notify checkbox in Setup > Lead > Settings

You may have done this already, as it can be annoying if you get a high volume of inquiries and get the standard notification email (above), which provides very little information.


Salesforce-Lead-Settings-Page

Step 2: Create a Queue

If you don’t already have a Queue set up in Salesforce, I like to create one called “Inbound Web Leads” where everyone or selected people in marketing and sales can be members of the queue so they receive the notification emails.

Queues in Salesforce help teams manage leads, cases and more because records are placed in a queue, instead of being owned by a particular user. And the records remain there until they are assigned to a user or Accepted by a queue member. Any member of that queue or users above them in the role hierarchy can claim ownership of records in a queue.

Creating-Queue-in-Salesforce

You don’t technically need to create a queue, you can just assign all the leads to a single user with the same assignment rules we will use below. But a queue will give you far more flexibility now and allow you to easily scale for future growth as well.

  1. Setup > Manage Users > Queues

  2. Enter a Name for the Queue, Select the Object you want for the Queue (Lead)

  3. Leave “Queue Email” blank unless you have a single person or email list you want notified

  4. Add users as Members of the Queue

 

Step 3: Create an Email notification template

There is a standard email template called “Leads: New assignment notification (SAMPLE)” that comes with Salesforce and is usually stored in the “Unfiled Public Email Templates” folder. For CloudAmp’s Campaign Tracker application, designed to track lead sources into Salesforce, we created a custom email template and included it in our app.

  1. Setup > Email > My Templates

  2. Select the correct folder and template

  3. Customize the template, or create your own

CloudAmp-Email-Templates-FolderThis custom email template, located in the “CloudAmp Email Templates” folder, has a large number of merge fields (the field names in { } brackets) which pull in contact data and all of the Campaign Tracker data into the email notification automatically. This way you can see right away when a new lead comes in how complete their contact information and tracking data is, without having to log into Salesforce.

You can of course clone and edit, or just edit this provided email template to reduce the number of fields in the email notification, or add in other fields from your Salesforce implementation that you think are important (custom fields or otherwise). In addition, if you are not using our Campaign Tracker application (why not?), you can create your own Email template and follow the rest of the instructions in the post.

CloudAmp-Campaign-Tracker-Lead-Notification

Step 4: Create assignment rules

Assignment rules automatically assign new web-generated leads that meet certain criteria. Without any lead assignment rules, Salesforce assigns all new web-generated leads to the Default Lead Owner defined on the Lead Settings page.

When you create or edit a lead manually, you can also check a box to assign the lead automatically using your active lead assignment rule, but that is a different process that we won’t cover here.

Salesforce-Lead-Assignment-Rule

For each rule entry in an assignment rule that is evaluated, an email is automatically sent to the new owner if the rule causes the lead to be reassigned, and you specified an email template. This is where the magic happens, since you can have the assignment rule assign a lead to a queue, and all queue members will receive the email.

  1. Setup > Customize > Leads > Lead Assignment

  2. Create a New Lead Assignment Rule (and make it active)

  3. Create one or more Rule Entries in the assignment rule.

  4. Choose the Email template from step 3

  5. Run some tests with your web-to-lead forms

Salesforce-Lead-Assigment-Rule-EntryIn the screenshot above, we have just created a single rule entry with blank values, so it should capture any web-generated leads. However, in most cases where different types of leads would need to go to different people, you can create multiple Rule Entries and order them so leads fitting various different criteria get assigned differently (and can have different Email notification templates too).

Assignment Rules (combined with Auto-Response Rules) are a great way of managing different types of leads, even leads from completely different web sites in a single Salesforce org. Just use a hidden field in your web-to-lead forms to set a custom value and you can trigger both lead assignment and email auto-responses that are customized with great granularity. But that is a post for another time.

There are other ways of triggering emails when the owner of a lead changes (such as Workflow rules if you have Salesforce Enterprise Edition or above), but this is the most common configuration.

Salesforce-Lead-Notification-Email-Example

So there you have it. Just follow these steps in Salesforce, and you will be receiving complete and instant Email notifications any time a new web-generated lead is created in Salesforce (just like the one above).


Any questions or feedback, please leave them in the comments below and I will respond. Thanks!

%d bloggers like this: