"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
Go to Automations
Click 'New Automation Flow'
Choose 'Create from Scratch'
`
Configure the Custom Trigger - In the Automations Select 'Create new Trigger' >> 'Configure your trigger'
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"
}
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
Choose or create your reward email
Include:
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.







