• Kwasi Asiedu 3
  • 10 Points
  • Member since 2019

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
  • 0

I have been able to make a request using the REST API to get access to assets in Contant Builder. I have followed this documentation on "Advanced Query" (https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/assetAdvancedQuery.htm) for "Assets". I am able to get a full response back when requesting a specific "template-based email". 

I am using the following requests to retrieve the template-based email:
var emailRequest = HTTP.Post(url, contentType, payload, headername, headervalue);
         var emailResult = Platform.Response.Write("Email request: " + emailRequest.Response);
         return emailResult;

I get a similer response to the following but directly related to the template based email:

Sample response  The issue is I am trying to narrow down the response and be able to pick out specific sections of the response. Is there a way to return the "items" portion of the response?

I have tried a number of variations adjusting the "emailRequest.Response" portion of my code but I only get "undefined" in the response.


I have in place a custom preference / profile center built using a CloudPage. At the moment I am adding the link to the preference center using a AMPScript in the email template. This is what the AMPScript looks like and is entered into the 'href' attribute of the 'a' tag:

The main functionality I would like to achieve is to be able to provide link to an individual's preference cente via a link on a website. I already have in place a API connection to Marketing Cloud. I am be able to provide the respective subscriber key via the API.

My question is there a way to generate the full URL based on the AMPScript CloudPageURL somehow in Marketing Cloud without the need to send an email?