1

I am constantly checking my AMPscript code using the subscriber preview in Contact Builder. Any way to make my life a bit easier? I'm already using Sublime Text + syntax highlighter.

3 Answers 3

3

The best way I have found for this is to have a third party server that hosts the AMPScript file you are working on. From there you put a HTTPGET inside of a Cloud Page that is aimed at that file's URL.

This way you can work on the file on your server via Sublime or whatever editor you choose, save it then refresh the Cloudpage to 'Live Preview' your edits without needing to go back into the SFMC UI.

Now this does come with drawbacks as it requires a Cloudpage view ($$$) every time you refresh and it requires you to have access to a third party hosting server to save your file ($$$), but it can be a life saver and much more efficient workflow if used responsibly.

2

There's no live editor. You have to compile the AMPscript -- just as the OMM does in the platform. To reduce the time between iterations, I like to use drive-letter access on a web server and edit locally. (You can do it with Dropbox if you know a few URL tricks.)

I use the HTTPGET() AMPscript function to pull in the content from the web server like this:

%%=TreatAsContent(HttpGet(Concat("http://example.com/your-page-or-email.html?x=",GUID())))=%%

Then when everything is functional, then I copy the code from the web server back into the Cloud Pages and publish it.

This method also works for email development.

As part of writing The AMPscript Guide, I reworked the AMPscript Highlighter package for Sublime Text 3. You can download it through Package Manager: AMPscript Syntax Highlighter

0

Uhm, unfortunately no.

The only thing i do is: Having a dataextension with all columns with all possible values and use a for loop inside a cloudpage to lookup "subscriber data" and evaluate all ampscript i write with it.

But some stuff cannot be tested there like personalization strings like emailaddr or _messagecontext ofc.

I believe there is no great way. Often i do it exactly like you (sublime text3 with ampscript highlighting and then copy it to a newsletter).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .