We're going to upgrade to Multi-Org soon and I would like to know how can I create a Custom Profile Center, since the documentation says that it is required.

I followed this guide (https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/creating_a_custom_profile_center_using_ampscript_and_the_soap_api.htm) but I don't really understand how this works. I had to create a data extension named adminPageInfo in order for the code to work, as there are LookUp functions in both pages. I uploaded both pages in CloudPages, they get published correctly, but I don't really know how to use those now.

How do these work? What does that data extension do? What's the logic behind?

Isn't there an easier way to build a Custom Profile Center? I only need it for Multi-Org, nothing else.

1 Answer 1


From my experiences you have two approaches

  1. Leverage data extensions
  2. Use AMPScript to fully handle the whole process by retrieving data and updating SFDC objects (Contact for instance)

Let's say you will choose options 2 and have some preference custom fields on the Contact object like "Email consent" or "SMS consent".

Core components:

  1. AMPScript in your Cloud Pages and email content
  2. Custom cloud page with submit button for instance

How this works:

You should embed a special piece of code into each email you intend to send(CloudPagesURL combined with Redirect) => this will send the subscriber context back to your Cloud Page and you will be able to use it when calling SFDC to retrieve a correct record.

You can also call an unsub event via AMPScript (this will change subscriber status to unsubscribed)


Embed correct code into your content

%%[ SET @unsub_url_1 = CloudPagesURL(999, 'SubscriberKey', _subscriberKey) ]%% -->
<a href="%%=RedirectTo(@unsub_url_1)=%%">Manage your subscription preferences</a>

Now we're at the Landing Cloud Page when we can read Subscriber context

SET @SubscriberKey = RequestParameter('SubscriberKey')

SET @QueryRequest = RetrieveSalesforceObjects('Contact','Id,EmailConsent__c,SMSConsent__c,'Id', '=', @SubscriberKey)

IF RowCount(@QueryRequest) > 0 THEN
SET @Id = Field(Row(@QueryRequest,1),'Id')
SET @ConsentEmail = Field(Row(@QueryRequest,1),'EmailConsent__c')
SET @ConsentSMS = Field(Row(@QueryRequest,1),'SMSConsent__c')
SET @ContactID = Field(Row(@QueryRequest,1),'Id')

You could then add more logic and use a pure "processing page" containing just AMPScript that would take specific actions based on customer choices (redirect, log an unsub event or update SFDC object)... Something like below

VAR @jid, @reason, @lue, @lue_prop, @lue_statusCode, @overallStatus, @requestId, @Response, @Status, @Error

    SET @Id = RequestParameter("Id")
    SET @ConsentEmail = RequestParameter("ConsentEmail")
    SET @ConsentSMS = RequestParameter("ConsentSMS")

    IF NOT EMPTY(@ConsentEmail) THEN
        SET @ConsentEmail = "true"
        SET @ConsentEmail = "false"

        SET @ConsentSMS = "true"
        SET @ConsentSMS = "false"

    SET @UpdateContact = UpdateSingleSalesforceObject(
        "Contact", @SubscriberKey,
        "EmailConsent__c", @ConsentEmail,
        "SMSConsent__c", @ConsentSMS,


Log unsub event on the "main subscribers list"

    SET @listid = 999
    SET @reason = "Custom profile centre"

    IF @ConsentEmail == "false" THEN
    SET @lue = CreateObject("ExecuteRequest")

    SET @lue_prop = CreateObject("APIProperty")                 
        SetObjectProperty(@lue_prop, "Name", "SubscriberKey")
        SetObjectProperty(@lue_prop, "Value", @SubscriberKey)
        AddObjectArrayItem(@lue, "Parameters", @lue_prop)

    SET @lue_prop = CreateObject("APIProperty")
        SetObjectProperty(@lue_prop, "Name", "ListID")
        SetObjectProperty(@lue_prop, "Value", @listid)
        AddObjectArrayItem(@lue, "Parameters", @lue_prop)

        SetObjectProperty(@lue_prop, "Name", "Reason")
        SetObjectProperty(@lue_prop, "Value", @reason)
        AddObjectArrayItem(@lue, "Parameters", @lue_prop)

        SET @lue_statusCode = InvokeExecute(@lue, @overallStatus, @requestId)

        SET @Response = Row(@lue_statusCode, 1)
        SET @Status = Field(@Response,"StatusMessage")
        SET @Error = Field(@Response,"ErrorCode")

    IF @UpdateContact == 1 THEN
        InsertData("audit_dx","SubscriberKey",@SubscriberKey,"ErrorDate",Now(),"Description","Your error desc")

You could add more pages and more complex AMP with advanced error handling. This is how I approached this myself (high level overview)

  • Can anyone explain what is the functionality of the admin page ? I also copied them and published them in cloud pages, but after publishing they don't load correctly and give a 500 - internal server error, which is obvious because certain variables / values need to be provided. but I really don't understand what the admin page does ?
    – Girish
    Dec 31, 2019 at 20:34

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