Marketing Cloud: External Editors

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.

codesandbox.io

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:

  1. Code is written in the editor and saved.
  2. By reloading the cloud page the result is visible.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s