Personalisation
Email personalisation allows you to dynamically insert custom values into your email content — making each message more relevant and engaging for the recipient.
MX18 supports two levels of personalisation:
- Recipient-Level Personalisation
- Global Personalisation
What is personalisation?
Personalisation is the use of placeholder variables (like {{first_name}}
) inside your email templates or content blocks that are replaced at send-time with real user-specific values.
Recipient-level personalisation
Recipient-level personalisation lets you define dynamic values for each individual recipient inside the to
array. These values override global values if the same tag exists in both places.
How to use it
In your payload, define a personalizationData
object for each recipient:
"to": [
{
"name": "Jane Doe",
"email": "jane@example.com",
"personalizationData": {
"first_name": "Jane",
"discount_code": "SAVE50"
}
}
]
Use these tags in your template or message content like:
<p>Hello {{first_name}}, use code {{discount_code}} to save big today!</p>
Global personalisation
Global personalisation acts as a fallback when a specific recipient does not have a value defined. It's set at the root level of the API request under globalPersonalizationData
Example
"globalPersonalizationData": {
"first_name": "Customer",
"discount_code": "WELCOME10"
}
-
If a recipient has no personalizationData, the global values are used.
-
If both global and recipient-level values are present for the same tag, the recipient-level value takes precedence.
Combined example
{
"to": [
{
"email": "john@example.com",
"personalizationData": {
"first_name": "John"
}
}
],
"globalPersonalizationData": {
"first_name": "Customer",
"discount_code": "GLOBALCODE"
},
"message": {
"subject": "Hi {{first_name}}, your offer is here!",
"content": [
{
"type": "text/html",
"value": "<p>Hey {{first_name}}, use code {{discount_code}} now!</p>"
}
]
}
}
John will receive: “Hey John, use code GLOBALCODE now!” — because first_name was defined at recipient level, but discount_code fell back to global.
Need help?
-
Make sure your placeholders match your keys (e.g., {{first_name}})
-
Avoid using undefined tags — your email may send blank values
-
Contact support@mx18.com if you need help setting up your templates