Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Including jssp in your email delivery

Avatar

Avatar
Boost 5
Level 2
isahore
Level 2

Likes

8 likes

Total Posts

36 posts

Correct Reply

11 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 5
Affirm 3
View profile

Avatar
Boost 5
Level 2
isahore
Level 2

Likes

8 likes

Total Posts

36 posts

Correct Reply

11 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 5
Affirm 3
View profile
isahore
Level 2

20-06-2020

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Contributor
MVP
wodnicki
MVP

Likes

938 likes

Total Posts

1,061 posts

Correct Reply

495 solutions
Top badges earned
Contributor
Shape 1
Give Back 100
Give Back 50
Give Back 25
View profile

Avatar
Contributor
MVP
wodnicki
MVP

Likes

938 likes

Total Posts

1,061 posts

Correct Reply

495 solutions
Top badges earned
Contributor
Shape 1
Give Back 100
Give Back 50
Give Back 25
View profile
wodnicki
MVP

23-06-2020

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

Answers (0)