Send Automatic Emails to New Lead Contacts

When entering net new leads, salespeople can add brand new contacts who don't yet exist in the application. These new contacts don't become "official" contacts until after leads are converted to opportunities.

This means that, when activities are created for net new leads, the associated new contacts won't receive automatic email notifications. You can, however, set up automatic email notification so that new contacts are kept informed of important activities on the lead, such as new appointments.

Setting up automatic email notifications involves a few configuration steps on the Activity object:

  1. Create an email template.

  2. Create two custom fields.

  3. Create an object workflow.

Let's look at these steps in detail.

Create the Email Template

Outside an active sandbox, create an email template on the Activity object.

  1. In Application Composer, navigate Common Setup > Email Templates.

  2. Click the Create icon.

  3. Select the Activity object.

  4. Enter a template name and then enter the template details, such as the email subject and body, for the desired notification.

  5. Click Save and Close.

Create Custom Fields

Next, create two custom fields on the Activity object. One field captures the new contact's email address. The other field captures the type of Leads UI that the customer is using.

  1. Enter a sandbox and, in Application Composer, navigate Standard Objects > Activity > Fields.

  2. Click the Create a custom field icon.

  3. Select the Formula option, then OK.

  4. Create the email field on the Activity object:

    Field Attribute

    Value

    Field type

    Formula (text type)

    Display name

    Lead Contact Email

    API name

    LeadContactEmail_c

    Script

    return LeadVOVA?.PrimaryContactEmailAddress;

    Include in Service Payload check box

    Selected

  5. Create the UI indicator field on the Activity object. You create the field to check the type of Leads UI that the customer is using.

    Field Attribute

    Value

    Field type

    Formula (text type)

    Display name

    Lead Simplified Indicator

    API name

    LeadSimplifiedIndicator_c

    Script

    return LeadVOVA?.SimplifiedLeadIndicator;

    Include in Service Payload check box

    Selected

Create the Object Workflow

Now that you've created the email template and custom fields on the Activity object, create an object workflow to send automatic email notifications to new lead contacts.

  1. Still inside your sandbox, in Application Composer, navigate Common Setup > Object Workflows.

  2. Click Actions > Create.

  3. Select the Activity object and enter the object workflow name.

  4. Enter the condition that must be true before the object workflow executes:

    if (LeadContactEmail_c != null && LeadSimplifiedIndicator_c == 'Y' ) {
    return true;
    } else {
    return false;
    }
    
  5. In the Actions region, click Create next to Email Notification.

  6. Enter the email notification name and details, including the email template that you previously created.

  7. Click Save > Save and Close.

When a new activity is created on a lead, an automatic email notification will be sent if the lead was created in the simplified UI with a brand new contact.