Create preference form access tokens so that users can view and edit your preference
forms from an external site, static web page, or Experience Cloud site without logging in.
You can create access tokens in Preference Manager or with REST API or Apex.
Required Editions
| Available in: Developer, Enterprise,
Performance, and Unlimited Editions. Requires the
Salesforce Privacy Center license.
|
An access token is an encrypted version of a record ID. You send a user a unique URL to
your site where the preference form is hosted. The unique URL includes an access token.
When the access token and record ID match, the user’s consent information is loaded into
the form. For each user, the form populates with their consent information so that they
can make their preference selections.
Keep these consideration in mind when creating an access token.
- Use record IDs for the Account, Contact, Individual, Lead, Person, or User objects.
If you used the Basic consent template to create a preference form, the user’s
consent is stored directly on a standard object (for example, on the Account object
or Contact object). In this scenario, generate a token that references a record ID
on the same standard object. All other consent templates require an association with
an Individual record.
- If you create custom fields on the Account, Contact, Individual, Lead, Person, or
User objects to store the access token strings, you can pass the token strings as
parameters for email template builders.
- An access token expires after 2 years or until programmatically revoked.