Overview
An event that starts a custom trigger automation can carry more than an email address. Points, a tier name, a coupon code or a link can all come with it, and you can show those values in the automation’s emails.
This article follows on from Triggering an automation using custom events. It uses a loyalty example: a customer moves up to the next tier.
With the event’s fields in your email, it can say things like:
“Congratulations on reaching Gold tier.”
“You now have 2450 points to spend.”
“You’re only 550 points away from Platinum.”
Step 1: Send the extra details in the event
When your platform sees the milestone, have it send the details you want to use alongside the email address. For example:
{
"email": "[email protected]",
"total_points": 2450,
"points_to_next_tier": 550,
"last_tier": "Silver",
"new_tier": "Gold"
}When you set up the custom trigger, use an event like this as your sample. Each key then shows up in the next step.
Step 2: Map each field
In step 3 of the Create custom trigger window lists each key from the event under Field in the event. For each one, pick an Automation variable:
Email: map the email field here. It’s always required, because SmartrMail uses it to find the profile.
New number value: for numbers, such as points or totals.
New text value: for words, such as a tier name or status.
New date value and New Link/URL value: for dates and links.
Product Ids, or the product ID in your store platform’s API: for products to show in the email.
Skip: for fields you don’t need.
Tick Required next to any field your emails can’t do without. An event that arrives without a required field is dropped and doesn’t start the automation.
Click Save trigger. The mapped fields are now ready to use in every email of this automation.
Good to know: event values
From the event, not the profile: each email shows the values from the event that started it. They aren’t saved on the person’s profile.
Change the mapping later: click the trigger, then Edit custom trigger.
Step 3: Use the fields in your email
Open the email in the automation and click Edit email.
Click into a text block where the value should go. In the text toolbar, click the Personalize button.
In the Personalize window, open Attribute. Your event fields are in the Custom Trigger group, listed as Custom Event value: and the field name.
Optional: enter Fallback text. It shows when the event has no value for that field.
Click Insert. Repeat for each field you want to show.
Here is the loyalty email with the event’s values in place:
Links and products from the event
Links: when the event has a field mapped as a link, a button’s settings show a Custom trigger link switch. Turn it on and pick the value under URL variable to send each person to their own link.
Products: when the event has product IDs mapped, add the Custom trigger products block from the Blocks tab, under Store, to show those products.
FAQs
Click a question to open it.
I don’t see the Custom Trigger group in the Attribute list.
I don’t see the Custom Trigger group in the Attribute list.
The group only appears in emails of an automation that starts with a custom trigger, after its fields are mapped and the trigger is saved.
What shows if an event leaves a field out?
What shows if an event leaves a field out?
The field’s Fallback text, if you set one. Otherwise that spot is left blank.
Can I use event fields in other automations?
Can I use event fields in other automations?
No. Event fields belong to the automation whose trigger received the event.
Need a hand with custom event fields?
Our team is happy to help. Book a 1:1 call with the SmartrMail team and we’ll set it up with you.
