Skip to main content
All CollectionsTriggers
Personalize a triggered email subject line
Personalize a triggered email subject line

Include, for example, the recipient's first name or the name of one of the products they were looking at.

Updated over 4 months ago

To personalize a triggered email subject line:

  1. Expand the User menu and go to Settings > Triggers and Messaging integrations.

  2. Select Messaging Provider(s).

  3. Select FIELD MAPPINGS to the right of the ESP channel used by the trigger you want to modify.

  4. On the ESP Field Mapping page, expand the Field Name drop-down menu and select (Custom - add your own).

  5. For Custom Fieldname, enter a name for the new field.

  6. For ESP Fieldname, enter the name of the ESP field to upload this data to, for example triggered_subject, and select ADD.

  7. Select Click to Edit in the new field mapping entry that has appeared and edit the details to:

    • First Name: {% if person.fn %}{{ person.fn }}, don't{% else %}Don't{% endif %} miss out on these amazing products!

    • Product Name: {{ tms_product_name }} is waiting for you!
      You can amend the above subject line text to suit your needs. Contact Support with your requirements.

  8. Create the triggered_subject field in your ESP so it can be used when a triggered email is sent. This process varies depending on the ESP you use. Check the support documentation for your ESP for more details. Learn how to create a custom field in Dotdigital in Create, delete, and edit custom data fields.

Some transactional ESPs don't require the field to be created first. These include:

  • Mandrill

  • Sendgrid

  • SilverPop Transact

If you're not sure whether you need to create the triggered_subject field in your ESP or how to do it, contact support for the ESP you are using and they can advise.

Finally, you need to include the triggered_subject field in the subject line of your email template.

To do this, edit the template in your ESP and add the below code into the subject line field:

ESP

Merge Code

Dotdigital

@triggered_subject@

Adestra

$AMF_FIELD_triggered_subject$

Campaign Monitor

[triggered_subject]

Cheetah Digital

{( meta:triggered_subject )}

Communicator

[[ Contact Table.triggered_subject?? ]] (replace Contact Table with the name of the contact table used for triggered emails).

Emarsys

%%triggered_subject%%

Mandrill

*|triggered_subject|*

Mapp DMC

<%user.CustomAttribute.triggered_subject %>

Maxemail by Emailcenter

[recipient:TMSProfile.triggered_subject]

Pure360

{~triggered_subject~}

SalesForce Marketing Cloud

%%[triggered_subject]%%

Sendgrid

%%triggered_subject%%

Silverpop Transact

-triggered_subject-

Yesmail

Add the below code to the message template heading:

var subjectline = user.attr('triggered_subject');

document.subject(subjectline);

If you’re not sure how to update the subject line field of your template to include the triggered_subject field, contact support for the ESP you are using and they can advise.

Learn how to edit a triggered email in Dotdigital in Create a triggered email campaign.

Did this answer your question?