Skip to main content

Using Custom Event Variables for Personalisation

Learn how to use custom fields from your Custom Event webhook to personalise automation emails - map payload variables (such as points, tier status, and milestone data) and use them inside your email content to deliver dynamic, loyalty-driven messaging.

S
Written by Sam
Updated over a month ago

In Part 1, we set up a Custom Event that triggers when a customer reaches a Spend milestone

In this section, we’ll show you how to:

  • Capture additional data from the event

  • Store that data as custom fields

  • Use those fields to personalise your reward email

We’ll continue using a slightly broader loyalty example for e.g - A customer reaching a total spend point of xxx and upgrading to the next loyaly trigger

Why Use Custom Fields?

Custom fields allow you to capture extra information sent through your webhook event and use it inside your automation emails.

This means your emails can say things like:

  • “Congratulations on reaching Gold tier!”

  • “You’re only 550 points away from Platinum.”

  • “You now have 2450 points available.”

Instead of sending a generic message, you can send a highly personalised one based on real-time customer data.

Step 1: Send Additional Data in the Event Payload

When your platform detects a loyalty milestone (for example, a tier upgrade), it can send more than just the email address.

Example payload:

{
"email": "[email protected]",
"total_points": 2450,
"points_to_next_tier": 550,
"last_tier": "Silver",
"new_tier": "Gold"
}

When you paste a sample payload during the Custom Event setup, each key appears as a Payload variable.

You must now decide how each one should be stored in SmartrMail.

When a sample payload is detected, each key in the payload appears on the left as a Payload variable. For each one, you can choose how it should be stored in SmartrMail as per the screenshot below,

1. Map the subscriber identifier (Required Step)

  • Map the email payload variable to the Email automation variable.

  • This field is marked as required by default, as it is used to identify and match the subscriber in SmartrMail.

2. Map numeric values

  • Any payload fields that contain numbers (for example, points, counts, or totals) should be mapped to a Number automation variable.

  • You can map these to an existing number-based custom field or create a new one.

  • Mark the field as Required only if the automation should not run without this value.

3. Map text values

  • Payload fields that contain text (such as names, statuses, or tiers) should be mapped to a Text automation variable.

  • As with numeric fields, you can choose an existing field or create a new one as part of this step.

**If a required field is missing, the event will not be processed, helping ensure data consistency and reliable automation behaviour.

Once all payload variables are mapped, save the trigger to complete the setup. The mapped automation variables will then be available for use in the email body of any automation triggered by this custom event.

Step 2: Using the custom event fields in Email for Personalisation

The option to add the personalised fields is available under the ‘Add Personalised Field’ setting during the email compose option

You can select all the available fields from the ‘Custom Trigger’ option

The final version of the email will be as follows,

Summary

Using custom fields with Custom Events allows you to:

  • Capture real-time loyalty data

  • Store milestone information

  • Personalise automation emails dynamically

  • Keep your workflows simple while increasing relevance

All powered by a single, flexible Custom Event trigger.

Did this answer your question?