A Digital Developer must resolve a performance issue with product tiles. The Developer determines that the
product tiles are NOT being cached for a long enough period.
Which two methods can the Developer use to verify the cache settings for the product tiles? (Choose two.)
A. Enable cache information in the storefront toolkit and view the cache information for the product tile.
B. View the cache information provided by the Merchant Tools > Technical Reports Business Manager
C. View the product list page cache settings provided in the Administration > Manage Sites Business
Manager module.
D. Enable the template debugger to verify the cache times for the producttile.isml template.
Explanation:
To resolve performance issues in Salesforce B2C Commerce, especially when product tiles are not being cached long enough, it’s important for developers to verify where caching is configured and how it is behaving. Product tiles are rendered frequently across the site, and inefficient caching can lead to performance bottlenecks. The following two methods are effective ways to verify cache settings:
✅ Correct Answers:
A. Enable cache information in the storefront toolkit and view the cache information for the product tile.
The Storefront Toolkit provides developers with a way to inspect cache behavior directly in the storefront. By enabling cache information, the developer can:
See if a tile is cached
View cache hit/miss status
Check cache lifespan and ID
This is a direct method to confirm whether the product tile is being cached and for how long.
C. View the product list page cache settings provided in the Administration > Manage Sites Business Manager module.
Within Business Manager, under Administration > Sites > Manage Sites, developers can view and edit cache settings for pages, including the product list page. This section controls:
How long different page types are cached
What components (e.g., product tiles) are cached
Cache behavior by pipeline or controller
This helps ensure that the correct cache duration is configured for product tiles rendered on category or search result pages.
❌ Incorrect Options:
B. View the cache information provided by the Merchant Tools > Technical Reports Business Manager
Technical Reports are used to analyze job execution, logs, and system performance, but they do not provide visibility into product tile cache settings or durations.
D. Enable the template debugger to verify the cache times for the producttile.isml template
The Template Debugger is helpful for viewing template rendering and data passed to ISML files, but it does not display cache timing or metadata. It’s intended more for logic flow and variable inspection than cache diagnostics.
Which code sample is required to use a custom tag provided in SiteGenesis in an ISML template?
A. Option A
B. Option B
C. Option C
D. Option D
Explanation:
To use a custom tag in an ISML template in Salesforce B2C Commerce (SiteGenesis), the correct syntax is:
< isinclude template = " util / customtags " >
Why Option B is Correct?
< isinclude template = " util / customtags " >
This directive loads all registered custom tags into the current ISML template.
It is the standard method in SiteGenesis to make custom tags available for use.
Why Not the Other Options?
Option A (
Used for including JavaScript modules, not custom tags.
Option C (
Incorrect syntax—custom tags are not loaded via URL.
Option D (
This registers a new custom tag but does not make it available in the template.
Universal Containers wants to change a content slot that is currently configured to display a content asset. Now they want the slot to display the top five selling boxes for the week.
Which two changes need to be made for this to occur? (Choose two.)
A. Change the slot’s configuration content type to “products.”
B. Change the slot’s configuration content type to “recommendations.”
C. Change the slot’s configuration template to the appropriate rendering template.
D. Delete the existing content asset
Explanation:
Universal Containers wants to switch from showing a static content asset to dynamic product recommendations (top 5 selling boxes for the week). This requires:
✅ B. Change the slot’s configuration content type to “recommendations.”
The slot must now use Einstein Product Recommendations.
This content type enables dynamic product lists based on strategies like top sellers, recent views, or affinity.
The “recommendations” type is specifically designed to pull data from Einstein algorithms.
✅ C. Change the slot’s configuration template to the appropriate rendering template.
The ISML template used for rendering must support product recommendations.
It should loop through the slotcontent.content collection and render each product appropriately.
Example template logic:
< isloop items = " $ {slotcontent . content } " var = " product " >
< isprint value = " $ { product . name } " >< / isprint >
< / isloop >
❌ Why the other options are incorrect
❌ A. Change the slot’s configuration content type to “products.”
This would be used for manually selected products, not dynamic recommendations.
It doesn’t leverage Einstein’s algorithms.
❌ D. Delete the existing content asset.
Not necessary. You can simply disable or replace the slot configuration.
Content assets can coexist with other configurations and be reused elsewhere.
A Digital Developer needs to add logging to the following code:
Which statement logs the HTTP status code to a debug-level custom log file?
A. logger.getLogger(‘profile’).debug("Error retrieving profile email, Status Code: ", http.statusCode);
B. logger.debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode);
C. Logger.getLogger().debug("Error retrieving profile email, Status Code: {0} was returned.",
http.statusCode);
D. Logger.getLogger(‘profile’).debug("Error retrieving profile email, Status Code: {0} was returned.",
http.statusCode);
Explanation:
To log the HTTP status code in a debug-level custom log file, the correct syntax in Salesforce B2C Commerce (SFCC) is:
Logger.getLogger('profile').debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode);
Why Option D is Correct?
Logger.getLogger('profile')
Creates/retrieves a custom logger named 'profile' (logs appear in logs/profile.log).
.debug()
Logs the message at debug level (visible when debug logging is enabled).
{0}
Placeholder for the status code (http.statusCode).
Why Not the Other Options?
A. logger.getLogger(‘profile’).debug(...)
Incorrect: logger is not defined (should be Logger, the SFCC system class).
B. logger.debug(...)
Incorrect: logger is undefined, and no custom log file is specified.
C. Logger.getLogger().debug(...)
Incorrect: Missing log file name (e.g., 'profile').
To ensure SFRA best practices and protect against request forgery, the developer
introduced CSRF token
generation in the customer address form:
A. In the controller function that displays the form
B. In the middleware chain of the controller post route
C. In the controller function that handles the submitted form
D. In the model function that persists the form data
Explanation:
In Salesforce B2C Commerce SFRA, CSRF protection is implemented using middleware functions that intercept and validate requests before the controller logic executes. This is the most reliable and scalable way to protect against request forgery.
Why middleware is the correct place:
SFRA provides built-in middleware like csrfProtection.validateRequest and csrfProtection.validateAjaxRequest.
These are added directly to the middleware chain of a server.post() route.
This ensures that any POST request is validated for a CSRF token before any business logic runs.
Example implementation:
var server = require('server');
var csrfProtection = require('*/cartridge/scripts/middleware/csrf');
server.post(
'SubmitAddress',
server.middleware.https,
csrfProtection.validateRequest,
function (req, res, next) {
// Your form handling logic here
next();
}
);
❌ Why the other options are incorrect
A. In the controller function that displays the form This is where you generate the CSRF token using generateToken(), not where you validate it.
C. In the controller function that handles the submitted form While technically possible to call CSRFProtection.validateRequest() manually, SFRA best practices recommend using middleware instead.
D. In the model function that persists the form data Model functions should not handle request validation. That’s a controller-level concern.
Consider the following information:
• A merchant has this three-tier category structure setup in the Storefront catalog:
New Arrivals > Women > Clothing
• The category named Clothing has all the clothing items for Women and is merchandised.
• A Search Refinement named Newness is correctly configured for the Clothing category.
When a merchandiser views the Clothing category, the Search Refinement appears and Works as
expected. However, the merchandiser does not see the Search Refinement when searching for Clothing via the Storefront search.
What is the Reason?
A. There are conflicting Search Refinement definitions for Clothing and one of its parent categories
B. The Search Refinement definition is not set up for the Women category
C. The Search Refinement definition is not set up for the New Arrivals Category.
D. The Search Refinement definitions is not set up for the Root Category
Explanation:
In Salesforce B2C Commerce, when a shopper uses Storefront search, refinements (like "Newness") are not only controlled by the category where the product resides, but also by its parent categories in the search context.
In this case:
The "Clothing" category has the "Newness" refinement set correctly.
However, storefront search results are often scoped or filtered based on higher-level categories, like "New Arrivals" or "Women" in the navigation hierarchy.
If the "New Arrivals" category doesn't include the same Search Refinement (i.e., "Newness"), it will not appear when customers search and land on that category context.
This happens because refinements from parent categories must be explicitly configured, even if the child category is set up correctly.
❌ Why Other Options Are Incorrect:
A. Conflicting Search Refinement definitions
Not applicable — conflict isn’t causing this issue. It's about missing refinements, not conflicting ones.
B. Not set up for Women
While possible, the context of the question points to "New Arrivals" as the entry point for search results.
D. Not set up for Root Category
The root category is not relevant unless the search is scoped to it directly. That’s not the case here.
Universal Containers is preparing their storefront to use Open Commerce APIs (OCAPI).
To which hook should the Digital Developer move taxation logic to ensure consistent order totals within B2C Commerce?
A. dw.ocapi.shop.order.validateOrder
B. dw.ocapi.shop.basket.calculate
C. dw.ocapi.shop.basket.afterPostShipment
D. dw.ocapi.shop.order.afterPOST
Explanation:
To ensure consistent order totals (including taxes) when using Open Commerce API (OCAPI), the taxation logic should be moved to the dw.ocapi.shop.basket.calculate hook. Here's why:
Key Points:
Purpose of dw.ocapi.shop.basket.calculate:
This hook is triggered whenever the basket is recalculated (e.g., adding/removing items, applying promotions, or updating shipping).
It ensures taxes, discounts, and totals are consistently applied before the order is finalized.
Why Not Other Options?
A. dw.ocapi.shop.order.validateOrder
Runs after basket calculation, during order submission—too late for tax adjustments.
C. dw.ocapi.shop.basket.afterPostShipment
Runs after shipping is applied, but taxes must be calculated before this stage.
D. dw.ocapi.shop.order.afterPOST
Runs after the order is placed—used for post-order processing (e.g., notifications), not tax logic.
Taxation Logic in calculate Hook:
Ensures taxes are always up-to-date with basket changes.
Example:
dw.ocapi.shop.basket.calculate = function (basket, calculationSteps) {
// Apply custom tax logic here
TaxMgr.calculateTax(basket);
};
A client has two B2C Commerce sites in the same instance: one for the U.S market, the other for the
European market. The products they make are sold with different safety certificates based-on the world
location.
For example, they sell a smartphone with certificate A in the U.S and certificate B in Europe, a
hairdryer with certificate C in the U.S and certificate D in Europe, and more
How should a developer allow the merchant to display the appropriate certification logo in the produce to details page, depending on the customer’s location?
A. Add a Localizable custom attribute to the Certificate system object type.
B. Ad and Image custom preference to the Sitepreference system object type
C. Add a Site-specific custom attribute to the Product system object type.
D. Add a Localizable custom preference to the SitePreference system object type.
Explanation:
In Salesforce B2C Commerce, when you have multiple sites (e.g., U.S. and Europe) sharing the same product catalog, but needing site-specific display logic — such as different certification logos — the best practice is to use site-specific custom attributes on the Product system object.
This allows each site to:
Define its own value for the same attribute (e.g., certificationLogo)
Display the appropriate logo on the product detail page based on the current site context
Avoid duplicating products or catalogs unnecessarily
Key characteristics of site-specific attributes:
They override the global value for a specific site
They are non-localizable (localizable attributes are for language/locale differences)
They are ideal for regional compliance, merchandising, or visibility rules
🔧 Example Implementation
Create a custom attribute on the Product system object:
ID: certificationLogo
Type: Image or String (URL to image)
Mark it as site-specific
Assign site-specific values in Business Manager:
For U.S. site: certificationLogo = /images/certA.png
For EU site: certificationLogo = /images/certB.png
Render in ISML:
< isif condition = " $ { pdict. Product. custom. certificationLogo } " >
< img src = " $ { pdict. Product. custom. certificationLogo } " alt = " Certification Logo " >
< / isif >
❌ Why the other options are incorrect
A. Localizable custom attribute on Certificate system object
Localizable attributes are for language differences, not site-specific logic. Also, Certificate isn’t a standard system object unless custom-defined.
B. Image custom preference on SitePreference
Site preferences are global to the site, not tied to individual products.
D. Localizable custom preference on SitePreference
Again, this is for localization, not product-specific logic.
A Digital Developer is working in a sandbox on a site named test-site using the domain test.demandware.net.
The Developer needs to compile a url to make an Open Commerce API (OCAPI) request that returns product information. By default, which URL format is a proper Open Commerce API for Sandbox?
A. https://test.demandware.com/dw/shop/products/M1355?client_id=aaa...
B. https://www.test.com/s/test-site/sfc/shop/products/M1355?client_id=aaa...
C. https://test.demandware.net/s/test-site/dw/shop/v18_3/products/M1355?client_id=aaa...
D. https://www.test.com/dw/shop/v18_3/products/M1355?client_id=aaa..
Explanation:
The proper Open Commerce API (OCAPI) URL format for a sandbox environment (test.demandware.net) follows this structure:
Key Components of the URL:
Domain:
Sandbox domains use test.demandware.net (not .com or custom domains like www.test.com).
Site Path:
Includes the site name (/s/test-site/) to route the request to the correct sandbox site.
OCAPI Base Path:
Uses /dw/shop/ for storefront APIs (or /dw/data/ for data APIs).
API Version:
Explicitly specifies the version (e.g., v18_3) for backward compatibility.
Endpoint & Parameters:
Targets the products/M1355 endpoint with a client_id for authentication.
Why Option C is Correct?
Sandbox Domain: test.demandware.net
Site Context: /s/test-site/
OCAPI Path: /dw/shop/v18_3/products/M1355
Authentication: ?client_id=aaa...
Why Not Other Options?
A: Uses .com (invalid for sandbox) and lacks site path (/s/test-site/).
B: Uses www.test.com (invalid sandbox domain) and incorrect path (/sfc/shop/).
D: Lacks the site path (/s/test-site/) and uses www.test.com (invalid).
A merchant wants customers to be able to order gift vouchers via their site. Since they can issue an
unlimited number of these digital vouchers, this item should be available to sell at all items.
How can a developer use Business Manager to ensure that the gift vouchers are always available?
A. Check the perpetual flag in the product inventory record
B. Check the Available to Sell (ATS) flag dor the producto set
C. Set StockLevel = maxAllocation for the producto.
D. Manually set the inventory to a high numbe.
Explanation:
In Salesforce B2C Commerce, if a product is always available regardless of inventory levels, such as a digital gift voucher, the recommended way to manage its availability is to enable the "Perpetual" inventory flag.
🔄 What does the Perpetual flag do?
Tells the system to ignore stock levels for the product.
The product will always appear as in stock and available to sell, even if no stock records exist.
Commonly used for:
Digital goods (e.g., gift cards, e-books)
Services
Unlimited inventory products
📍 How to Enable in Business Manager:
Go to:
Merchant Tools > Products and Catalogs > Inventory > Inventory Lists
Find the inventory record for the gift voucher product.
Check the "Perpetual" flag.
Save.
Once enabled, SFCC will treat this item as always in stock, no matter what.
❌ Why the Other Options Are Incorrect:
B. Check the Available to Sell (ATS) flag for the product set
ATS is a calculated value (not a flag) based on current stock minus allocations. You cannot "check a flag" to force availability.
C. Set StockLevel = maxAllocation for the product
This will still cause ATS to hit zero when allocated. Doesn't guarantee perpetual availability.
D. Manually set the inventory to a high number
This is a temporary workaround, not a scalable or reliable solution. Also introduces risk if stock syncs from external systems.
Given the following ISML example, how should a developer reference the product object in
the current
iteration of thebasket?
< isloop ítems = ”$ { pdict. Basket. products } ” var = ” product ” status = “ loopstatus ” >
…
< / isloop >
A. product
B. pdict.Basket.products{loopstatus}
C. loopstatus.product
D. pdict.product
Explanation:
In the given ISML loop, the developer should reference the current product object directly using the variable name defined in the var attribute (product). Here’s why:
Key Points:
Loop Structure:
< isloop items = " $ { pdict. Basket. products } " va r= " product " status = " loopstatus " >
< ! -- Current product is accessible via 'product' -- >
$ { product. ID } < ! -- Example: Accessing the product ID -- >
< / isloop >
var="product" defines the variable name for the current iteration’s product.
Why product (Option A)?
The var attribute explicitly sets the reference name (product).
Directly using product (e.g., ${product.ID}) is the cleanest and correct approach.
Why Not Other Options?
B. pdict.Basket.products{loopstatus}
Invalid syntax. loopstatus is a counter (index), not a key.
C. loopstatus.product
loopstatus only tracks iteration metadata (e.g., index, first, last), not the object itself.
D. pdict.product
pdict contains the template’s root objects, not loop variables.
A client uses tax tables in Business Manager to calculate tax. They recently started shipping to a new
country, Italy, and the taxi s not being calculated correctly on the Storefront
What is the likely problem?
A. Tax Region is configured wrong.
B. Tax Country is missing
C. Tax Jurisdiction is missin
D. Tax Locale is configured wrong
Explanation:
When a merchant begins shipping to a new country like Italy, and tax is not being calculated correctly, the most likely cause is that no tax jurisdiction has been defined for that country in Business Manager.
What is a Tax Jurisdiction?
A tax jurisdiction defines the geographic area (e.g., country, state, zip) where specific tax rules apply. It’s used to map customer shipping addresses to the correct tax rate.
If Italy is not configured as a jurisdiction:
The system cannot match the shipping address to a tax rule
It defaults to no tax, or a fallback jurisdiction (if configured)
Tax rates will not be applied correctly
🔧 How to Fix It
Go to Business Manager > Merchant Tools > Ordering > Taxation
Open the Tax Jurisdictions tab
Create a new jurisdiction for Italy
Set the country code to IT
Define applicable tax rates under the Tax Rates tab
Ensure products and shipping methods are assigned to the correct Tax Class
❌ Why “Tax Locale is configured wrong” is less likely
Locales affect language, currency, and formatting, not tax calculation directly. While locale misconfiguration can affect display, it won’t prevent tax from being calculated — unless it’s tied to a missing jurisdiction.
Page 4 out of 17 Pages |
Previous |