Skip to main content

Triggering an Automation Using Custom Events (Beginner Guide)

This guide walks through how to trigger an email automation using Custom Events, using a simple, real‑world example

S
Written by Sam
Updated over a month ago
"When a customer reaches $XXX in lifetime spend, send them a reward email with a coupon code."

What is a Custom Event?

A Custom Event lets you trigger an email automation based on some event that happens outside of standard website activity.

Examples include:

  • Customer reaches a specific lifetime spend

  • Customer signs up offline (POS, in‑store, event, CRM)

  • Loyalty tier is upgraded or any other loyalty milestones

  • Subscription reaches a milestone

In this article, we’ll focus on lifetime spend as our example.

Step 1: Decide What Event You Want to Trigger

Start with the business outcome not the technical setup.

Our goal:

When a customer’s lifetime spend reaches $XXX, automatically send them a reward email with a coupon.

To make this possible, your ecommerce platform (for example, Shopify or another system that tracks orders) needs to tell SmartrMail when this condition is met.

Step 2: Create the Automation in SmartrMail

  1. Go to Automations

  2. Click 'New Automation Flow'

  3. Choose 'Create from Scratch'
    ​`


  4. Configure the Custom Trigger - In the Automations Select 'Create new Trigger' >> 'Configure your trigger'



  5. Define the Event Data (In Simple Terms)

    For SmartrMail to know who the automation applies to, every Custom Event must include email as the identifier.

    Here’s a simple example of the information SmartrMail expects to receive when the event fires:

    { 
    "email": "[email protected]"
    "total-spend" : "5000"
    "coupon-code" : "reward5k"
    "valid-date" : "31/12/2026"
    }​


  6. Map the fields
    Now map the above fields to the fields from the above event with Smartrmail fields - so that Smartrmail knows where to put the data and whom to send the email or SMS

Step 3: Add the Action - Once the fields are mapped, add the required action to the automation - in our case, sending the Terms & Conditions email

Add an Email action

  1. Choose or create your reward email

  2. Include:

    1. A thank‑you message

    2. The coupon code

    3. Any VIP or loyalty messaging

    4. This email will now send automatically whenever the Custom Event is triggered.

Step 4: Test the Automation - Finally, test the webhook to confirm the automation triggers correctly and the email is sent as expected.

Triggering the automation

From your application or platform, you simply need to fire the webhook URL with the relevant parameters to ensure that custom fields are populated in the email.

Summary

Custom Events allow you to trigger automations based on meaningful customer milestones, not just clicks or page views.

In this example, we:

  • Defined a clear goal (reward high‑value customers)

  • Used a Custom Event as the trigger

  • Sent an automated reward email when the condition was met

Once you’re comfortable with this setup, you can expand Custom Events to cover loyalty programs, offline activity, and advanced lifecycle marketing.

Did this answer your question?