9

Not a bullet proof solution, but I have implemented an increased level of security by using EncryptSymmetric and DecryptSymmetric, so you avoid storing the id and secret directly in Ampscript. First you create the three required assets in Key Management: Password Salt Initialisation vector You need to use the EncryptSymmetric in a different Cloud Page to ...


8

I use the HTTPGET() AMPScript function to pull in the content from an external web server when developing pages. Like this: %%=TreatAsContent(HttpGet(Concat("http://example.com/your-page.html?x=",GUID())))=%% Then when everything is functional, then I copy the code from the web server back into the Cloud Pages and publish it. This method also works for ...


8

You have a space in the url, and you need to include name and value pairs for all parameters that you want to pass from email to a CloudPage: %%=CloudPagesURL(ID, 'CampaignCode', @CampCode, 'SegmentName', @SegmentName)=%% Then on a CloudPage, use the RequestParameter function to retrieve the valuse. Documentation: CloudPagesURL: https://developer....


7

@TCassa, your approach appears correct. I've taken this approach many time before. I suspect it is just something minor in your code like a syntax issue or undefined variable. Suggestion: I've started using a new approach in this scenario by using the IIF() function. This approach allows me to place the AMPScript code inline with my HTML. <input type=...


7

Here's a simple drag-drop example written in pure Visualforce: <apex:page controller="DragDrop"> <script> var dragStartId; function cancel(event) { event.preventDefault(); } function dragstart(event) { dragStartId = event.target.dataset.rowid; } function drop(event) { reorderitems(dragStartId, event....


7

I'd say most (if not all) of the Email, Email Date, Subscriber, and Sender personalization strings are included -- as are any attributes or data extension column names passed over in the send context. That is as long as you're using the CloudPageURL function to arrive at the page from an email. +--------------------+ | Email Date Strings | +---------------...


7

Not entirely. It's mostly feasible, but there are some limitations. Firstly, you'll need to purchase the installation of SSL Certs on your CloudPages from Salesforce. Secondly, you'd not be able to authenticate requests made to your Execute route using JWT (SSJS and AMPScript lack the required libraries to decode the JWT), so there are quite a few scenarios ...


7

You can't add SSJS into validation script, as it is executed in the front-end only. I would very much recommend moving away from Smart Capture and build a custom solution, which will use Ampscript function of CreateSalesforceObject before upserting the form data to a data extension. This way you ensure you can store the field values with a reference to e.g. ...


6

I was able to get the method from @brad to work, but with a few tweaks. First, as mentioned by @MarkP, there's no need for the %%=v(@DecodeFont)=%%);. Second, I wasn't able to get the base64 encoding from that site to work, despite changing the options and trying multiple things. However, I'm on a mac, so I just used the terminal to encode the font and it ...


6

The "query" of a page's life cycle is the stuff after the "?" character in a URL, while a request parameter is one placed in the body of the request (a "form post"). Let's look at an example of what a browser might send to a server: POST /path/to/file?The-Query-String=Here&Query-Values=Are-In-The-Url HTTP/1.1 Host: myhost.com Content-Length: 52 Content-...


6

You need to print the variable using %%=v(@id)=%% And not %%[=v(@id)=]%%


6

Taking a stab in the dark and assuming this is hosted on a cloud page, here is what I would do: Have the page post to itself Have a lookup inside AMPScript to see if the emailaddress already exists in your DE Have a conditional to display error text if already exists or to do an AMPScript insert if it does not and display success content. To post to itself:...


6

It's no different than adding it to any other HTML page. <link rel="icon" type="image/png" href="https://forums.oscommerce.com/favicon.ico"/> This example code piece seems to work fine for me on my test Cloud Page.


6

AttributeValue() only works on defined in sendable data, which is why your 3rd option still worked. The second option also worked because of this, not because of the passed values. Your first one failed because all values added to the cloudpagesurl() function are parameters and are separate from the associated attributes. This is why param1 returned null as ...


6

I really wouldn't recommend this, as it is going to likely be slow - but as this is for testing only, you could reference the _Subscribers Dataview in the lookup: ROWCOUNT(LOOKUPROWS('_Subscribers','SubscriberKey',_subscriberkey)) > 0 This Dataview would contain the Subscriberkey of every subscriber in your email 'All Subscribers' list. Another option I ...


5

For cloud pages you have to pass the accepted encoding var targetSite = "https://pub.s7.exacttarget.com/f42z3hbhzzzz" var result = HTTP.Get(targetSite,['Accept-Encoding'],['gzip, deflate, sdch, br']); var targetSite = "https://pub.s7.exacttarget.com/f42z3hbhzzzz" var result = HTTP.Post(targetSite,'text/html','test',['Accept-Encoding','x-request-id'],['gzip,...


5

We built a Cloud Page set that updates the master-subscribe (AllSubscribers) and Publication Lists and passes/retrieves information from Sales Cloud as well, so this is surely possible. Processing is done with AMPscript and some SSJS, so I'd advise to get familar with these two first. There's also an option to write SOAP API / AMPscript variation as well, ...


5

You need to output the value using the v-Function in order to achieve that. As you are already within an AMPscript-Block, you don't need the starting and ending codes %%= and =%%. This code will work: %%[ VAR @skey, @Type SET @skey = RequestParameter("skey") SET @Type = RequestParameter("Type") IF Not Empty(@skey) THEN UpsertData("...


5

Linking with CloudpagesURL automatically inserts the subscriberkey to the landingpage with the QS parameter that salesforce attaches (its hashed with more values but subscriberkey is in it). The way to go would just be RedirectTo(CloudpagesURL(999)) To attach parameters that are not part of salesforce QS parameter it would be Concat(RedirectTo(...


5

I think that means "until [you're ready to] move to CloudPages" (i.e., CloudPages aren't missing any features that I need). From the Content Builder FAQ: What if I Want to Create Content for Classic Landing Pages and Microsites? Where possible, use CloudPages. Support for classic Landing Pages and Microsites goes beyond the end-of-support and ...


5

When setting up the SSL, normaly the support will ask you some questions amongst which are the questions: Will you require references made directly to HTTP to be force redirected to HTTPS? ...OR... Would you like for references made directly to HTTP to work as is, without redirecting to a secured link? You simply need to answer YES the ...


5

Domain whitelist is intended to store domains to which you can perform redirects on form submission in Cloud Pages or in Smart Capture forms. Let's say you host a form on Cloud Page hosted on e.g. marketing.ampscript.guide and want it to redirect to sprignaturemoves.com, your form submission will fail, if domain whitelisting is enabled, but sprignaturemoves....


4

You can search the All Subscribers list for their status, or query the _Subscribers Data view returning the EmailAddress and Status. The query should look like this SELECT EmailAddress ,Status FROM _Subscribers WHERE EmailAddress = "EmailYouJustUnsusbcribed" A caveat to this will be when the emailaddresses and subscriber keys are not the same. Then I ...


4

If you're arriving at a CloudPage from a CloudPagesURL() link in an email, then you can retrieve the _subscriberKey personalization string with AttributeValue(): %%[ var @Id, @firstName, @lastName, @email, @subscriberRows, @subscriberRow, @OptIn, @OptOut set @Id = AttributeValue("_subscriberkey") IF RequestParameter("submitted") != true THEN set @...


4

You should be able to do this all in a single RetrieveSalesforceObjects() call - by returning multiple fields from the call. This should greatly reduce your processing and 'wait' time. Something like: SET @SFObject = RetrieveSalesforceObjects('Contact', 'FirstName,LastName,PhoneNumber,etc...', 'Id', '=', @id) IF RowCount(@SFObject) > 0 THEN ...


4

At a first glance, I don't see anything that should be throwing a 500 error. When you are testing new functionality on a Cloudpage, it's always a good idea to wrap your scripts within a try/catch so you can get a specific (i.e. more helpful) error indicator from SFMC. <script runat="server"> Platform.Load("Core","1.1") ; try { </script> /** ...


4

@Gortonington thank you for the hint, turns out that my colleague who created the email, used the ID visible in the URL of the Cloud Page in Web Studio, not the actual Page ID - now we have replaced it and it's working fine. Conclusion: the error message is displayed when the Cloud Page with the ID that you are trying to redirect to doesn't exist.


4

IP as an example is easy with SSJS, very hard with AMPScript. SSJS: <script type="javascript" runat="server"> Platform.Load("core","1"); var ip = Platform.Request.ClientIP(); Variable.SetValue("ip",ip); </script> %%=v(@ip)=%% the full documentation for what you are looking for is here: https://developer.salesforce.com/docs/atlas.en-us.mc-...


4

Although not directly an answer to your question, this might help - you will be able to see the load time of each asset on your CloudPage: Open the CloudPage in Chrome and use Chrome developer tools to measure the load time. Open the CloudPage in Chrome, then right-click and select inspect or hit F12 to open the console In the console, click on the ...


4

There are two functions in AMPscript that let you retrieve the parameters sent by the request message. QueryParameter - Only usable for GET-parameters (suitable for your use case) RequestParameter - Usable for GET- and POST-parameters (also suitable for your use case) So your code would look like this: %%=Lookup('DealerDE','Name','ID', RequestParameter('...


Only top voted, non community-wiki answers of a minimum length are eligible