Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Add further restrictions if you have specific requirements. This is particularly important if your site experiences high traffic and/or you are running into Salesforce limits.

Triggered Experience

Create a Full Stack Triggered Experience to automatically send Guest data to Salesforce. For the trigger we recommend:

...

Create a Webhook variant that sends to the Destination Connection created above. Create the API response with the following Freemarker template for the public API endpoint:

Code Block
<#-- Output the first browser ref we find.
Salesforce will use this to do a reverse lookup for the Guest. -->
{
<#list guest.sessions as session>
    <#if session.browserRef?has_content>
      "browserRef": "${session.browserRef}"
      <#break>
    </#if>
</#list>
}

Or this for the OAuth2 endpoint:

Code Block
<#-- Output all Guest data. -->
${toJSON(guest)}

...

Create a Full Stack Interactive Experience with the same Audience Template and API response as per the OAuth2 option above. Note the friendlyId value for configuration in Salesforce - this Experience will be used to retrieve Guest data on demand.