I'm trying to build a microsite page with dynamic content based on information I have in a DE. Users will see different elements of the page depending on the amount of fields the user has in the DE; is this possible within Marketing Cloud? Can I set my ampscript variables based on the rows in a DE?

I know it's possible within an email but I can't get the functionality to work with a microsite, is there a way to retrieve data from a DE In a similar way to retrieving data from a salesforce object?

2 Answers 2


You can utilize personalization strings and AMPScript inside of a Cloudpage no problem. The hardest part is passing the values along.

SFMC has included an AMPScript function to assist called CloudPagesURL() which will pass all the personalization strings and attributes attached to the subscriber into the Cloud Page. This would be used in the email like so <a href="%%=RedirectTo(CloudPagesURL('1245'))=%%" >link</a>.

This will allow you to use your personalizaton strings like %%emailaddr%% as well as any attributes or data extension columns same as you could in an email.

You can also manually pass variables inside of an URL parameter by adding a query string to the end of the url, like so http://www.link.com?myvar=myval where ?myvar=myval is the string, placing a parameter of myvar to the value of myval. This can then be retrieved on the page using the RequestParameter() Ampscript function.

Finally you can also use Lookups and Retrieves on SF objects via AMPScript to pull values as well, same as you can inside of an email.

  • Almost 10k;) ....
    – 0xsegfault
    Dec 14, 2018 at 14:09
  • @Data_Kid - I know! So close I can taste it... ha ha Dec 14, 2018 at 14:14

Yes, it's possible. Yes, you can. You can use AMPSCript in Microsite as you use it in Email including retrieving data from a salesforce ojbect.

Set @rows2 = LookupOrderedRows("Cars",4,"Horsepower Desc","MPG",Field(@cardata,"MPG"))

%%[ var @rs
Set @rs= RetrieveSalesforceObjects('Lead', 'Id, FirstName,LastName', 'region', '=', 'west')

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .