Re: Velocity token to identify Campaign Run Id during email build

Thomas_Terry1
Level 2

Velocity token to identify Campaign Run Id during email build

Just a crazy question, likely only answerable by Sanford Whiteman

Is it possible to use velocity script to identify the Campaign Run Id during the email build process?

Or is this totally impossible?

FYI - I'm not referring to building an email via the UI editor. Instead, it is the automated process that occurs after the campaign is initiated.

12 REPLIES 12
SanfordWhiteman
Level 10 - Community Moderator

Re: Velocity token to identify Campaign Run Id during email build

To be precise, do you want to include the Campaign Run ID somewhere else in the email, like on a link?

Thomas_Terry1
Level 2

Re: Velocity token to identify Campaign Run Id during email build

Yes, exactly. We want to use a concatenation of Asset Id, Campaign Id and Run Id to uniquely identify a send. We would append the Campaign Run Id as a URL parameter.

SanfordWhiteman
Level 10 - Community Moderator

Re: Velocity token to identify Campaign Run Id during email build

Thomas, sent the solution via email (since I have your address) for now -- will add officially to the blog and link there tomorrow.

Thomas_Terry1
Level 2

Re: Velocity token to identify Campaign Run Id during email build

Hi Sandy, you are awesome. I look forward to seeing your blog post on the topic.

Vimal_Ghosh
Level 1

Re: Velocity token to identify Campaign Run Id during email build

Can you please provide the solution. I have a similar scenario

SanfordWhiteman
Level 10 - Community Moderator

Re: Velocity token to identify Campaign Run Id during email build

Vimal_Ghosh
Level 1

Re: Velocity token to identify Campaign Run Id during email build

Thanks. Is there a way to get the CampaignRunId as part of the Webhook. I wanted to send that id to an external system when the email is triggered. Also, is there a way to get a custom attribute included within an email when the open event is triggered

SanfordWhiteman
Level 10 - Community Moderator

Re: Velocity token to identify Campaign Run Id during email build

You can't use Velocity in webhooks (well, not unless you do some very crazy things that aren't suitable for a Community post).

You can't change the default open logging but you could include your own custom open-tracking pixel if you insisted on it.

I have to wonder why such a setup is necessary. What are you trying to do, really? Note Mark's comment about the Campaign Run ID.

Vimal_Ghosh
Level 1

Re: Velocity token to identify Campaign Run Id during email build

We have campaigns created within Marketo which uses different email templates. Emails contains placeholders, which will be replaced by actual values from a lead record using tokens. The trigger here is a change in the values for specific fields in lead record. The values are changed by an external system using Marketo APIs. So this campaign can be executed multiple times and leads can receive emails multiple times. We have a unique identifier from the external system which trigger these changes. I can include this in our Lead record as well. However, wanted to get that data once the user opens the mail. Essentially trying to understand whether the trigger initiated by the external system is effective or not and there are back office operations after that. So, I am hoping to tie the campaign , a particular run, the lead and the unique identifier which triggered the decision. Any inputs here is highly appreciated