Read Proof Email Address using Javascript (urgent, Verizon) | Community
Skip to main content
alexiosb2287557
Level 2
June 18, 2019
Solved

Read Proof Email Address using Javascript (urgent, Verizon)

  • June 18, 2019
  • 3 replies
  • 1782 views

Hi, we need your help.

We are trying to proof send our campaign.

We have different SL versions of the content depending on the targetData.segmentCode.

1) Our current method of proofing:

We read the proof email address (using Javascript on the subject line) and depending on how the email address is structured we force the different SL versions.

This allows us to force different SL versions during proofing using the email address format.

This works fine on our sandbox account because we can read the proof email address with JavaScript using this variable: recipient.email

The problem is on our client's account (Verizon) this variable does not output the proof email address during proof sending.

They seem to import their proof addresses using this method

On the Verizon case we have not found a way to output the proof email yet using JavaScript. What is the way to do it for the import method Verizon is using above?

2) Maybe a better way to proof would be using the segmentCode to force the different versions.

Is there a way to use the segmentCode during proof sending to force different versions (especially given that proof email addresses are not assigned a segment code during proof sending?)

If you may, could you give us an answer for both 1 and 2.

thanks so much,

alex

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by alexiosb2287557

We found a variable that displays the email address in all cases when proofing

thus we replaced

recipient.email

with

message.address

I agree that I should remove the client name, at the same time, i see no option to edit my post, if anyone knows how to do it please go ahead and clean it from my post.

3 replies

Jonathon_wodnicki
Community Advisor
Community Advisor
June 18, 2019

Hi,

The name of your client doesn't add useful information, please redact.

Have you tried using recipient id with modulus? E.g.:

<%=

     recipient.id % 4 === 0 ? 'sl 1' :

     recipient.id % 4 === 1 ? 'sl 2' :

     recipient.id % 4 === 2 ? 'sl 3' :

     'sl 4'

%>

Thanks,

-Jon

alexiosb2287557
alexiosb2287557AuthorAccepted solution
Level 2
June 20, 2019

We found a variable that displays the email address in all cases when proofing

thus we replaced

recipient.email

with

message.address

I agree that I should remove the client name, at the same time, i see no option to edit my post, if anyone knows how to do it please go ahead and clean it from my post.

alexiosb2287557
Level 2
June 20, 2019

@Jon that is an option correct, at the same time, our issue here is how to force each version of content during proofing, not so much how to randomly serve variants, we have this part covered.