Fetch Campaign Data with Handlebars

Displaying Campaign ID

To display the campaign ID of the current campaign in a message, we can use the following handlebar:

{{campaignId}}

Similarly, the name of a Campaign can also be displayed:

{{campaignName}}

Displaying Message ID

You can also display a message ID for each message, for example, in the footer. There are two Ids connected to a message: 

Example:

messageId = 439637

messageDispatchId = 245a7cd0-bf0f-11f0-9d76-4dbc5a1220e5

 

Handlebars:

{{messageId}}
{{messageDispatchId}}

 

Both of these ids are connected to the mail.send-event, but unfortunately they are named differently in different places

Example:

  • Story Message Node: {{messageId}} = Message ID
    11b8a1d7-db6f-4009-b403-3acfb4d8cdaa.png

 

  • User Event History:
    {{messageId}} = channelConfigId (mail.send event)
    {{messageDispatchId}} = messageId (mail.send event)

e7042688-daf0-46ea-b53a-7ff75ea2b411.png