A developer is importing edits for two different sites into the same sandbox and is provided with four different files.
Which two XML files should the developer import using the site-specific Merchant Tools import modules?
Answer : A
Search settingsandPromotionsare both site-level business configurations that have dedicated import/export functionality within the site's Merchant Tools area. Therefore, when the developer needs to import different configurations for two sites on the same instance, these files can be handled through each site's corresponding Merchant Tools modules.
Salesforce's B2C Commerce import/export guidance distinguishes site-specific data from organization-level metadata. Promotions are managed through the site'sMerchant Tools > Online Marketing > Import & Exportfunctionality, while search information can be managed through the site's search import/export capabilities.
System type extensions, by contrast, modify system-object metadata and are administered at the organization level through Site Development/System Object configuration and organization-level import mechanisms. They are not independently site-specific Merchant Tools data. This makes both options B and C incorrect because each contains system type extensions.
The distinction is operationally important in a multi-site instance. Site-specific merchandising/search configuration can vary independently by storefront, whereas extensions to system object definitions affect the shared platform metadata available across the organization.
Study Guide reference:Data Management Using Business Manager Usage --- site import/export, promotions, search configuration, system-object extensions, and multi-site administration.
===============
A developer has configured the following log levels for categories & sub-categories as:
WARN logging is enabled for "product" and DEBUG for "product.import"
What will be the log level used for various categories and sub-categories?
Answer : A
B2C Commerce logging uses ahierarchical category model. When WARN is enabled onproduct, WARN and all higher-severity levels are available forproductand descendant categories. A more specific configuration onproduct.importcan then lower that subcategory's threshold to DEBUG.
Salesforce gives essentially this exact example in its server-side JavaScript documentation: when WARN is enabled forproductand DEBUG is configured forproduct.import, WARN and ERROR are logged for the parent and its subcategories, whileproduct.importadditionally logs DEBUG and INFO.
The reason is that the configured level is aminimum severity threshold. DEBUG is lower than INFO, WARN, ERROR, and FATAL, so selecting DEBUG permits the entire severity range for that category. The more specific child-category setting overrides the inherited parent threshold for that branch.
This hierarchical design lets administrators keep broad logging conservative while temporarily increasing diagnostic detail for one subsystem such as product import processing.
Study Guide reference:Application Development --- custom logging hierarchy, parent/child categories, log-level inheritance, DEBUG, INFO, WARN, and granular diagnostics.
===============
A developer needs to display a products list of their "Women Dresses" category in a new web application, independent of their main B2C Commerce site. This custom listing page needs to be styled differently from the existing one, as per marketing requirements. Which B2C Commerce tool should the developer use to collect the necessary information?
Answer : A
For an independent external web application, the appropriate legacy B2C Commerce integration surface is theShop API Product Search resource. The application can retrieve structured product-search results for the desired category and use that data to construct a completely different presentation layer.
Salesforce's OCAPI documentation defines the Shop APIGET /product_searchresource and corresponding product-search extension points. The resource returns structured Product Search Result data rather than storefront-rendered HTML. This separation is important because the new application can independently control CSS, layout, rendering technology, and interaction behavior instead of attempting to reuse or scrape the existing storefront.
Search-Showis an SFRA controller designed to render the storefront search experience. Crawling its HTML creates unnecessary coupling to existing presentation markup and is not an integration architecture. A generic category endpoint can return category metadata, but the Product Search resource is designed to obtain product listing/search results.
Current platform note: Salesforce now marks OCAPI as deprecated for new implementations and recommends SCAPI for modern headless development, but the supplied certification question is explicitly testing the Shop OCAPI architecture.
Study Guide reference:Application Development --- OCAPI Shop API, Product Search, headless/external storefront integrations, structured search results, and API-based storefront development.
===============
A developer needs to implement a new feature that requires the use of a custom attribute. What is the first step the developer should take?
Answer : A
B2C Commerce custom attributes are defined through the platform'smetadata system, not dynamically declared by application JavaScript. Therefore, the first step is to create the required attribute definition in Business Manager on the appropriate extensible system object or custom-object type.
Salesforce documents the process under Administration > Site Development > System Object Types or Custom Object Types. The developer selects the target object, opens Attribute Definitions, clicks New, and defines the attribute ID, display name, and data type.
Once the attribute exists, it can be assigned to an attribute group where required for Business Manager visibility, populated through Business Manager or integrations, and accessed through the object'scustomproperty in application code.
Option B is incorrect because source code cannot create an undeclared persistent custom attribute merely by referencing a property name. Option C also comes later because application logic needs the metadata definition to exist before reliably reading or writing the value.
The type and characteristics of the attribute should be designed carefully because changing an existing attribute's type can cause stored values to be lost.
Study Guide reference:Data Management Using Business Manager Usage --- System Object Types, Custom Object Types, Attribute Definitions, attribute groups, and custom metadata.
===============
A developer wants to add a link to the My Account page.
What is the correct code to accomplish this?
Answer : A
Option A correctly combines the two standard B2C Commerce APIs needed for the link:URLUtils.url()generates the URL for theAccount-Showcontroller route, whileResource.msg()retrieves the localized display text from theaccountresource bundle.
The Salesforce Script API definesURLUtils.url()as a method for generating Commerce URLs for controller or pipeline actions using the current request/site context.Resource.msg(key, bundleName, defaultMessage)resolves a localized message from the specified resource bundle, which is exactly what${Resource.msg('myaccount','account',null)}does.
Option B is invalid becauseURLUtilsisn't called directly as a function andResourceMgr.getProperties()isn't the standard ISML localization expression shown here. Option C similarly uses a nonexistentURLUtils.get()method and suppliesrequest.locale()in the position whereResource.msg()expects the default message, not an explicit locale selector.
Using the standard URL and resource APIs also keeps the template compatible with configured URL rules and localization.
Study Guide reference:Application Development --- ISML expressions,URLUtils,Resource.msg(), controller routes, localization, and storefront navigation links.
===============
A developer implements the necessary code for a new Page Designer component.
What is the purpose of the JSON metadata definition file the developer creates?
Answer : A
Every Page Designer component type has aJSON meta definition. That metadata describes the configurable structure exposed to Page Designer, including attributes and, for container/layout components, theregions into which merchants can place other components.
Salesforce documentation states that each page type and component type requires a JSON meta definition file. For component types, the file describes merchant-configurable attributes and can define regions. Salesforce's example of a three-column layout component represents each column as a region in that component's metadata.
The JSON file does not itself define the CSS responsive behavior of the rendered component; responsive visual structure belongs to the component's rendering/template implementation and associated styling. Nor does the JSON meta definition contain the complete business and rendering logic. Traditional Page Designer component types have a corresponding script implementation that performs rendering, obtains application data when appropriate, and sends content to the template.
The metadata file is therefore declarative: it describes what Page Designer understands about the component and what configuration merchants can manipulate.
Study Guide reference:Application Development --- Page Designer component types, JSON meta definitions,region_definitions, component attributes, and Page Designer architecture.
===============
There is a business requirement that a custom controller in app_custom_my_cartridge invokes the calculateTax(basket) function of the dw.order.calculateTax hook that is defined in app_storefront_base. How can the developer implement this call?
Answer : A
Because thedw.order.calculateTaxhook is alreadydefined and registered byapp_storefront_base, the custom controller does not need to register that implementation again. Its responsibility is to invoke the existing extension point throughdw.system.HookMgr.callHook(). Therefore, option A expresses the correct architectural pattern.
Salesforce's SFRA hook documentation separateshook registrationfromhook invocation. A cartridge that provides an implementation registers its hooks through its hook configuration, while consuming code calls the registered extension point withHookMgr.callHook(). B2C Commerce then resolves registered hook implementations from cartridges on the active cartridge path.
The current SFRA implementation itself invokes the tax extension point withHookMgr.callHook('dw.order.calculateTax', 'calculateTax', basket), demonstrating that calling code does not re-register the existing hook.
Accordingly, adding another hook location to the custom cartridge'shooks.jsonorpackage.jsonmerely to call an already registered implementation is unnecessary. Registration is required for the cartridge implementing the hook, not every caller.
Study Guide reference:Application Development --- hooks, HookMgr, extension-point registration, SFRA tax calculation, and cartridge extensibility.
===============