Exercise: Lead Management

[ExerciseIntro ]

[RCNotLoggedInNotAdmin]

[/RCNotLoggedInNotAdmin]

[RCAdmin]

In this exercise, we are going to configure lead assignment rules, auto-response rules, and a sample web-to-lead form.  We will use the example referenced in previous articles, by adding a “Type” custom field to lead containing values ‘Service’ and ‘Product’.  Depending on which value is present when a web-to-lead form is submitted, a different response will be sent to the submitter.

[sc:ExerciseSteps ]

Step 1.  Create the “Product Interest” field.

  1. Navigate to Setup –> Customize –> Leads –> Fields.
  2. Click New.
  3. Select Picklist.  Click Next.
  4. Enter field label “Type”.
    Enter picklist values:
    Product
    Service

    Click Next.
  5. Click Next.
  6. Click Save.

Step 2. Create Email Template Folder

  1. Navigate to Setup –> Communication Templates –> Email Templates.
  2. Click “Create New Folder”.
  3. Enter label “Lead Response Templates”.
    Select “This folder is hidden from all users” (otherwise users will be able to select auto-response email templates for regular email use).
    12-27-2012 3-02-24 PM
    Click Save.

Step 3. Create Email Templates

The “Lead Response Templates” folder should now be selected.

12-27-2012 3-05-14 PM

Creating the General Response Template:

  1. Click “New Template”.
  2. Click Next.
  3. Check “Available for Use”.
    Enter Email Template Name “General Inquiry Response”.
    Enter Subject “Thank you for inquiring.  We will be in touch shortly.”.
    Enter Email Body:Dear {!Lead.FirstName,Sir or Madam},Thank you for your interest in {!Organization.Name}. We look forward to working with {!Lead.Company, your company}.  Someone from our team will follow up with you shortly.Sincerely,{!User.Name}
    {!Organization.Name}
    {!User.Email}12-27-2012 3-18-27 PM
  4. Click Save.
  5. Click “Lead Response Templates” to return to the folder:
    12-27-2012 3-29-32 PM

Creating the Product Response Template:

  1. Click “New Template”.
  2. Click Next.
  3. Check “Available for Use”.
    Enter Email Template Name “Product Inquiry Response”.
    Enter Subject “Thank you for inquiring.  We will be in touch shortly.”.
    Enter Email Body:Dear {!Lead.FirstName,Sir or Madam},Thank you for your interest in {!Organization.Name}. We look forward to working with {!Lead.Company, your company}.  You will be receiving a product brochure in the mail shortly.Sincerely,{!User.Name}
    {!Organization.Name}
    {!User.Email}
  4. Click Save.
  5. Click “Lead Response Templates” to return to the folder.

Creating the Service Response Template:

  1. Click “New Template”.
  2. Click Next.
  3. Check “Available for Use”.
    Enter Email Template Name “Service Inquiry Response”.
    Enter Subject “Thank you for inquiring.  We will be in touch shortly.”.
    Enter Email Body:Dear {!Lead.FirstName,Sir or Madam},Thank you for your interest in {!Organization.Name}. We look forward to working with {!Lead.Company, your company}.  A services consultant will be in touch shortly to discuss your needs.Sincerely,{!User.Name}
    {!Organization.Name}
    {!User.Email}
  4. Click Save.
  5. Click “Lead Response Templates” to return to the folder.

You should now have 3 templates:

12-27-2012 3-36-16 PM

 

Step 4.  Create Queues

Create the Product Sales Queue:

  1. Navigate to Setup –> Manage Users –> Queues.
  2. Click New.
  3. Enter Label “Product Sales”.
    Assign the lead object to the queue:
    12-27-2012 3-39-18 PM
  4. Click Save.

Create the Service Sales Queue:

  1. Navigate to Setup –> Manage Users –> Queues.
  2. Click New.
  3. Enter Label “Service Sales”.
    Assign the lead object to the queue.
  4. Click Save.

Step 5.  Configure a Lead Auto-Response Rule

Create the Auto-Response Rule:

  1. Navigate to Setup –> Customize –> Leads –> Auto-Response Rules.
  2. Click New.
  3. Enter Rule Name “Default”.
    Check “Set this as the active Web-to-Lead Auto-Response Rule”.
    Click Save.
    12-27-2012 3-45-48 PM
  4. Click “Default” to view and edit the rule.
    12-27-2012 3-47-15 PM

Add the Product Auto-Response Rule Entry:

  1. Click “New” under Rule Entries.
    12-27-2012 3-52-11 PM
  2. Enter Sort Order 1.
    Select Lead: Type equals Product.
    Enter a Name and Email Address (e.g. no-reply@gmail.com).
    Select the “Product Inquiry Response”.
    12-27-2012 4-06-13 PM
    Click Save.

Create the Service Auto-Response Rule Entry:

  1. Click “New” under Rule Entries.
    12-27-2012 3-52-11 PM
  2. Enter Sort Order 2.
    Select Lead: Type equals Service.
    Enter a Name and Email Address (e.g. no-reply@gmail.com).
    Select the “Service Inquiry Response”.
    1-3-2013 8-32-28 PM
    Click Save.

You should now have two rules entries within an active rule:

1-3-2013 8-34-02 PM

 

Step 6. Edit Web-to-Lead Settings 

  1. Navigate to Setup –> Customize –> Leads –> Web-to-Lead.
  2. Click Edit (You may need to first enable web-to-lead).
  3. Ensure that you are listed as the Default Lead Creator.
    Set the Default Response Template to “General Inquiry Response”.
    1-3-2013 8-37-06 PM
  4. Click Save.

 

Step 7. Create Lead Assignment Rule

  1. Navigate to Setup –> Customize –> Leads –> Assignment Rules
  2. Click New.
    Enter a name (e.g. “Default”).
    Check “Set this as the active lead assignment rule.”
    assignment rule
    Click Save.
    Click on the “Default” rule.
  3. Click “New” to create a new rule entry.
    Enter Sort Order “1”.
    Lead Type equals “Product”
    Queue “Product Sales”
    rule entry
    Click Save & New.
  4. Enter Sort Order “2”.
    Lead Type equals “Service”.
    Queue “Service Sales”.
    Click Save.

(Leads that are not Type “Product” or “Service” will be assigned to the default lead creator.)

Step 8. Create a Web-to-Lead Form

  1. Navigate to Setup –> Customize –> Leads –> Web-to-Lead.
  2. Click “Create Web-to-Lead Form”.
  3. Add the “Type” field to the list.
    1-3-2013 8-49-14 PM
    Click “Generate”.
  4. Copy the Web-to-Lead Form into a text editor:
    1-3-2013 8-41-17 PM
  5. Save the file as a .html file.
    1-3-2013 8-44-37 PM

 

[sc:ExerciseSuccessCriteria]

Open the file created in the previous step in a web browser.  Submit the form 3 times, with a valid email address:

Submission 1. Type = “Product”

1-3-2013 8-54-31 PM

Ensure results:

  • Lead Owner: Product Sales Queue
  • Email Reply: Product Response Inquiry

Submission 2. Type = “Service”
Ensure results:

  • Lead Owner: Service Sales Queue
  • Email Reply: Service Response Inquiry

Submission 3. Type = –None–
Ensure results:

  • Lead Owner: You (or otherwise if web-to-lead settings changed)
  • Email Reply: General Response Inquiry

[/RCAdmin]

52 thoughts on “Exercise: Lead Management”

  1. Step 5. Configure a Lead Auto-Response Rule
    1. Navigate to Setup –> Customize –> Leads –> Lead Auto-Response Rules.
    3. Enter Rule Name “Default”.
    Check “Active”.

    Step 7. Create Lead Assignment Rule
    Click New.
    Enter a name (e.g. “Default”).
    Check “Active”.

    Everything worked fine except the formula in the email body doesn’t seem to work, {!NullValue(Lead.Company, “your company”)}. Instead it inserts “[not provided]”.

  2. You might want to change the information on the From email address in the Auto-Response rule definition. You can’t put just any email there: “Error: noreply@gmail.com is an invalid From email address. The sender email address must be either one of your verified organization-wide email addresses or the email address in your Salesforce user profile.”. This is actually quite unfortunate since in these auto-replies companies often would want to put a dummy email address so people can’t actually reply to them.

  3. Hi John,

    I am new to SFDC. In this example, after submitting lead, is there a way to show a message “Your information is submitted” like that in SFDC itself?

  4. Hey John ,other experts

    So I created an auto response rule and also assigned different email templates to my assignment rules. Basically created a clash to find which email template is used in this situation. Figured out that the auto response rule wins. The email template used was that of the auto response rule and not the one directly assigned in the assignment rule. Hope that’s correct?

  5. This is a great training resource.

    One question, it worked for 2 of the 3. I got a response for Product Inquiry and Service Inquiry, but not the General Inquiry. Where do we specify the email template for the Default?

    Thanks,
    Kim

  6. John,
    I am stumped on this one. I have tried everything and my leads get assigned to the default owner and not to the queue. I followed your steps exactly. I checked the debug logs and it appears the assignment rule is not assigning the lead to a queue – The owner is shown as blank and its reassigned to the default owner.

    I’m not sure why this is occurring – any ideas?

  7. Dear John,

    Your training system is so valuable. I’ve been using it for over a month, but today when my exercise worked on the first try, I broke into a big smile for the first time during training. Just wanted to share a little joy.

    Thank you,

    Theresa

  8. Hi John, everything looks right ( email templates, auto responses rules, lead assignment rules and web to lead form ). However, I did not receive any email. Any thoughts? Many thanks, -Crystal

  9. Hi John,

    I created a WTL form as well as 3 email templates (general (default) /product / service inquiry) + an auto-response rule with 2 rule entries for product and service inquiries based on your exercise above.
    However when I leave the company field blank on the web form, in my auto-response email I receive company as not provided, see below:
    “We look forward to working with [not provided].”
    Whereas if I leave first name and last name blank I receive it correctly:
    “Dear Sir or Madam,”

    Here is the Email Template text.

    Dear {!NullValue(Lead.FirstName, “Sir or Madam”)},

    Thank you for your interest in {!Organization.Name}. We look forward to working with {!NullValue(Lead.Company, “your company”)}.
    You will be receiving a product brochure in the mail shortly.

    Sincerely,

    {!User.Name}
    {!Organization.Name}
    {!User.Email}

    Any thoughts? Thanks a lot, Soraya.

  10. I have tested the web to lead page as described but the response from the system is as follow:
    Salesforce.com Lead Capture Interface

    Reason: Your Lead could not be processed.
    null
    Lead Capture Page: Not available.

    Record Information:

    00N1a000006ecb4 = Service
    city = San Jose
    company = People at work
    debug = 1
    debugEmail =
    email = jason.peoples@hotmail.com
    encoding = UTF-8
    first_name = Jason
    last_name = Peoples
    oid = 00D1a000000JnGg
    retURL = http://
    state = Ca
    submit = Submit Query

    If you have any questions, please click on Help & Training at the
    top right of any page within salesforce.com

    The Capture page is not available?

    1. I was able to find the answer to the question from a blog I found on the web. It indicated to add the instance name to the html. Instead of entering https:/test.salesforce.com I changed the value to https:/na24.salesforce.com which resulted in a successful record processed.

    2. Your request has been queued.

      Record Information:

      00N1a000006ecb4: Service
      city: Cupertino
      company: Hunter Industries
      debug: 1
      debugEmail:
      email: larry.hunter@yahoo.com
      encoding: UTF-8
      first_name: Larry
      last_name: Hunter
      oid: 00D1a000000JnGg
      retURL: http://
      state: California
      submit: Submit Query

      The shows as queued, Is there still a problem with the code? I am working from a developer org. I understand there is a limit of 500 record per day max.

        1. John, I have checked both Product and Service. I will turn on the debug then next try and see if I can find anything via the debug logs. I will keep you posted.

          Fred

      1. If the lead is assigned to a queue, the {!User.Name} populated with the auto response rule mentions the Default Lead Creator’s name.

  11. Hi John
    I created the web to lead form and Auto response email. I can see the lead in Salesforce and the activity history shows that an email was sent to the email id specified in the form. But I have not received any email at that email id. Am I missing something?

    1. There is a settings that would prevent the email from being sent (sandboxes can turn off outbound email for example, check email deliverability in setup) – any chance spam filter could have been the issue?

  12. Hi John. I have the following questions related to the above exercise:
    1. In the email template, from where does the system take the User Name mentioned in the signature of the email?
    2. When the lead is created, from where does the system take the “created by” and “modified by” names?

    Do both of the above come from the “Default Lead Creator” field on the Web-to-lead page?

  13. I am using windows 8 with notepad but when I try to open the HTML file it simply leads back to this page – any ideas where I may be going wrong?

  14. Hi John,
    I have a question. You have mentioned that (Leads that are not Type “Product” or “Service” will be assigned to the default lead creator.) Will they be assigned to the default lead creator mentioned in the web-to-lead settings or the default lead owner in the lead settings ? Isnt ‘default lead creator’ the one who will be mentioned only in the ‘Created by’ field of the lead and not in the ‘Lead owner’ field? Thanks .

    1. Default is this context refers to the web to lead default lead creator setting in web to lead configuration, and would only apply to web to lead created leads.

      If a lead was created manually (with no other workflow rules, triggers, etc. present), then the lead creator would also become the lead owner.

    2. I had this same question and the answer John gave below still made me confused. So I tested this and here is what I experienced. Let’s say a new lead is created via Web-to-Lead and did not match one of the existing assignment rules. The new lead will be created in SF.com and the “Created By” field will have the “Default Lead Creator” (which is specified under ‘Web-to-Lead Settings) and the “Lead Owner” field will have the “Default Lead Owner” (which is specified under Leads > Settings.

  15. John,

    I think it will be helpful to include a couple of tweaks if testing on a sandbox:

    1) On the sample HTML that gets pasted on the notepad, please make sure to change the “www.salesforce.com” to “test.salesforce.com” on form tag

    2) Make sure to point the Org Id to the sandbox (on the next line in the HTML)

    Though they seem to be evident, sometimes we tend to overlook these minor changes.

  16. The text versions of the e-mail templates are not correct. The versions shown in the images are correct. The correct merge field for the signature is {!User.Name}, not {!User.FullName}. Also, should the e-mail template be entered when creating the lead assignment rule?

    1. Thanks Kevin – not sure how that got mixed up. Updated.

      Specifying the email template in the assignment rule is what is sent to the lead owner – the auto-response rule sets the email sent to the submitter of the lead form.

  17. Troubleshooting tip for Macs:
    You have to use TextEdit in lieu of Notepad. When you open TextEdit, go to ‘Format’ > ‘Make Plain Text’. Next, copy in the code provided by SF. When you save, manually add the .html extension. Rather than opening the file in the web browser you can open it through Finder and it will open the file through your default browser.

Leave a Reply