Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

Including jssp in your email delivery

Avatar

Community Advisor

Hi all experts,

 

I need a suggestion from the great minds out here.

I am trying to implement a way by which I can format content rendered from a third party source into my email delivery.

For example, I use the following code

<%@ include file="anyThirdPartyUrl" %> in my email delivery, which renders some content.

 

But I want to format the content before it is displayed in the customer's inbox.

What I tried was to call this "anyThirdPartyUrl" in a Jssp, format it the way I want and then call the Jssp URL in the email delivery like this

<%@ include file="jsspInMyMktInstance" %>

 

But this resulted in an error (failed to call/load directive). Not sure if this is at all possible, and I need some advice for the same.

 

Some more info: The third party URL returns a JSON, which I need to format and display in an HTML block (as images, text and links), for which I tried to use a Jssp in the middle. Not all email clients/users have javascript enabled, that is why all formatting logic cannot be applied directly in the email delivery itself (tell me if this assumption is not correct).

 

BR,

Ishan

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

 

I don't believe any email clients have ever allowed js due to the attack surface that would create.

To process the third party content, you can fetch it in the workflow with HTTPClientRequest, assign it to the delivery's variables, then add <% JSON.parse(variables.content) %> or <% eval(sanitizeThirdPartyCodeBeforeRunning(variables.content)) %> in the content.

 

Thanks,

-Jon

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi,

 

I don't believe any email clients have ever allowed js due to the attack surface that would create.

To process the third party content, you can fetch it in the workflow with HTTPClientRequest, assign it to the delivery's variables, then add <% JSON.parse(variables.content) %> or <% eval(sanitizeThirdPartyCodeBeforeRunning(variables.content)) %> in the content.

 

Thanks,

-Jon