Let the platform do the work

Using Legacy Workflows to Automatically Respond to a Lead Created Via Web-to-Lead Form

Overview

This article documents how to automatically send an email to a lead that is created from a web-to-lead form. This workflow will also work for when leads are manually entered into SugarCRM that meets the criteria specified in the workflow condition.

Prerequisites

  • You must be an administrator or have developer-level access in Sugar to create workflows.
  • An alert email template already exists. For more information on creating alert email templates, please refer to the Creating an Alert Email Template for Workflows article.
  • System email settings are configured in Admin > Email Settings.

For more information, please refer to the Workflow Management and Email documentation.

Steps to Complete

In this example, the workflow looks for newly created leads with the "Lead Source" field set to "Campaign". When a new lead is created that has the lead source of "Campaign" an email welcome letter will be sent to the lead. Please refer to the Adding Lead Source as a Hidden Field to Web-to-Lead Forms article for more information. From the Admin page, scroll down to the Developer Tools section.

  1. Click on the Workflow Management link.
  2. On the left-hand side, click on "Create Workflow Definition".
  3. Enter the name of the workflow. For example, "Web to Lead Welcome Email".
  4. Complete the following fields and then click Save:
    • Execution Occurs : When record saved
    • Status : Active
    • Target Module : Leads
    • Applies to : New Records Only
    • Processing Order : Alerts then Actions
  5. Under "Conditions", click the Create button.
  6. Select "When a field in the target module contains a specified value".
  7. Click the Next button.
  8. Click the "Specific Field" link.
  9. Within the popup window, select "Lead Source Equals Campaign".
  10. Click "Save".
  11. Click "Save" again.
  12. Under "Alerts", click the Create button.
  13. Enter the name of your Alert (this name is not sent to your customers), for example, "Lead Welcome Alert", and then complete the following fields:
    • Alert Type : Email
    • Source Type : Custom Template
    • Select your Custom Template in the dropdown list.
  14. Save.
  15. Under "Alert Recipient List", click "Create".
  16. Select "Recipient associated with the target module".
  17. Click "Next".
  18. Check the checkbox for "Select custom email and name fields"
  19. For the Email field, select "Email" and click "Save".
  20. For the Name field, select "Name" and click "Save".
  21. For the address type, select "To:" and click "Save".
  22. Click Save again.

Application

You have just created an alert and defined its recipients. Now you are ready to test your workflow.

  1. Create a test lead that has an email address that you have access to and set the Lead Source to Campaign.
  2. Click the Save button.

The welcome email should have been sent to the test lead.