Salesforce Marketing Cloud is a fantastic tool for Marketing Automation. I had the chance to participate in small and large scale Marketing Cloud implementation. As a result of that I developed several best practices such as the use of external editors.
External Editors such as c9.io or codesandbox.io have been essential for me for two reasons: (1) Version Control, (2) faster round-trip time.
Setup – External Editor
In the first step an external editor must be chosen. I recommend c9.io or codesandbox.io. In both cases the editor is able to serve content via HTTP.
The Editor is used to write Server Side Javascript or AMPscript.

In the example above you can see a quick “hello world” AMPscript.
Cloud Page to Execute the Code
To execute the code in Marketing Cloud a simple Cloud Page must be created. The Cloud page is able to load content from an external server and execute the Javascript and AMPScript that is visible on the page.

%%= TreatAsContent(HTTPGET("http://www.myserver")) =%%
Now only the cloud page must be loaded and the result is visible.
Development Lifecycle
The resulting development lifecycle is easy and fast:
- Code is written in the editor and saved.
- By reloading the cloud page the result is visible.