Last Updated On : 28-Sep-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
Which method should a developer use to create a service instance that will call a remote web service?
A. dw.svc.LocalServiceRegistry.createService()
B. dw.svc.LocalServiceInstance
C. dw.svc.LocalServiceRegistry.getDefaultService()
Explanation
In Salesforce B2C Commerce (SFCC), the Service framework provides the `dw.svc.LocalServiceRegistry` class to create service instances that can call remote web services. The key method is:
javascript
````
dw.svc.LocalServiceRegistry.createService(serviceID, callbacks)
```
- `createService(serviceID, callbacks)` — Creates and returns a service instance (`dw.svc.Service`) configured with the specified service ID (the service defined in Business Manager) and the callback object (defining how to build the request, parse the response, and handle errors).
- Once created, the developer calls `.call(...)` on the returned service instance to invoke the remote web service.
Why the Other Options Are Incorrect
B. `dw.svc.LocalServiceInstance`
– There is no `LocalServiceInstance` class in the SFCC Service API. This is a fabricated name — it does not exist. Service instances are created via `LocalServiceRegistry.createService()`, not by referencing a `LocalServiceInstance` class. So this option is invalid.
C. `dw.svc.LocalServiceRegistry.getDefaultService()`
– There is no `getDefaultService()` method on `LocalServiceRegistry`. The Service API does not provide a "get default service" method for creating service instances. Service instances are created explicitly via `createService(serviceID, callbacks)`. So this option is also a fabricated method and is incorrect.
Reference
Salesforce B2C Commerce documentation — the `dw.svc` package, specifically `dw.svc.LocalServiceRegistry.createService(serviceID, callbacks)`, which creates a service instance used to call a remote web service (with the instance's `.call()` method performing the actual invocation).
````
A developer is inspecting the weekly service status report for a critical internally-hosted web service and notices there are too many instances of unavailability. Which solution can reduce service unavailability?
A. Increase the web service time out.
B. Change the code that sets the throwOnError attribute of the service to be true. Modify the code that makes the request to the external service to be wrapped in a try/catch block.
Explanation
In Salesforce B2C Commerce (SFCC), when a web service call times out before receiving a response, the service framework treats the call as failed/unavailable. If a critical internally-hosted web service is reporting too many instances of unavailability, a common cause is that the service is taking longer to respond than the configured timeout allows — so calls are being prematurely aborted, registering as unavailable.
Increasing the web service timeout gives the service more time to respond before the call is considered failed. If the service is simply slow to respond (due to load, processing time, etc.), a longer timeout allows the call to complete successfully instead of being cut off — thereby reducing the number of "unavailable" instances reported.
This directly addresses the symptom (unavailability caused by timeouts) by allowing slow-but-valid responses to succeed, making option A correct.
Why the Other Options Are Incorrect
B. Change the code that sets the `throwOnError` attribute of the service to be true.
– The `throwOnError` attribute controls whether an exception is thrown when a service call fails (error handling behavior). Setting it to true makes failures throw exceptions — it does not reduce the actual unavailability of the service. It only changes how errors are surfaced in code. In fact, throwing on error could increase the visibility of failures without addressing the root cause (slow responses/timeouts). So this does not reduce unavailability.
C. Modify the code that makes the request to the external service to be wrapped in a try/catch block.
– Wrapping the request in a try/catch block is a defensive error-handling measure — it catches exceptions so the application doesn't crash, and allows for graceful fallback. However, it does not reduce the service's unavailability. The calls still time out/fail; you're just handling the failure more gracefully. It addresses how failures are handled, not how many failures occur. To reduce unavailability, you must address the cause (e.g., timeouts), not just catch the resulting errors.
Reference
Salesforce B2C Commerce documentation — Service framework and Service Profiles in Business Manager (Administration > Operations > Services), specifically the timeout setting for service calls. A timeout that is too short causes valid-but-slow responses to be treated as failures, contributing to reported unavailability.
A merchant has a content slot on a page that currently displays products based on the top sellers for the current week. The merchant wants to change this functionality. They want to have the slot render a specific content asset so that the content experience is more personalized to the visitors. Which two actions are necessary to make this change?
A. Change the content type AND the rendering template in the slot configuration.
B. Change the default setting AND the rendering template in the slot configuration.
C. Change the rendering template in the slot configuration AND delete the existing content slot to create a new one.
Explanation
In Salesforce B2C Commerce (SFCC), a content slot's configuration determines what kind of content it holds and how that content is rendered on the storefront. Two key aspects are:
1. Content Type — defines the type of content the slot holds. In this scenario, the slot currently holds product content (top sellers — a product/recommender type). To render a specific content asset instead, the content type must be changed to the content asset type (e.g., "content asset" content type).
2. Rendering Template — defines the ISML template used to render the slot's content. Since the slot is now holding a content asset (instead of products), the rendering template must be changed to a template appropriate for rendering a content asset (rather than the product-rendering template used for top sellers).
Both changes are necessary:
* Change the content type → so the slot holds a content asset instead of product/recommender content.
* Change the rendering template → so the slot renders the content asset correctly (the old product-rendering template would not correctly render a content asset).
Together, these two actions transform the slot from displaying top-seller products to rendering a specific content asset, achieving the merchant's personalization goal. This makes option A correct.
Why the Other Options Are Incorrect
B. Change the default setting AND the rendering template in the slot configuration.
– The content type is the key configuration that defines what kind of content the slot holds. Simply changing a "default setting" (which is vague and not the content type) does not change the type of content the slot holds. To switch from product/recommender content to a content asset, the content type must be changed — not merely a "default setting." Since this option omits the essential content type change and substitutes a vague "default setting," it does not correctly achieve the requirement.
C. Change the rendering template in the slot configuration AND delete the existing content slot to create a new one.
– Changing the rendering template is correct, but deleting and recreating the content slot is unnecessary. You do not need to delete the existing slot to change its content behavior — you simply modify the slot's configuration (content type and rendering template). Deleting the slot would disrupt the page's slot placement and configuration, and it is not a required step. Additionally, this option omits the content type change, which is essential to switch the slot from product content to a content asset. So this option is incorrect.
Reference
Salesforce B2C Commerce documentation — Content Slots configuration (Merchant Tools > Content > Slots), specifically the content type setting (which defines what kind of content the slot holds) and the rendering template setting (which defines the ISML template used to render the slot's content).
A merchant uploads an image using the Content Image Upload module of Business Manager. Which module can the merchant use to display the image on the Storefront?
A. Content slots
B. Product images
C. Payment methods
Explanation
In Salesforce B2C Commerce (SFCC), the Content Image Upload module (under Merchant Tools > Content > Image Upload) is used to upload content images into the content library — these are content assets (images) managed as part of the site's content, not as product images.
To display an uploaded content image on the storefront, the merchant uses Content Slots (Merchant Tools > Content > Slots). A content slot is a configurable placement on a storefront page (e.g., a homepage banner, a campaign area). The merchant configures the slot to reference the content asset/image and assigns the slot to the appropriate slot configuration so it renders in the desired location on the storefront.
This is the content management flow:
1. Upload the image via Content Image Upload (stored as a content asset).
2. Use a Content Slot to place/display that image on the storefront (by referencing the content asset in the slot).
This makes option A correct.
Why the Other Option Is Incorrect
B. Product images.
– Product images are associated with products (catalog data) and are managed through the product catalog (e.g., in the product's image configuration under Products & Catalogs). The Content Image Upload module uploads content images — which are content assets, not product images. To display a content image uploaded via the Content Image Upload module, you use content slots (content management), not the product image mechanism. Product images relate to catalog products and are a different domain entirely. So this is not the correct module for displaying a content image.
Reference
Salesforce B2C Commerce documentation — Content Image Upload (Merchant Tools > Content > Image Upload) for uploading content images as content assets, and Content Slots (Merchant Tools > Content > Slots) for placing/displaying content assets (including uploaded images) on the storefront.
A developer is implementing a new feature that requires the use of a custom object. What is the first step the developer should take?
A. Create the custom object in Business Manager.
B. Define the custom object in the code.
C. Write the logic to handle the custom object.
Explanation
In Salesforce B2C Commerce (SFCC), Custom Objects are metadata — their type definition (the object type, its attributes, and attribute groups) must be created and configured in Business Manager before they can be used in code.
The first step is to create the custom object in Business Manager (via Merchant Tools > Custom Objects > Custom Object Editor, or under the site's custom object types). This defines:
* The custom object type (its ID and basic definition).
* Its attributes (the fields it holds).
* Its attribute groups (which attributes are visible/editable in Business Manager).
Once the custom object type and its attributes exist in Business Manager, SFCC generates the corresponding API accessors, making the object usable in server-side scripts (e.g., via `dw.object.CustomObjectMgr` and the object's attributes). Only after the custom object is created and defined in Business Manager can the developer write the logic to create, read, update, or delete custom object instances in code.
So the correct order is:
Create the custom object in Business Manager → write the logic to handle it
Since the question asks for the first step, option A is correct.
Why the Other Options Are Incorrect
B. Define the custom object in the code.
– You do not define custom objects in code in SFCC. Custom objects are metadata configured through Business Manager's Custom Object Editor, not declared in JavaScript. The code simply accesses custom objects (via `dw.object.CustomObjectMgr`) once they have been defined in Business Manager. Attempting to "define" the custom object in code is not a valid or possible first step — the object type must exist in Business Manager first.
C. Write the logic to handle the custom object.
– Writing the logic is a later step that comes after the custom object has been created in Business Manager. You cannot write meaningful logic to handle a custom object (e.g., creating/reading instances) until the object type exists. So this cannot be the first step.
Reference
Salesforce B2C Commerce documentation — Custom Objects in Business Manager (Merchant Tools > Custom Objects / Custom Object Editor), covering how custom object types and attributes are created and then accessed via the `dw.object.CustomObjectMgr` API in code.
| Page 1 out of 31 Pages |