Preference Forms

Preference Manager offers two methods for creating preference forms. You can create forms that work with Apex or forms that are populated from customizable templates.

Required Editions

Available in: Lightning Experience and Salesforce Classic in Developer, Enterprise, Performance, and Unlimited Editions

With the Apex-based method, you create an Apex class in the Pref_center namespace. The class is used to load the form data and to create or update data in your objects when a form is completed and submitted. After you create an Apex class, use Preference Builder to select elements of your form to populate a blank workspace.

With Consent Templates, you choose from four available template types. Then you build a template by choosing which of your brands, data use purposes, consent channels, or subscriptions that you want to include. At the click of a button, a template can populate a new form that is ready to publish.

After you create a preference form using either method, you can customize certain elements. If you choose to use a CSS style sheet, you can modify most attributes for your text components, including form headings and descriptions. For Lightning Web Components, such as buttons and dropdown lists, you can modify the padding and margins.

  • Create Business Brands for Preference Manager
    Create Business Brands to add to your preference forms in Preference Manager.
  • Create Data Use Purposes for Preference Manager
    Create Data Use Purposes to add to your preference forms in Preference Manager.
  • Create an Apex Class for Preference Manager
    Use Preference Builder along with the Pref_center Apex namespace to create forms with advanced customizations. The Pref_center Apex namespace represents the former name of the Preference Manager feature.
  • Create Preference Forms with Apex
    Use the Preference Builder to configure a preference form by selecting elements to populate onto a blank workspace.
  • About Consent Templates
    Create reusable templates to capture preferences based on the objects that you want to use to store the consent information. You can also structure how your preference forms collect consent based on your brands, data use purposes, and subscriptions.
  • Create Reusable Consent Templates
    In the Preference Manager app, you can create and publish as many consent templates as you want with the different template types. Then you use the activated templates to create the preference forms.
  • Create a Template-Based Preference Form
    After you activate a consent template, turn it into a preference form.
  • Customize Template-Based Forms in Preference Builder
    When you create consent templates in Preference Manager, you have the option to customize forms populated from the templates.
  • Design Web-Embedded Forms with CSS
    With Preference Manager, you can embed consent and preference forms on external websites and on Salesforce-hosted pages like Visualforce, Lightning Web Components (LWC), and Experience Cloud sites. To design your forms with custom branding and layouts, use Cascading Style Sheets (CSS) and custom CSS classes. To apply custom styles, define CSS rules in your website’s global stylesheet or apply inline styles on Salesforce pages to control the appearance of specific form elements.