Total 154 Questions
Last Updated On : 6-Oct-2026
A developer is implementing new Page Designer content on a merchant's Storefront and adds the line below to

What does this achieve?
A. Enables searching to find Page Designer content assets that are not in folders.
B. Prevents Page Designer pages and components from being searchable.
C. Filters Page Designer search results into separate page and component folders.
D. Extends the ConrencSearchModei to allow the folder filter.
Explanation
This question focuses on Page Designer content search behavior in Salesforce B2C Commerce and how developers can influence what content appears in search results when working with Page Designer pages and components.
The line of code shown is:
apiContentSearchModel.setFilteredByFolder(false);
To understand what this does, we need to look at how the Content Search Model works, particularly in the context of Page Designer content and folder-based filtering in Business Manager.
✅ Why Answer A Is Correct
Enables searching to find Page Designer content assets that are not in folders
By default, when using the ContentSearchModel (and its Page Designer–aware variants), Salesforce B2C Commerce often filters content search results by folder. This behavior is intentional, because most merchants organize content assets, pages, and components into folders for manageability.
The method:
setFilteredByFolder(false)
explicitly disables folder-based filtering.
What That Means in Practice
Content assets, Page Designer pages, or components do not need to belong to a folder to appear in search results.
Orphaned content (content not assigned to any folder) becomes searchable and discoverable.
This is especially useful during:
- Page Designer implementations
- Content migrations
- Early content creation workflows where folders are not finalized yet
So, this line of code tells the content search model:
“Do not restrict search results to content that is assigned to folders.”
That behavior is exactly what option A describes, making it the correct answer.
❌ Why the Other Options Are Incorrect
❌ B. Prevents Page Designer pages and components from being searchable
This option describes the opposite of what the code does.
setFilteredByFolder(false) does not disable search
It broadens search results by removing folder restrictions
Pages and components remain searchable—possibly more searchable than before
If the intent were to prevent search entirely, different configuration or filtering logic would be required.
❌ C. Filters Page Designer search results into separate page and component folders
This option is incorrect because:
The method does not create or enforce folder separation
It does not distinguish between pages and components
It only toggles whether folder filtering is applied at all
Folder organization and separation are managed in Business Manager, not through this method call.
❌ D. Extends the ContentSearchModel to allow the folder filter
This option is incorrect because:
The method does not extend the model
It does not add new capabilities
It simply sets a configuration flag on an existing model
There is no inheritance, extension, or customization of the ContentSearchModel involved.
Key Exam Insight
For the Salesforce Certified B2C Commerce Cloud Developer (Comm-Dev-101) exam, remember this rule:
Any method named setFilteredByX(false) typically removes a restriction rather than adding one.
In this case:
true → filter by folder
false → include content regardless of folder assignment
Salesforce exam questions often test whether you understand what default filters exist and how toggling them affects search results.
References
Salesforce B2C Commerce Documentation – Page Designer
Salesforce B2C Commerce Developer Guide – Content Search Models
A merchant checked the "Show Orderable Products Only" preference in Business
Manager. What impact does this have on the Storefront from a user perspective?
A. Back-order products will be excluded from search results.
B. Products with an Available to Sell (ATS) - 0 will be excludedfrom search results.
C. The product detail page will be hidden if Available to Sell (ATS) = 0.
D. Pre-order products will be excluded from search results.
Explanation
When the "Show Orderable Products Only" preference is enabled in Business Manager, Salesforce B2C Commerce filters search results to exclude products that are not currently orderable — specifically, those with Available to Sell (ATS) = 0.
This means:
- Out-of-stock products (ATS = 0) will not appear in search results.
- Products that are in stock or available for backorder/preorder (depending on configuration) may still appear.
The setting applies at the site level, affecting all product search behavior unless overridden programmatically or at the product level.
This improves the customer experience by preventing frustration from clicking on products that cannot be purchased immediately.
❌ Why the Other Options Are Incorrect
❌ A. Back-order products will be excluded from search results
Not necessarily. Backorderable products may still be considered orderable depending on site configuration. This setting does not automatically exclude backorder items.
❌ C. The product detail page will be hidden if ATS = 0
This setting affects search results, not product detail page visibility. Customers can still access PDPs via direct links or navigation.
❌ D. Pre-order products will be excluded from search results
Like backorders, preorders may be considered orderable depending on configuration. They are not excluded by default under this setting.
📚 Sources
Salesforce Help: Show Orderable Products Only
A custom cartridge that seemed to be performing well in a sandbox has been installed in production. The production instance is showing increased page load times that seem to be related to the new custom code. Whatcana developer do to quickly track down the potential problem?
A. Use the Code Profiler in production instance. Set the mode to Development Mode and then wait a few minutes to collect data from onsite traffic. Click the refresh button to see the new data.
B. Use the Code Profiler in production instance. Set the mode to Development Mode and click the refresh button to see the new mode displayed.
C. Use the Code Profiler in a sandbox instance. Set the mode Extended Development Mode and then load the suspected pages and run the suspected process several times. Click the refresh button to see the new data.
Explanation:
Code Profiler is a tool in Salesforce B2C Commerce Cloud used to analyze performance bottlenecks in custom code.
Running the profiler in production is not recommended because:
Development Mode in production can negatively impact performance and expose sensitive data.
Profiling should be done in a controlled environment (sandbox), not on live traffic.
Extended Development Mode in sandbox
Provides detailed profiling data about controller execution, pipelines, scripts, and ISML templates.
Allows developers to reproduce the suspected slow pages or processes multiple times to collect meaningful data.
Ensures that performance analysis does not affect real customers.
❌ Why the other options are incorrect
A. Production instance with Development Mode and wait for traffic
Unsafe and not recommended; profiling in production can degrade performance and expose sensitive details.
B. Production instance with Development Mode and refresh
Same issue: profiling in production is not the correct approach.
C. Sandbox with Extended Development Mode
Correct, because it isolates the problem safely and provides detailed profiling data.
🔗 Reference
Salesforce B2C Commerce Cloud Documentation: Code Profiler Overview
Best Practice: “Always use Code Profiler in sandbox environments with Extended Development Mode to identify performance issues in custom cartridges.”
A client has two B2C Commerce sites in the same instance: one forthe U.S. market, the other for the European market. They offer free gift wrapping on a selection ofproducts. For each order, five products can be wrapped in the U.S., but only three products can be wrapped in the European region.
How should a developer allow the merchant to independently adjust this number?
A. Create a new custom preference by extendingthe Site Preference object type.
B. Select the corresponding option in the system preference for Orders.
C. Add a new Campaign using the Online Marketing section of the Business Manager.
D. Configure a new localizable content slot with a market-specific value.
Explanation:
In this scenario, the merchant needs to set a different limit on the number of gift-wrapped items per order — one value for the U.S. site, another for the European site. This is a classic use case for a site-specific configurable setting, and the best approach is:
Define a custom site preference, so it can be configured independently per site (U.S. and EU) via Business Manager.
✅ Why Option A is Correct
Custom Site Preferences are:
Configurable via Business Manager per site
Ideal for controlling site-specific behavior or business rules
Easy to use in server-side JavaScript via Site.getCurrent().getCustomPreferenceValue('yourPreferenceID')
So the developer would:
Define a custom preference, e.g., maxGiftWrapItems
Add it to the site_preferences.xml
Access it in code using Site.getCurrent().getCustomPreferenceValue('maxGiftWrapItems')
❌ Why the Other Options Are Incorrect
B. Select the corresponding option in the system preference for Orders
❌ No such built-in system preference exists for this — the logic is custom and requires a new preference.
C.Add a new Campaign using the Online Marketing section
❌ Campaigns control promotions and schedules, not rule-based order logic like max item limits.
D. Configure a new localizable content slot with a market-specific value
❌ Content slots are for frontend display content, not for setting backend business rules or limits.
📚 Reference
Salesforce B2C Commerce Docs – Custom Preferences
“Custom preferences on the SitePreference system object enable site-specific configuration of business logic.”
A NewsletterSubscription custom object exists that has a key attribute named email of type
String and the following script code.

However, the NewsletterSubscription custom object is not persisted.
What is apossible reason?
A. The code shownneed to be wrapped in a transaction.
B. The code shown needs to be wrapped in a try/catch block.
C. The code shown is the wrong syntax. The correct syntax is:
Explanation:
In Salesforce B2C Commerce, when creating or modifying persistent objects like custom objects, you must wrap the operation in a transaction using dw.system.Transaction. This ensures that the changes are committed to the database properly.
If you omit the transaction, the object may appear to be created in code but won’t be persisted in the database — which is exactly the issue described.
✅ Correct Syntax Example
var Transaction = require('dw/system/Transaction');
var CustomObjectMgr = require('dw/object/CustomObjectMgr');
Transaction.wrap(function () {
var customObject = CustomObjectMgr.createCustomObject('NewsletterSubscription', newsletterForm.email.value);
customObject.custom.firstName = newsletterForm.fname.value;
customObject.custom.lastName = newsletterForm.lname.value;
});
his ensures the creation and attribute assignment are atomic and persisted.
🔍 Why Not the Other Options?
B. Try/catch block
Useful for error handling, but does not ensure persistence.
C. Wrong syntax
The syntax may be correct, but without a transaction, persistence fails. The issue is not syntax but missing transaction logic.
📘 Reference:
Salesforce Developer Docs confirm:
“Use Transaction.wrap() when creating or modifying persistent objects such as custom objects, orders, or customer profiles.” 👉 Use Transactions – Salesforce Developers
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:
The resource resolution follows a locale fallback hierarchy. The request locale is en_CA. The system will look for the most specific match:
account_en_CA.properties → Not found.
account_en.properties → Found! It contains weight.unit=stones.
Since a match is found in account_en.properties, the value "stones" is used. The lookup stops at the first match in the hierarchy.
Why the others are incorrect
B) pounds
This value is only in account_en_US.properties, which is specific to en_US. It is not used because en_CA does not match en_US; it falls back to the more generic en first.
C) undefined
This would only occur if no matching key was found in any relevant properties file. Here, the key weight.unit exists in account_en.properties, so it is resolved.
D) kilos
This value is in the default or fallback file account.properties (no locale suffix). It is only used if no locale-specific file matches. Since account_en.properties exists and matches the language (en), it takes precedence.
Reference
Salesforce B2C Commerce Documentation: Resource Bundle Lookup
The lookup order is:
basename_language_COUNTRY.properties
basename_language.properties
basename.properties (the default or fallback)
For locale en_CA, the order is:
account_en_CA.properties → account_en.properties → account.properties
The first existing file in this sequence provides the value.
A developer is using the Script Debugger to troubleshoot an issue. They observe that the debugger is not able to resolve a specific breakpoint on one of the scripts. What is a possible reason for this issue?
A. The cartridge containing the script isnot in the site’s cartridge path
B. The script debugging session is not active
C. The script is form a third party cartridge and hence does not allow_settings breakpoints.
Explanation:
In Salesforce B2C Commerce, the Script Debugger (accessed via Business Manager → Administration → Development Setup → Debug Center or directly in the IDE plugin) can only set and hit breakpoints on scripts that are resolvable in the current site's cartridge path.
If the cartridge containing the script is not on the site's cartridge path (Business Manager → Administration → Sites → Manage Sites → [Your Site] → Settings → Cartridges), then:
- The debugger cannot locate the source file at runtime.
- Breakpoints appear as "unverified" (grayed out or hollow circles in VS Code/Eclipse).
- The debugger shows "Breakpoint ignored" or simply never stops there.
This is the most common reason why a breakpoint on a specific script is not resolved or hit.
Why the other options are incorrect
B. The script debugging session is not active
→ If no debugging session is active, no breakpoints work at all (not even on core cartridges). The developer would notice this immediately on any script. The question specifies one specific script fails while others presumably work.
C. The script is from a third-party cartridge and hence does not allow setting breakpoints
→ This is false. Third-party cartridges (e.g., int_klaviyo, int_cybersource, etc.) fully support breakpoints as long as they are on the cartridge path. Salesforce does not restrict debugging on third-party code.
Confirmation
Salesforce Help: "The debugger can only stop at breakpoints in cartridges that are included in the site's cartridge path."
Known limitation in SFCC IDE plugins (WebStorm, VS Code, Eclipse): Breakpoints in cartridges outside the path are marked as unverified.
Solution
Add the missing cartridge to the site's cartridge path (and restart or reconnect the debugger session if needed).
A developer customized the Cart-Show controller routewith a LINK cartridge that adds social media data. There is a new requirement to add a datalayer object to the Cart-Show controller route.
How should the developer achieve this to ensure that no code change will be needed if the client decides to remove the LINK cartridge?
A. Replace the Cart-Show controller route in client cartridge and add datalayer object to the viewData variable.
B. Replace the Cart-Show controller route in client cartridge and add datalayer object to the viewData variable. Ensure thatthe client cartridge is on the left of the U.HK cartridge m cartridge path.
C. Append Cart-Show controller route in the client cartridge and add datalayer object to the viewData variable.
Explanation
In Salesforce B2C Commerce SFRA, the recommended way to extend or enhance existing controller behavior—especially when working with optional cartridges like a LINK (integration) cartridge—is to use route appending, not route replacement.
The LINK cartridge has already customized the Cart-Show route to add social media data. Now the developer needs to add a dataLayer object while ensuring that no code changes are required if the LINK cartridge is later removed. To achieve this safely and maintainably, the developer should append to the existing route rather than replace it.
By using server.append('Show', ...) in the client cartridge, the developer:
- Adds additional logic after the original Cart-Show route executes
- Accesses and extends the existing viewData
- Avoids duplicating or overriding logic from the LINK cartridge
- Ensures the solution continues to work even if the LINK cartridge is removed
This approach follows SFRA best practices for loose coupling and cartridge independence.
Why the Other Options Are Incorrect
A. Replace the Cart-Show controller route in client cartridge ❌
Replacing the route creates a hard dependency on the LINK cartridge’s logic. If the LINK cartridge is removed, the developer would need to reimplement or modify the replaced logic, violating the requirement.
B. Replace the Cart-Show controller route and ensure cartridge order ❌
Cartridge path ordering does not solve the core issue. Replacing routes still introduces tight coupling and future maintenance risk if the LINK cartridge is removed.
Key Takeaway
To extend existing SFRA controller behavior without creating dependencies on optional cartridges, always use server.append() instead of replacing routes.
This pattern is commonly tested in the Salesforce Certified B2C Commerce Cloud Developer (Comm-Dev-101) exam.
References
Salesforce B2C Commerce Documentation – SFRA Controllers
SFRA supports route extension using prepend and append to allow modular customization without replacing core logic.
Salesforce B2C Commerce Documentation – Cartridge Layering Best Practices
Appending routes helps avoid tight coupling and ensures cartridges can be added or removed without code changes.
The developer needs to add custom category debug logging into the “contact’’ script,
toensure that a third-party service call responds as expected.
Assuming that the logging configurations for the contact category are correctly in place,
which line of code should the developer add in the 06 placeholder to meet this
requirement?

A. Option A
B. Option B
C. Option C
Explanation
In Salesforce B2C Commerce Script API, to log a message into a specific custom category (in this case, 'contact'), you must use the static Logger.getLogger() method to retrieve a specific Log instance first, and then call the desired log level method (e.g., debug()) on that returned instance.
The full syntax is:
Logger.getLogger('categoryName').logLevel('message');
Assuming the "contact" category is correctly configured in Business Manager to accept DEBUG level messages, Option A is the only correct implementation.
Why Other Options Are Incorrect
B. Option B: Logger.debug("Contact service responded with OK.")
This is incorrect because it is attempting to call a non-static method (debug) directly on the static Logger class. The static methods available directly on the Logger class (like Logger.info(), Logger.error()) write to generic log files, not a custom category file.
C. Option C: Logger.customLogger('contact').debug(...)
This is incorrect because there is no method named customLogger() in the dw.system.Logger Script API.
Reference
Class Logger (B2C Commerce Script API Documentation)
Reference the following code snippets that allow a form to function correctly.

Which code should a developer insert at the EXPRESSION placeholder m the ISML
template snippet above to have the form work as expected?
A. pdict.newslettersFrom
B. Pdict, newsletter
C. sowslettersform
Explanation
In Salesforce B2C Commerce (SFCC), when a controller renders an ISML template and passes form data, the form object is typically added to the pdict (Pipeline Dictionary) object with a key that matches the form name or a logical variable.
From the controller snippet:
var newsletterForm = server.forms.getForm('newsletter');
res.render('newsletterTemplate', { newsletterForm: newsletterForm });
- server.forms.getForm('newsletter') creates a form object based on the newsletter.xml definition.
- The object is passed as { newsletterForm: newsletterForm } in the res.render() call.
- In SFRA (and SiteGenesis patterns), the second argument to res.render(template, data) becomes the pdict object in the ISML template.
- Therefore, inside the template, the form is accessible as ${pdict.newsletterForm} (or just ${newsletterForm} in some shorthand contexts, but fully qualified as pdict.newsletterForm).
Why this fits the placeholder:
The template uses <form action="${URLUtils.url('Newsletter-Submit')}" ... > and then <input ... value="${...}" /> — but the placeholder is for the form attributes and input value bindings.
The code has value="${...}" encoding="off" and similar for the input — this is incomplete, but the intent is to bind the form fields (e.g., <input value="${pdict.newsletterForm.email.value}" /> or using form helpers).
However, the placeholder is right after value= for the form tag itself or input — but the question asks for the EXPRESSION placeholder to "have the form work as expected," which means correctly referencing the passed form object.
Option A (pdict.newsletterForm) matches the variable name passed in the controller (newsletterForm becomes pdict.newsletterForm).
Why not the others?
B. pdict.newsletter → Wrong key; the controller uses newsletterForm, not newsletter.
C. newsletterform (lowercase) → Missing pdict. prefix; ISML expressions for passed data use pdict.key.
References
SFCC Docs: Forms and server.forms.getForm() pass the form to templates via res.render(..., { formName: form }) → accessible as pdict.formName.
Examples in SFRA controllers (e.g., login, registration) consistently use pdict.loginForm, pdict.addressForm, etc.
| Page 5 out of 16 Pages |
| 34567 |
| Salesforce-B2C-Commerce-Cloud-Developer Practice Test Home |
Our new timed 2026 Salesforce-B2C-Commerce-Cloud-Developer practice test mirrors the exact format, number of questions, and time limit of the official exam.
The #1 challenge isn't just knowing the material; it's managing the clock. Our new simulation builds your speed and stamina.
You've studied the concepts. You've learned the material. But are you truly prepared for the pressure of the real Salesforce Certified B2C Commerce Cloud Developer - Comm-Dev-101 exam?
We've launched a brand-new, timed Salesforce-B2C-Commerce-Cloud-Developer practice exam that perfectly mirrors the official exam:
✅ Same Number of Questions
✅ Same Time Limit
✅ Same Exam Feel
✅ Unique Exam Every Time
This isn't just another Salesforce-B2C-Commerce-Cloud-Developer practice questions bank. It's your ultimate preparation engine.
Enroll now and gain the unbeatable advantage of: