Create Custom Preferences
In Salesforce B2C Commerce, you can create custom preferences for sites, and then view and edit them both locally and across multiple sites. Custom preferences enable site developers to make properties of the system modules configurable in Business Manager.
Custom preferences can:
- Define a preference type
- Define a preference group
- Group preference types into preference groups
- Set the value of a preference for a particular site or across multiple sites
- Read the value of a preference from a custom application (for example, a pipeline or B2C Commerce script)
One way to achieve higher flexibility when implementing customized functionality for a system is to make certain features and properties configurable. Making them configurable allows for easy adaptation of the system functionality to changing requirements later.
You can create custom preferences for your sites to make your settings configurable. Custom site preferences are defined in the context of the SitePreferences system object.
You can also get and set custom preferences programmatically.