Locales & Languages
Smart CPQ uses two types of locales:
- A UI locale
- A data locale
We will review what these locales are used for, then we will look at how they receive a value.
Locales in the Quote
The UI locale is used to display static quote labels (column descriptions, field descriptions, step name descriptions). It is also used to format dates in the correct way.
The data locale is used for dynamic quote data. For example, it is used when displaying a catalog so that it is displayed it in the correct language. Items added from a catalog have values in the catalog language (meaning the description of your product will be displayed in the data locale).
Locales for Document Generation
The logic is similar to the quote: The UI locale is used to get the static elements of the proposal (labels). The dynamic elements are retrieved from the quote. They come as they where saved in the quote.
Locale Values at Quote Creation
Locales, both UI and data, are retrieved from Salesforce. The UI locale is always the locale of the current user, as defined in Salesforce.
The data locale either comes from a standard quote field (LocaleSidKey), or from the user locale if the field is empty.
This field can be populated in two ways:
- User Input - When the quote is about to be created, the field can be selected by user. The picklist values can be specified in two ways:
- You can delete or deactivate locales from the field definition,
- Or you can use a control rule on the values available in it.
- Custom Trigger - A project-based trigger can be created to populate the field. On before/after insert on the quote, the field can be assigned a value.
When the CPQ quote is actually created, if LocaleSidKey has a value, it is used for the data locale. Otherwise, the locale used is the one of the user creating the quote.
Data Locale Value Change
After quote creation, the LocaleSidKey field can be modified from the Salesforce quote. When it is changed, the new data locale is sent to CPQ on the fly.
Based on the data providers definition, the descriptions of quote elements can be re-calculated. This allows document generation to get the dynamic content in the right language.
Locales Format
Locales on the user or on the LocaleSidKey field should be Salesforce supported locales.
See https://help.salesforce.com/articleView?id=admin_supported_locales.htm&type=5 to learn about supported locales.
Unsupported Locales will not be recognized by the Managed Package, hence they will not be sent properly to Smart CPQ. In such a case, Smart CPQ will not be able to be opened.
Make sure to understand what locales are supported by Salesforce when defining your organization's user locales.
