1

I have a series of AMPScript variables and statements, that are resolving perfectly fine in the send preview.

Once the test is sent out, some of these variables do not resolve and some of them do.

Is anyone aware of a situation in which only some variables would render pre-send, but fail upon send?

Spcifically, the hero image (@heroImgPath), hero link (@heroImgLink), and extra T&Cs (@ExtraTandCs) are not rendering.

Edited to add AMPScript: Edit 2 - reduced AMPScript to just one relevant example


/* Hero image variables */
/* Cars */
VAR @heroImgAdam

/* Other variables */
VAR @HeroImgPath, @HeroImgLink, @HeroImgAlt, @IntroHeadingCopy, @ExtraTandCs, @TandCsCopy1, @TandCsCopy2, @TandCsCopy3

/* Set variable values */
SET @heroImgAdam         = 'http://image.contactvauxhall.co.uk/lib/fe3b15707564077d761178/m/1/9fcbccf1-cf6e-49d4-a155-d77d2b184104.jpg'

SET @HeroImgLinkAdam       = 'https://www.vauxhall-accessories.com/vauxhall-adam-accessories'

SET @HeroImgAlt = 'Accessorise all areas'

SET @IntroHeadingCopy = 'Accessorise all areas'

SET @TandCsCopy1  = 'Please include your registration number and a contact number in your email to help us handle your enquiry efficiently.'
SET @TandCsCopy2  = '<strong>*Service Club Exclusions Terms and Conditions</strong>'
SET @TandCsCopy3  = 'Service Club servicing &amp; repairs discounts; 15% for vehicles 2-3 years, 25% for vehicles 3 years plus. 15% off Genuine and Vauxhall approved Accessories and Parts only – excluding fitting. Online purchases subject to Partsworld Limited T/A Vauxhall Accessories general Terms and Conditions. Half-price MOT test (UK mainland only – excluding Northern Ireland). Free pre-MOT test inspection for customers in Northern Ireland only. Fixed price AdBlue refills; £14.99 for Cars and £24.99 for Vans. Members are entitled to discount on labour and only genuine Vauxhall parts. Parts only purchases excluded. Go to https://www.vauxhall.co.uk/owners/maintenance-and-repair/service-exclusions.html to see full Vauxhall Service Club exclusions. Not valid in conjunction with any other offer. Offers apply to genuine Vauxhall service, MOT and repair work on your UK registered Vauxhall at participating Retailers only. Vauxhall Motors Ltd reserves the right to modify the terms of this promotion at Vauxhall’s discretion at any time.'

/* Set variables for hero image and link */
IF [Creative Model] == 'ADAM' THEN
 SET @HeroImgPath = @heroImgAdam
 SET @HeroImgLink = @HeroImgLinkAdam
ELSE
 SET @HeroImgPath = @heroImgVauxhall
 SET @HeroImgLink = @heroImgLinkVauxhall
ENDIF

/* If there are extra T&Cs, add extra paragraphs to contain them. */
IF NOT EMPTY(@TandCsCopy1) THEN
 SET @ExtraTandCs = Concat('<p style="margin:0px 0px 22px 0px; font-family: Arial, Helvetica, sans-serif, ', Char(39), 'vauxhall-regular', Char(39), '; font-size:12px; line-height:15px; color:#1D1D1B; text-align:left;">',@TandCsCopy1,'</p>')
ENDIF

IF NOT EMPTY(@TandCsCopy2) THEN
 SET @ExtraTandCs = Concat(@ExtraTandCs,'<p style="margin:0px 0px 22px 0px; font-family: Arial, Helvetica, sans-serif, ', Char(39), 'vauxhall-regular', Char(39), '; font-size:12px; line-height:15px; color:#1D1D1B; text-align:left;">',@TandCsCopy2,'</p>')
ENDIF

IF NOT EMPTY(@TandCsCopy3) THEN
 SET @ExtraTandCs = Concat(@ExtraTandCs,'<p style="margin:0px 0px 22px 0px; font-family: Arial, Helvetica, sans-serif, ', Char(39), 'vauxhall-regular', Char(39), '; font-size:12px; line-height:15px; color:#1D1D1B; text-align:left;">',@TandCsCopy3,'</p>')
ENDIF

]%%````


8
  • Are you sending to the same contact that you used for the preview send? Nov 6, 2019 at 10:43
  • Hi Rachid. No. I am sending a test to myself, but with the record selected from the DE to spoof the data. Other elements of this are resolving, such as the name, and model of car they drive.
    – mr_reamer
    Nov 6, 2019 at 10:48
  • Which option are you selecting from "Content Personalization Options"? Nov 6, 2019 at 10:56
  • The top radio button. I haven't looked at this before, but I tried selecting the second radio btn and received a warning that SFMC was going to send 700+ emails to my test address... The third radio btn is greyed out!
    – mr_reamer
    Nov 6, 2019 at 11:05
  • Read the second option's help: "All rendering options of the email, based on the list or data extension selected from Subscriber Preview, are sent to each recipient. This could result in recipients receiving multiple versions of the same email." Basically, if you are sending to an individual, choose the first option and choose someone from the DE that has all variables rendred correctly. Nov 6, 2019 at 12:27

1 Answer 1

0

Sometimes Test Sends just fail to render some AMPscript from time to time. Try creating a DE with just your subscriber information and dummy data and send to this DE as a real send.

Before you do the above, also try wrapping your TandCs SET variables TandCsCopy3 in double quote marks. This is because some of the contents of the copy contain single quotation marks (eg: 's)

SET TandCsCopy3 = "Service Club servicing &amp; repairs discounts; 15% for vehicles 2-3 years, 25% for vehicles 3 years plus. 15% off Genuine and Vauxhall approved Accessories and Parts only – excluding fitting. Online purchases subject to Partsworld Limited T/A Vauxhall Accessories general Terms and Conditions. Half-price MOT test (UK mainland only – excluding Northern Ireland). Free pre-MOT test inspection for customers in Northern Ireland only. Fixed price AdBlue refills; £14.99 for Cars and £24.99 for Vans. Members are entitled to discount on labour and only genuine Vauxhall parts. Parts only purchases excluded. Go to https://www.vauxhall.co.uk/owners/maintenance-and-repair/service-exclusions.html to see full Vauxhall Service Club exclusions. Not valid in conjunction with any other offer. Offers apply to genuine Vauxhall service, MOT and repair work on your UK registered Vauxhall at participating Retailers only. Vauxhall Motors Ltd reserves the right to modify the terms of this promotion at Vauxhall’s discretion at any time."

For the issue related to "HeroImgLink" not working; ensure you are using "RedirectTo" ampscript function within your HTML.

<a href="%%=RedirectTo(@HeroImgLink)=%%">
2
  • Thanks, but it's not from time to time, it's completely consistent.
    – mr_reamer
    Nov 11, 2019 at 11:09
  • Hit return too early :) Your suggestion re. the quotes pointed me in the right direction. I replaced the apostrophe with the HTML character &rsquo; and everything is working. Thank you VERY much!!
    – mr_reamer
    Nov 11, 2019 at 11:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.