Expand my Community achievements bar.

SOLVED

Java script Support in ACS

Avatar

Level 2

Hi Experts,

 

Just need to understand what level of Java script we can use in the content blocks in ACS.

 

const RSS_URL = '<<URL>>';
fetch(RSS_URL)
  .then(response => response.text())
  .then(str => new window.DOMParser().parseFromString(str, "text/xml"))
  .then(data => {
    console.log(data);
    });

 

 

Can i use above code in content block where i can call the rest API, use the values and render in email?

Or any other way to call rest API in ACS which returns XML RSS feed, which i can use and generate html.

 

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

You can't use API to fetch external content in ACS.

You could use External API to call a service but that has to return JSON content

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

You can't use API to fetch external content in ACS.

You could use External API to call a service but that has to return JSON content