Last Updated On : 26-Mar-2026
Salesforce Certified B2C Commerce Cloud Developer - Comm-Dev-101 Practice Test
Prepare with our free Salesforce Certified B2C Commerce Cloud Developer - Comm-Dev-101 sample questions and pass with confidence. Our Salesforce-B2C-Commerce-Cloud-Developer practice test is designed to help you succeed on exam day.
Salesforce 2026
A developer plans to use the /search_suggestion (Shop API) in a Storefront application and
the following property must be set to do so
suggestion.product.image:view_type
What consideration should the developer in keepin mind to ensure that image data is
returned correctly as part of search suggestions?
A. If the view_type is not set or if the view_type is unknown, the image properties are not part of the response.
B. If the view_type is not set or if the view_type is unknown, the image size of 'small' is used by default
C. If the view_type is not set or if theview_type is unknown, the image size of 'large' is used by default
Explanation:
Why This Answer Is Correct
The Open Commerce API (OCAPI) is designed to be explicit and efficient in its responses. The suggestion.product.image:view_type property is a mandatory configuration for the search suggestions endpoint to include image data. The view_type corresponds to a specific, pre-defined image view (e.g., small, large, hi-res) configured in the Imaging system of B2C Commerce. If this parameter is not specified in the request or if an invalid/non-existent view_type value is provided, the API's default behavior is to omit the entire image object from the suggestion response.
This is a design choice to prevent returning incorrect or malformed image URLs. The API will not fall back to a default size like 'small' or 'large'; it will simply exclude the image data entirely. Therefore, a developer must ensure that a valid, configured view_type is always passed in the request to receive product images as part of search suggestions.
Why the Other Options Are Incorrect
B. If the view_type is not set or if the view_type is unknown, the image size of 'small' is used by default.
C. If the view_type is not set or if the view_type is unknown, the image size of 'large' is used by default.
Both of these options are incorrect because the OCAPI Shop API does not implement a default fallback image view type for the search suggestions endpoint. The system requires an explicit, valid mapping. Assuming a default like 'small' or 'large' would lead to unpredictable results, as those view types might not be configured for all products or sites. The platform's behavior is to be safe and omit the data rather than guess.
Reference
Salesforce Open Commerce API (OCAPI) Documentation: "Shop API - Search Suggestions Resource." The documentation for the /search_suggestions endpoint specifies the suggestion.product.image:view_type parameter and indicates that image data is included only when a valid view type is provided. The behavior for missing or invalid values is to exclude the image properties.
OCAPI Data Types Schema: The definition for the suggestion object shows that the image property is conditional.
In order to implement site custom functionality, a developer creates a new cartridge.
Which step should the developer take to ensure their cartridge changes take effect?
A. Add the new cartridge to the cartridge path for the business Manager site.
B. Rebuild the site indexes to capture incremental changes.
C. Add the new cartridge to the cartridge path for the relevant Storefront site.
Explanation:
Understanding the Requirement
In Salesforce B2C Commerce, creating a new cartridge alone is not sufficient for its code to be executed. The platform relies on the cartridge path to determine which cartridges are loaded and in what order. Each storefront site has its own cartridge path configuration, which controls storefront behavior.
The requirement here is to ensure that site custom functionality implemented in a new cartridge actually takes effect. Since this functionality is intended for the storefront, the cartridge must be added to the storefront site’s cartridge path.
Why Option C Is Correct
Adding the new cartridge to the relevant storefront site’s cartridge path ensures that:
* Controllers, templates, scripts, and models in the cartridge are discovered
* Cartridge layering rules are applied
* The storefront executes the new functionality
This is the only required and correct step to activate storefront code changes. Without this, the cartridge exists on the server but is never used at runtime.
Why the Other Options Are Incorrect
❌ A. Add the cartridge to the Business Manager site
Business Manager has its own site context. Adding a cartridge there affects only Business Manager extensions, not storefront behavior.
❌ B. Rebuild site indexes
Rebuilding indexes affects search data, not code execution. It does not activate cartridges.
Key Takeaway
Storefront functionality is controlled by the storefront site’s cartridge path—not by Business Manager or indexing.
References
Cartridge Path Configuration
A developer wants to configure the following products so that same search results ire returned regardless of the search term used. The search term can be bag, purse, pocketbook, and tote. Mow should the developer configure this?
A. Synonyms
B. Hypernyms
C. Hyponyms
Explanation:
To ensure that different search terms (like "bag," "purse," and "tote") return the same results, a developer must configure Synonym Groups in Business Manager.
How Synonyms Work
A synonym group tells the search engine: "These words mean the same thing in the context of our store." When a merchant creates a group containing bag, purse, pocketbook, tote, the search engine expands the shopper's query behind the scenes. If a shopper searches for "purse," the engine actually searches for "bag OR purse OR pocketbook OR tote." This ensures that products tagged with only "bag" will still appear for a user who used the word "tote."
Maintaining the User Experience
Synonyms are essential for handling regional language differences or common merchant terminology that might differ from how a shopper speaks. It is a "many-to-many" relationship where every word in the group is equal to every other word.
Why Hypernyms and Hyponyms are Different
Hypernyms (Option B): These define a one-to-many hierarchical relationship. For example, "Color" is a hypernym for "Red, Blue, Green." If a user searches for "Color," they get all colors. But if they search for "Red," they only get red. In the bag/purse example, the words are equal, not hierarchical.
Hyponyms (Option C): This is the reverse of a hypernym. "Red" is a hyponym of "Color." This is rarely used as a standalone configuration in B2C Commerce search settings; the system primarily focuses on Synonym and Hypernym groupings.
References
Salesforce B2C Commerce Documentation:Search Synonyms
Trailhead: Optimize Search in B2C Commerce
A developer has a sandbox with code to log a message during execution, and the following
code:

After the code executes, the developer does not see any log file with the message in the
WebDAV folder.
What could the developer do tocorrect this issue?
A. Set the root log level to debug AND check the box for info under Log Files.
B. Set the logging global preference to true AND set the root log level to debug.
C. Set the logging global preference to true AND check the box for Info under Log Files
Explanation:
Key Issue:
The Logger.info(message) call isn’t generating log files in WebDAV.
Two critical settings must be configured for logs to appear:
Solution (Option C):
✅ 1. Enable Global Logging Preference
Navigate to Administration > Operations > Logging Preferences in Business Manager.
Set "Enable Logging" to true.
✅ 2. Enable "Info" Log Level in Log Files
In the same Logging Preferences section:
Under "Log Files", check the box for "Info".
This ensures Logger.info() calls are captured.
Why Not Other Options?
❌ A. Root log level to debug + Info checkbox
While enabling "Info" logging is correct, debug level is unnecessary for Logger.info() to work.
❌ B. Global preference + debug level
Debug level is overkill, and missing the "Info" checkbox is the core issue.
Reference:
Salesforce Logging Configuration
A developer is asked to create a new service instance that will call a remote web service.
Which method should the developer use to create the service instance?
A. Option A
B. Option B
C. Option C
Explanation:
In Salesforce B2C Commerce, when a developer needs to call a remote web service, they define and manage the service using the Service Framework. The recommended and standard method to create or register a service instance is:
dw.svc.LocalServiceRegistry.createService(serviceID, definitionObject)
This method registers a new service dynamically in code by associating a service ID (defined in Business Manager) with a JavaScript implementation object that provides:
createRequest
parseResponse
mockCall (for testing)
getRequestLogMessage
getResponseLogMessage
🔧 Example:
var LocalServiceRegistry = require('dw/svc/LocalServiceRegistry');
var myService = LocalServiceRegistry.createService('my.http.service', {
createRequest: function(svc, params) {
svc.setRequestMethod('GET');
return null;
},
parseResponse: function(svc, response) {
return response.text;
}
});
Then call it like:
var result = myService.call();
❌ Why Other Options Are Incorrect:
B. dw.svc.LocalServiceInstance.createService()
❌ Invalid class — there is no LocalServiceInstance in the SFCC Service Framework
C. dw.svc.LocalServiceRegistry.getDefaultService()
❌ This is for retrieving a default, already-registered service — not for creating one
📘 Reference:
Salesforce B2C Commerce Service Framework Docs
| Salesforce-B2C-Commerce-Cloud-Developer Exam Questions - Home | Previous |
| Page 3 out of 41 Pages |