Salesforce-B2C-Commerce-Cloud-Developer Practice Test

Salesforce Spring 25 Release
202 Questions

A developer working on a multi country site is asked to store country specific data that drives the creation of a country selector. Examples of the data storedare:
Pricebook to be used
Image URL for country flag
The data used in staging also applies in production, but only for this site.
Which approach should the developer take to implement these requirements?

A. Extend the Locale System Object to contain the custom data for each country.

B. Create a replicable, site-specific Custom Object with the custom data for each country.

C. Create site-specific content assets to store the data for each country.

B.   Create a replicable, site-specific Custom Object with the custom data for each country.

Explanation:

🌍 Why Custom Objects Work Best for Multi-Country Selector Data
When building a country selector that needs to store multiple data points per country β€” such as a pricebook reference, flag image URL, or other configuration values β€” the most flexible and scalable solution is using Custom Objects.

βœ… Option B: Replicable, Site-Specific Custom Object
Custom Object Type: Create a type like CountryConfig
Each object instance holds:
Country code (e.g., US, FR)
Pricebook ID
Flag image URL
Any other relevant metadata
Replicable: Ensures the data is pushed from staging to production
Site-specific: Keeps data confined to one site (important in multi-site realms)
πŸ“˜ You can access these easily via script or controller logic using:
CustomObjectMgr.getCustomObject('CountryConfig', countryCode);

❌ Why A & C Are Not Suitable

A. Extend the Locale System Object
System Objects like Locale are not customizable, and their scope is global β€” they can’t store arbitrary key-value data

C. Content Assets
Best for static or visual content, not structured config logic like pricebook mapping β€” hard to query and maintain programmatically

πŸ”— Reference:
β€œCustom Object Types allow developers to create structured, extensible models to store and retrieve configuration data. Replicable and site-specific types ensure deployment flexibility and multi-site isolation.” β€” Salesforce B2C Commerce Developer Guide
πŸ“– Custom Object Type Documentation

Salesforce-B2C-Commerce-Cloud-Developer Practice-Test - Home Previous
Page 20 out of 202 Pages