SOLVED

Re: Pulling in a subject line for a "mailto:" snippet

Go to solution
Yonder_Buslon
Level 2

Pulling in a subject line for a "mailto:" snippet

Hi everyone,

I've created a snippet that has a "Mail Us" CTA which is just a simple "mailto:xxx@company.com." I want to add a "?subject=RE: (subject line)" to it and populate the subject line of the email the snippet is embedded in.

Is there a simple way to grab the subject line of the email and add it in the "mailto:" line of code? I want to avoid making a "my token" for the SL since there this will cause a headache of multiple custom subject line tokens when multiple emails lie within the same folder or program. (for example {{my.SubjectLine}}="Welcome to the Program" would work for one email but not other emails within the folder)

Is there a simple velocity script that can grab the subject line of the email it is embedded in? If anyone has an idea, that would be great.

Thanks!

-yonder

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Pulling in a subject line for a "mailto:" snippet

Hi Yonder,

I can totally see your point in the need for this, but can't think of a solution that can solve this, unfortunately. Couldn't find any functionality in the Velocity documentation.

If you using a smart campaign to send it out, you could add a temporary field that is filled out the subject line's content in the flow, and use that field as a token as the subject line in the mailto-link.

E.g.:

  1. Create field named "Temp. subject line" as a string.
  2. Add {{lead.Temp subject line"}} as a token to the mailto-link: <a href="mailto:test@example.com?subject={{lead.Temp subject line}}">Reply here</a>
  3. Setup the smart campaign flow like this:
    1. Change data value of the field "Temp. subject line" to the subject line, you want to add to the mailto link
    2. Send out email "XYZ"

The only pitfall is that Marketo does not take the changed "Temp. subject line" field value into account if it's in the same flow. I don't think it will be a problem, but I haven't tested it. If it is a problem, try with a short wait step. If that doesn't work, you should create a campaign that can be requested, that sends out the email, and let the first smart campaign, that changes the temp. subject line field request the second campaign. That would definitely fix it.

If you're not using a smart campaign to send out the email, but instead are using the email program or engagement programs, the only way to go about what you want, would be tokens, as you suggest.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Re: Pulling in a subject line for a "mailto:" snippet

Hi Yonder,

I can totally see your point in the need for this, but can't think of a solution that can solve this, unfortunately. Couldn't find any functionality in the Velocity documentation.

If you using a smart campaign to send it out, you could add a temporary field that is filled out the subject line's content in the flow, and use that field as a token as the subject line in the mailto-link.

E.g.:

  1. Create field named "Temp. subject line" as a string.
  2. Add {{lead.Temp subject line"}} as a token to the mailto-link: <a href="mailto:test@example.com?subject={{lead.Temp subject line}}">Reply here</a>
  3. Setup the smart campaign flow like this:
    1. Change data value of the field "Temp. subject line" to the subject line, you want to add to the mailto link
    2. Send out email "XYZ"

The only pitfall is that Marketo does not take the changed "Temp. subject line" field value into account if it's in the same flow. I don't think it will be a problem, but I haven't tested it. If it is a problem, try with a short wait step. If that doesn't work, you should create a campaign that can be requested, that sends out the email, and let the first smart campaign, that changes the temp. subject line field request the second campaign. That would definitely fix it.

If you're not using a smart campaign to send out the email, but instead are using the email program or engagement programs, the only way to go about what you want, would be tokens, as you suggest.

SanfordWhiteman
Level 10 - Community Moderator

Re: Pulling in a subject line for a "mailto:" snippet

The only pitfall is that Marketo does not take the changed "Temp. subject line" field value into account if it's in the same flow. I don't think it will be a problem, but I haven't tested it.

It definitely would be a problem as the data value is changed asynchronously.

Rather than using Request Campaign (which I try to avoid in general) or the guesswork of wait steps (which are still not absolutely guaranteed to work) I would trigger the send off the Data Value Changes event so it is guaranteed to be complete.

But I think doing all this stuff at send time is not a good idea.  I would bite the bullet and use a token.