Lead that Did Not Convert to Customer Within Three Days

The following sample shows how to create a workflow that notifies a sales rep if a Lead record did not convert to a Customer record within three days of Lead record creation.

The example uses a workflow field, Lost Lead Email Sent, on the lead record form to track if the sales rep was notified. A saved search identifies leads created three days before the current date. The workflow runs the saved search on a schedule and sends the email to the sales rep of the leads that have not been converted to customers in three days that meet the saved search criteria.

To set up the workflow, complete the following steps:

Step 1 Create the Custom Entity Field for the Lead Record

Create a custom entity field for the Lead record form. The field tracks if the sales rep was notified of leads that did not convert. The workflow sets this field to true when the workflow sends the email. This field is set to false for all leads by default.

The saved search uses this field as search criteria, so you must create the field before you can create the saved search.

To create the custom entity field for the Lead record form:

  1. Go to Customization > Lists, Records, & Fields > Entity Fields > New.

  2. On the New Custom Entity Field page, enter the following properties:

    Property

    Value

    Label

    Lost Lead Email Sent

    Type

    Check Box

  3. On the Applies To subtab, enable Customer.

    A portion of the Custom Entity Field page with the Applies To tab selected and the Customer box selected.
  4. Click Save.

  5. Continue to Step 2 Create the Saved Search.

Step 2 Create the Saved Search

Create a saved search to find lead records created more than three days ago with the Lost Lead Email Sent field equal to false.

To create the saved search:

  1. Go to Lists > Search > Saved Searches > New.

  2. On the New Saved Search page, click Customer.

  3. In the Search Title field, enter Lost Lead Email Search.

  4. On the Criteria tab, enter the following filter criteria in the Filter field:

    Filter

    Criteria

    Date Created

    before and 3 days ago

    Stage

    any of and Lead

    Lost Lead Email Sent (Custom)

    No

    A portionof the Saved Customer Search page with the Criteria and Standard subtabs selected.
  5. Click Save.

  6. Continue to Step 3 Create the Workflow and Set the Schedule.

Step 3 Create the Workflow and Set the Schedule

Create a workflow for the Lead record and set a schedule for the workflow. Create a single state with a Send Email action and a Set Field Value action for the Lost Lead Email Sent field on the Lead record.

To create the workflow and workflow actions:

  1. Go to Customization > Workflow > Workflows > New.

  2. On the New Workflow page, enter the following properties:

    Section

    Property Name

    Value

    Basic Information

    Name

    Lost Lead Workflow

    Record Type

    Customer

    Sub Types

    Lead

    Release Status

    Released

    Initiation

    Scheduled

    checked

    Schedule

    Saved Search Filter

    Lost Lead Email Search

    Repeat

    check

    Frequency

    Every 30 minutes

  3. Click Save.

  4. The workflow diagrammer, appears with one state.

    Select the state in the diagrammer and click the Edit icon on the State tab in the context panel.

  5. In the Name field, enter Send Lost Lead Email.

  6. Click Save.

  7. To create the Send Email action:

    1. Select the Send Lost Sale Email state in the diagrammer.

    2. Click New Action on the State tab in the context panel.

    3. Click Send Email in the New Action window.

    4. Enter the following properties:

      Section

      Property

      Value

      Sender

      Specific Sender

      Select a sender.

      Recipient

      From Field

      Record: Current Record

      Field: Sales Rep

      Content

      Use Template

      Select a template in the Template dropdown list.

      A portion of the Parameters section of the New Action window.
    5. Accept the default values for the other properties and click Save.

  8. To create a Set Field Value action to set the value of the Lost Lead Email Sent field on the lead record to true:

    1. Select the Send Lost Sale Email state in the diagrammer.

    2. Click New Action on the State tab in the context panel.

    3. Click Set Field Value in the New Action window.

    4. In the Parameters section, select Lost Lead Email Sent in the Field dropdown list.

    5. In the Value section, select Static Value and enable the Checked box.

      A portion of the parameters sectin showing Static Value as selected and the Checked checkbox enabled.
    6. Accept the default values for the other properties and click Save.

Every 30 minutes the saved search runs. If the saved search returns records that match the criteria, NetSuite initiates a workflow instance on each record. The records enter the Send Lost Sale Email state and the Send Email action and Set Field Value actions execute. The next time the saved search is run, the saved search will filter out the leads that have the Lost Lead Email Sent field set to true.

Note:

For more information about how NetSuite runs scheduled workflows, see Scheduled Trigger.

Related Topics

Workflow Samples
Lead Nurturing Workflow
Estimate Approval Routing Workflow
Welcome Email Sent to Customers Three Days After First Order Workflow
Storing a Return Value from a Custom Action Script in a Workflow Field
Lead Nurturing Campaigns
Building the Lead Nurturing Workflow

General Notices