A developer is working on a new site for the U.S based on an existing Canadian site. One of the
requirements is a change to the address form. The current Canadian form has an list with the
correct two-letter abbreviation for the provinces.
The U.S. requirements are to:
• Have an list with the correct two-letter abbreviation for the states in place of the
province field.
• Set the U.S site locale.
• Add the options list field definition to the XML file.
How should the developer set up the files before making the required edits?
A. Create a copy of existing address.xml file in the default folder. Rename that file to adres_US.xml
B. Create a new sub-folder in the forms folder. Name it US. Copy existing address.xml file in the new folder
C. Create a copy of existing address.xml file in the default folder. Rename that file to address_en_US.xml
D. Create a new sub-folder in the forms folder. Name it en_US. Copy existing address.xml file in the new folder.
Explanation:
Why This Approach?
Salesforce B2C Commerce uses locale-specific folders (en_US, fr_CA, etc.) to override form definitions (like address.xml) for different regions.
By placing the modified address.xml in an en_US subfolder, the U.S. site will automatically use this version while the Canadian site retains the original (in default or fr_CA).
Key Requirements Met:
State Dropdown: Replace Canadian provinces with U.S. state abbreviations in the copied address.xml.
Locale Setting: The en_US folder ensures the form aligns with the U.S. site’s locale.
Field Definition: Edit the copied XML to include the U.S. states list.
Why Other Options Fail:
A & C: Renaming files (e.g., adres_US.xml or address_en_US.xml) won’t work—the system expects files in locale folders, not renamed files in default.
B: A US folder (without en_US) doesn’t follow the locale-naming convention and won’t be auto-detected.
A Digital Developer is implementing an Open Commerce API call to add products to a basket. Given the following resource configuration:
Which modification allows the requests to successfully execute?
A. Change the "resource_id" value to: "/baskets/*/items"
B. Change the "write_attributes" value to: "(+items)"
C. Change the "read_attributes" value to: "(items)"
D. Change the "methods" value to: ["get", "post"]
Explanation:
Problem Identification:
The current configuration only allows GET requests ("methods": ["get"]), but adding products to a basket requires POST (or PATCH).
Without POST in the methods array, the API will reject write operations.
Why This Fix Works:
Adding "post" to the methods array enables the API to accept requests that modify the basket (e.g., adding items).
Example corrected configuration:
{
"resource_id": "/baskets/**",
"methods": ["get", "post"], // Now supports both read and write
"read_attributes": "(**)",
"write_attributes": "(**)"
}
Why Other Options Are Incorrect:
A: Changing resource_id to "/baskets/*/items" restricts the path but doesn’t solve the missing POST method issue.
B: "(+items)" is invalid syntax for write_attributes (use "(**)" for wildcard permissions).
C: "(items)" only grants read access to the items field but doesn’t enable writes.
A Digital Developer has identified that the code segment below is causing performance problems.
What should the Developer do to improve the code?
A. Use a system attribute instead of the isOnSaleFlag custom attribute.
B. Avoid post-processing and use the isOnSaleFlag attribute as a search refinement.
C. Breaks the process into separate loops.
D. Avoid using an Iterator and use a Collection instead.
Explanation:
The code currently loops through all search results and filters products based on the custom attribute isOnSaleFlag. This is known as post-processing, and it’s inefficient — especially when the product catalog is large.
To improve performance, the developer should move the filtering logic into the search query itself by using isOnSaleFlag as a search refinement. This way, only matching products are returned from the search engine, reducing memory usage and processing time.
This change:
Reduces the number of products iterated over.
Leverages the search index for optimized filtering.
Improves page load time and scalability.
❌ Why the other options fall short:
A. Use a system attribute instead of isOnSaleFlag: Not helpful unless a system attribute already exists for this purpose. The issue is filtering logic, not attribute type.
C. Break into separate loops: Doesn’t reduce the number of iterations — just spreads them out.
D. Use a Collection instead of Iterator: Might simplify syntax, but doesn’t address the root performance issue — filtering too late.
A developer has the following files in template/resources:
account.proierties
weight.unit=kilos
account_en.propierties
weight.unit=stones
account_en_US.propierties
weight.unit= pounds
Using the default locale configuration, what is the current outcome of the page that renders the
account.isml template snippet below when visiting the Sofrefront with the English for Canada(en_CA) locale=
Your parcel weighs 10 ${Resource.msg(‘weight.unit’,’account’)}
A. Your parcel weighs 10 stones.
B. Your parcel weighs 10 pounds
C. Your parcel weighs 10 undefined.
D. Your parcel weighs 10 kilos
Explanation:
In Salesforce B2C Commerce (SFCC), resource bundles follow a fallback mechanism based on locale specificity:
When using:
${Resource.msg('weight.unit', 'account')}
...and visiting the storefront with the locale en_CA (English - Canada), the system will attempt to load the property in the following order:
🔍 Locale Resolution Order for en_CA:
account_en_CA.properties ✅ (not available)
account_en.properties ✅ (exists → used)
account.properties (default/fallback)
So in this case:
The system finds account_en.properties
It uses the entry:
weight.unit=stones
✅ Therefore, the output will be:
Your parcel weighs 10 stones.
❌ Why the other options are incorrect:
B. "pounds" → Would only occur if en_US locale was active (account_en_US.properties)
C. "undefined" → Would happen only if weight.unit was missing in all property files
D. "kilos" → From account.properties, used only if account_en.properties didn’t exist
A Digital Developer adds the following line of code to a script
The code executes without error; however, the log file on disk does NOT contain the log message. Which two actions should be completed to write the log message to disk? (Choose two.)
A. Ensure that the debug log level is enabled to write to file in the Custom Log Settings Business Manager module
B. Archive old log files to make room in the log directory.
C. Ensure that the “login” category is added to the Custom Log Filters in the Log Settings Business
Manager module.
D. Ensure that the debug log level has been added to the custom log level types in the Global Preferences business manager module
Explanation:
A. Enable Debug Log Level
By default, debug logs may not be written to disk unless explicitly enabled.
Steps to Fix:
Business Manager > Administration > Operations > Log Settings > Custom Log Settings
→ Ensure "debug" is checked under "Log Levels to File".
C. Add the "login" Category to Log Filters
Log categories (e.g., "login") must be whitelisted in Custom Log Filters to appear in logs.
Steps to Fix:
Business Manager > Administration > Operations > Log Settings > Custom Log Filters
→ Add "login" to the list of categories.
Why Other Options Are Incorrect:
B (Archive old logs): While log rotation is important, it doesn’t affect whether new logs are written.
D (Global Preferences): Log levels are managed in Log Settings, not Global Preferences.
Given the code snippet aboce, what should be added after this code so it can be used for page component display?
A. Base.render = render;
B. Module.exports.render = render;
C. Module.exports = render;
D. Module.exports = server.exports();
Explanation:
In Salesforce B2C Commerce SFRA (Storefront Reference Architecture), controller modules are structured using the server object from dw/system/Server. After defining routes and middleware, you need to export the controller so it can be used by other parts of the application — including Page Designer components.
The correct way to expose the controller logic is:
module.exports = server.exports();
This ensures that all defined routes and middleware are properly registered and accessible to the framework. Without this line, the controller won’t be recognized by the application, and Page Designer won’t be able to invoke it for rendering components.
❌ Why the other options don’t work:
A. Base.render = render;: This is not a valid export pattern and doesn’t expose the controller.
B. Module.exports.render = render;: Only exports a single function, not the full controller logic.
C. Module.exports = render;: Again, exports just one function — not suitable for SFRA controllers.
A Digital Developer needs to add a new form to the shopping cart page to allow customers
to enter their rewards pass ID. There is already an existing Cart.js controller that handles
processing of the other cartforms. In addition, a form field node is in the form XML and the
necessary form input is present in the ISML template. The code below is the submit button for the ISML markup.
A. Option A
B. Option B
C. Option C
D. Option D
Explanation:
To properly process the new rewards pass ID form submission on the shopping cart page, the developer must complete two essential setup steps:
Add an
Update the Form.handleAction() call in Cart.js Add a new key addRewardPass to the object passed to Form.handleAction(), with a corresponding function to process the form data.
These steps ensure that the form submission is recognized and handled by the controller logic, allowing the rewards pass ID to be processed correctly.
❌ Why the other options don’t work:
B.
C. addtl-form-action attribute in ISML: Used for multi-action forms, but not required or sufficient here.
D. No controller change: Without updating Form.handleAction(), the form submission won’t be processed at all.
A developer needs to show only car accessories when shoppers use the search term car accessories and exclude technology accessories and household accessories.Given the above requirement, what is the recommended approach using the Search Dictionaries Dashboard?
A. Create a Synonym Dictionary entry: car accessories, household, technology.
Use search mode Exact Match
B. Create a Common Phrase Dictionary entry: car accessories, NOT household, NOT technology. Use search mode Exact Match.
C. Create a Synonym Dictionary entry: car accessories, household, technology. Use search mode First Word.
D. Create a Common Phrase Dictionary entry: car accessories.
Use search mode Exact Match
Explanation:
In Salesforce B2C Commerce (SFCC), the Search Dictionaries Dashboard allows merchants and developers to refine how customer search terms are interpreted and matched.
To show only “car accessories” and exclude other accessories (like “technology accessories” or “household accessories”), the best strategy is to treat "car accessories" as a distinct phrase — not just a combination of two words.
✅ Why Option D is Correct:
A Common Phrase Dictionary entry allows you to define multi-word phrases that should be matched together, not split apart.
Setting the Search Mode to “Exact Match” ensures that only search results that match the full phrase "car accessories" will be shown.
This prevents unrelated matches where only “accessories” or “car” appear independently — which is what often causes household or technology accessories to show up.
❌ Why Other Options Are Incorrect:
A. Synonym Dictionary with car accessories, household, technology
➤ This would associate all these terms as equivalent, making the situation worse — you'd include the very terms you're trying to exclude.
B. Common Phrase Dictionary with car accessories, NOT household, NOT technology
➤ The Search Dictionaries Dashboard does not support boolean logic like NOT in phrases. So this entry would be invalid.
C. Synonym Dictionary with car accessories, household, technology using First Word
➤ Again, this would tell the system to treat all three phrases as interchangeable, which is the opposite of the goal.
A client sells its product in single-brand stores as well as in multi-brand stores. When shown in the store
locator list, the client wants the single-brand stores to have a particular background color to highlight them.
Which Business Manager action should be completed to allow the developer to apply different styling to the single-brand stores?
A. Add a Boolean custom attribute to the Store system object
B. Configure the existing Store custom object type definition
C. Create a new SingleBrandStore custom object configuration
D. Adjust the relevant Site Preference in the Stores group
Explanation:
Why This Works:
The Store system object already contains core attributes (e.g., name, address). Adding a Boolean custom attribute (e.g., isSingleBrandStore) allows developers to:
Flag single-brand stores in Business Manager.
Apply conditional CSS in the store locator template (e.g., {% if store.custom.isSingleBrandStore %} background-color: #ffeb3b; {% endif %}).
Implementation Steps:
In Business Manager:
Administration > Sites > Stores > Store Attributes > Add Custom Attribute
Name: isSingleBrandStore
Type: Boolean
In Store Locator Template:
< div class = " store " style = " { % if store.custom . is SingleBrandStore % } background - color : yellow ; { % endif % } " >
{{store.name}}
Why Other Options Are Incorrect:
B (Configure Store custom object type): Overcomplicates the solution—custom objects are for new data structures, not extending existing ones.
C (Create SingleBrandStore custom object): Unnecessary; stores already exist as system objects.
D (Site Preference): Site Preferences are global settings, not store-specific.
A developer is given a task to implement a new Page Designer layout component that doesn’t accept certain asset components.How should the developer achieve the above task?
A. Add component_type_inclusion in the layout json configuration
B. Add component_type_Exclusions in the layout json configuration
C. Add layout_type_inclusion in the target components json configurations.
D. Add layout_type_exclusion in the other asset components json configuration
Explanation:
In Salesforce B2C Commerce Page Designer, when you want a layout component to exclude specific asset components, you define that restriction in the layout’s meta definition JSON file using the component_type_Exclusions property.
This tells Page Designer:
“This layout should not allow these component types to be dropped into its regions.”
It enforces design constraints and prevents merchandisers from accidentally using incompatible or undesired components.
For example:
{
"component_type_Exclusions": ["asset-banner", "asset-carousel"]
}
This would prevent those asset components from being used in the layout.
❌ Why the other options don’t work:
A. component_type_inclusion: This is not a valid property in layout configuration — inclusion is handled differently.
C. layout_type_inclusion in component JSON: That controls where a component can be used, not what a layout accepts.
D. layout_type_exclusion in asset component JSON: Again, this restricts where a component can be placed, not what a layout allows.
Universal Containers needs to have Apple Pay disabled for the country of Spain.
Which Business Manager module should the Developer use to meet this requirement?
A. Merchant Tools > Ordering > Payment Methods
B. Merchant Tools > Site Preferences > Apple Pay
C. Merchant Tools > Ordering > Payment Processors
D. Merchant Tools > Site Preferences > Payment Types
Explanation:
Why This Module?
Payment Methods in Business Manager allows you to enable/disable payment options (like Apple Pay) per country.
Steps:
Merchant Tools > Ordering > Payment Methods > Apple Pay > Disable for Spain
Why Not Other Options?
B (Site Preferences > Apple Pay): No such path exists—Apple Pay is configured under Payment Methods.
C (Payment Processors): Manages processors (e.g., Adyen), not country-specific payment visibility.
D (Site Preferences > Payment Types): Incorrect—this controls general settings, not country-level toggles.
Universal Containers recently completed updates to their storefront shopping cart page. A
problem has been discovered since the update. Users are no longer able to submit coupon
codes on this page. Additionally, authenticated userswho try to add a coupon are logged
out.
The following processing code is found in the Cart.js controller file:
What should the Developer verify to identify the issue?
A. The CSRF cartridge is included in the site’s cartridge path
B. The form group has the secure attribute set to true
C. The CSRF token is present in the form and is being submitted in the request.
D. The CSRF settings in Business Manager are properly configured.
Explanation:
The symptoms described point clearly to a CSRF (Cross-Site Request Forgery) protection failure:
Coupon form fails to submit
Authenticated users are logged out when submitting the form
This is a common result of missing or invalid CSRF tokens. In SFRA (Salesforce Reference Architecture), CSRF protection is enabled by default on forms that use POST, and failure to validate a CSRF token will cause:
Form submission to be rejected
Session to be invalidated (causing logout)
✅ What to Verify:
You should inspect the ISML template that renders the coupon submission form and ensure it includes this hidden input:
This injects the valid CSRF token into the form using the csrf object available in the pipeline dictionary.
Why Other Options Are Incorrect:
A. The CSRF cartridge is included in the site’s cartridge path
➤ CSRF isn’t a standalone cartridge — it’s a middleware provided in SFRA, not a separate cartridge.
B. The form group has the secure attribute set to true
➤ secure="true" ensures the form is submitted via HTTPS, but does not affect CSRF handling.
D. The CSRF settings in Business Manager are properly configured
➤ CSRF settings in BM are rarely the cause — they only define global enforcement, and won’t override missing token logic in your ISML or controller.
Page 2 out of 17 Pages |
Previous |