Abandoned Cart Email

Administrators can set up Salesforce automation tools to send an abandoned cart email to constituents who leave an item(s) in their cart for a given number of days, without checking out.

Recipe Prep

Keep these things in mind:

  • You are using Community Hub in your org.
  • You are not using cash billing in your org (see note at the bottom of the recipe). Learn more about Bulk Billing.
  • No Community Hub carts exist that contain no products.

To make this recipe, you should understand:

  • Process Builder
  • Autolaunched Flows
  • How the Cart object is used in Community Hub.

This recipe will be even better if you understand:

  • Salesforce email templates
  • Salesforce email alerts
  • The Nimble Templating Framework


You will combine these ingredients to make this recipe:

Suggested Name Type Description
Cart Inserted Process Builder
The process builder is placed on the Cart object and started when a cart is created. If the cart is intended for Community Hub use, a scheduled action (configured to send when you wish to remind your user of an abandoned cart) launches an autolaunched flow to evaluate additional criteria and ultimately send the email.
Abandoned Cart Check Autolaunched Flow
The autolaunched flow receives the cart record Id from the Cart Inserted process builder and evaluates logic to determine sending a reminder email. For example: a decision would evaluate if the cart still exists and if the cart creator is a constituent inCommunity Hub. If so, the decision would send an email, if not, no email would send.
Abandoned Cart Alert Email Alert

The alert configured to send from an organization-wide email address to the constituent who created the Community Hub cart and abandoned it.

Abandoned Email Email template
The template used to send the message to the constituent in Community Hub who created the cart and did not checkout within a given number of hours/days (whatever is set in the Cart Inserted process builder).


You can follow these directions to make this recipe in your org:

  1. Create the email template.
    Learn more about creating and marking a template available for use (external). 
  2. Create the email alert:
    1. Select Cart as the object for the Email Alert.
    2. Select the template you created
    3. Select User as the recipient type and select Record Creator as the selected recipients.
    4. Select your preferred organization-wide email address as the email's "from address".
    Learn more about creating Email Alerts (external).
    Learn more about setting up org-wide email addresses (external).
  3. Create the autolaunching flow:
    1. Create a variable resource called CartId with the following details:
      1. Data Type is Text
      2. Input and Output is Input Only.
    2. Create a record lookup variable with the following details:
      1. Lookup is NU__Cart__c
      2. Field is Id
      3. Operator is equals
      4. Value is CartId variable
      5. Assign the record's field to variables
        1. Field is Id
        2. Variable is CartId variable
        3. Assign null values to the variables if no records are found is TRUE
        Show Me an Image...

    3. Create a decision variable called Cart Exists
      1. Create an editable outcome called Yes with the following details:
        1. Resource is CartId variable.
        2. Operator is is null.
        3. Value is GlobalConstant.False (in GLOBAL CONSTANT value picklist dropdown).
        Show Me an Image...
    4. Drag the email from the Palette menu onto the canvas.

        Show Me an Image...

    5. Connect all elements:
      1. Mark the Lookup as the beginning step, link to decision element.
      2. Link decision element to Email Alert element, and select the Yes outcome.
        Show Me an Image...

    6. Save as an autolaunched flow, assign a name, and activate the flow.
    Learn more about creating Flows (external).
  4. Create a process builder:
    1. Click New and assign a name that makes sense to the process builder.
    2. Choose the Cart object and only when record is created.

        Show Me an Image...
    3. Create a criteria rule called "Is Community Hub Cart?" with the following details:
      1. Formula evaluates to true
      2. Formula is NOT(ISBLANK([NU__Cart__c].NU__Identifier__c))

        NU__Identifier__c is a Nimble AMS field that is populated with the Person Account's ID only on Community Hubcarts. So, checking when the field is not blank infers the cart is intended for use by a constituent in Community Hub.

        Given the order of operations, it was found that validating the user profile name = Community Hub did not satisfy the criteria needed to ensure it was a Community Hubcart, although this would've been preferred. A custom formula checkbox field might also be useful to designate a cart as "Is Community Hub accessible".

        Show Me an Image...
    4. Create a Scheduled Action to occur X days or hours from the CreatedDate of the cart.

        Show Me an Image...
    5. Select Launch a Flow as the Scheduled Action, and enter the name of the flow you created, assigning the Cart Record ID (NU__Cart__c.Id) to the flow input variable called CartId.

        Show Me an Image...
    6. Save and activate the process builder. 

      Show Me an Image...

    Learn more about creating Process Builders (external).

This is one of many different ways to set up an email follow up for abandoned carts. Given the innumerable decisions and evaluations you can configure in the Cloud Flow Designer, you can adjust the logic to execute reminders in whatever way makes sense for your association by including more decisions and more queries.

 For example: you could send emails based on specific Account attributes, or based on which products within a constituent's cart.

Feel free to tailor this recipe to fit your needs and business processes.

If you use cash billing in your org, consider reviewing the cart evaluation logic to exclude those Community Hub carts created by staff, as opposed to constituents.

For example: this could be accomplished using helper formula checkbox fields on the Cart object that return TRUE or FALSE based on the Created By user's profile name. Reference any custom field as needed in either the process builder or the flow to narrow the automation's focus.

On This Page

In This Section