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
What is the action needed for the content slot to work as intended?
A. No; The content slot is rendered correctly.
B. Yes; The content needs to be configured with a recommender to display products.
C. Yes; The isloop should be removed because no loops are allowed in a content slot rendering template.
Explanation
In Salesforce B2C Commerce (SFCC), a content slot with its content type set to product holds a collection of product content (one or more configured products). When the slot is rendered, the slot's content is available in the rendering template via the slotcontent object, and the individual product items are accessed through slotcontent.content — which is a collection of the configured product objects.
The provided rendering template correctly:
* Checks that the slot content exists (`
* Loops over the collection of products in the slot (`
* Prints each product's ID and Name (`${product.getID()}`, `${product.getName()}`).
This is the standard, correct pattern for rendering a product-type content slot. Looping over `slotcontent.content` is valid and expected when the slot contains multiple products. Since the slot is correctly configured (content type = product, products configured, template correct, enabled and scheduled), no additional action is needed — the content slot renders correctly. This makes option A correct.
Why the Other Options Are Incorrect
B. Yes; the content needs to be configured with a recommender to display products.
– A recommender is used for dynamic product recommendations (e.g., "you may also like"), which is a different type of slot content. Here, the content type is set to product with products explicitly configured — meaning the slot already has its products assigned directly. A recommender is not required for a product content slot with configured products. Adding a recommender would change the content type/behavior unnecessarily. So this option is incorrect.
C. Yes; the `isloop` should be removed because no loops are allowed in a content slot rendering template.
– This is false. Loops are perfectly allowed in content slot rendering templates. In fact, for a product content slot that holds multiple products, a loop (`
Reference
Salesforce B2C Commerce documentation — Content Slots and slot rendering templates, specifically the product content type and the use of slotcontent / slotcontent.content with `
Given this customer basket information:
• A customer has an existing basket that consists of multiple items.
• One of the items is identified as a gift item by an attribute at the product line item.
• The developer needs to write custom code to fetch the customer basket and then modify the basket based
upon the items in the cart. If the basket contains any gift items, modify the basket and create a separate
shipment for the gift item.
Four hooks are required to make the modification, beginning with modifyGETResponse and ending with
validateBasket.
dw.ocapi.shop.basket.modifyGETResponse
-- missing hook --
-- missing hook --
dw.ocapi.shop.basket.validateBasket
What are the two missing hooks in the middle?
A. dw.ocapi.shop.basket.shipment.beforePOST AND dw.ocapi.shop.basket.shipment.beforePATCH
B. dw.ocapi.shop.basket.shipment.beforePOST AND dw.ocapi.shop.basket.shipment.beforeDELETE
C. dw.ocapi.shop.basket.shipment.beforePATCH AND dw.ocapi.shop.basket.shipment.afterDELETE
Explanation
In the OCAPI Shop API, the basket resource supports hooks at various stages of the request lifecycle. When a developer needs to modify the basket — including creating a separate shipment for gift items — the relevant hooks are the shipment-level hooks that fire before the shipment-related operations are executed.
Why the Other Options Are Incorrect
B. `dw.ocapi.shop.basket.shipment.beforePOST` AND `dw.ocapi.shop.basket.shipment.beforeDELETE`
– This replaces the `beforePATCH` hook with `beforeDELETE`. The requirement is to create a separate shipment for the gift item and modify the basket — this involves creating (POST) and updating (PATCH) shipments, not deleting them. The `beforeDELETE` hook would fire before a shipment is deleted, which is not relevant to creating a separate gift shipment. So this option includes an inapplicable hook.
C. `dw.ocapi.shop.basket.shipment.beforePATCH` AND `dw.ocapi.shop.basket.shipment.afterDELETE`
– This option is missing `beforePOST` (needed for creating** the separate shipment) and instead includes `afterDELETE`**, which is again not relevant to the requirement. Since creating a separate shipment requires the POST hook (to intercept shipment creation), and this option doesn't include it — and adds an unrelated DELETE hook — it is incorrect.
Reference
Salesforce B2C Commerce documentation — OCAPI Shop API hooks, specifically the basket resource hooks: `dw.ocapi.shop.basket.modifyGETResponse`, `dw.ocapi.shop.basket.shipment.beforePOST`, `dw.ocapi.shop.basket.shipment.beforePATCH`, and `dw.ocapi.shop.basket.validateBasket`, covering how custom logic can be injected before basket/shipment operations.
A developer is asked to implement a simple call to an authentication-protected REST web service. Which configuration is valid?
A. Add the authentication password to the service credentials.
B. Configure the authentication username using a site preference.
C. Insert the service ' s endpoint in a.propertiesfile.
Explanation
In Salesforce B2C Commerce (SFCC), the Service framework is used to integrate with external web services. When a service requires authentication (e.g., HTTP Basic Auth, or another credential-based scheme), the credentials — username and password — are configured in the service's Credentials setup in Business Manager (Administration > Operations > Services > [Service] > Credentials).
For an authentication-protected REST web service, the password (along with the username) is stored in the service credentials. The Service framework then uses these credentials to authenticate the outbound call to the external service.
So adding the authentication password to the service credentials is a valid and correct configuration for calling an authentication-protected web service — making option A correct.
Why the Other Options Are Incorrect
B. Configure the authentication username using a site preference.
– Authentication credentials (username/password) should be stored in the service's Credentials configuration, not in site preferences. Site preferences are for site-level settings (business/merchandising configurations), not for storing service authentication credentials. Storing credentials in site preferences is not the correct or secure approach and does not integrate with the Service framework's authentication handling. So this is not a valid configuration.
C. Insert the service's endpoint in a `.properties` file.
– A `.properties` file is used for localization/resource strings (e.g., translations for the storefront), not for storing service endpoints. Service endpoints are configured in the service definition (under the Service framework in Business Manager), not in a properties file. Placing an endpoint in a properties file is neither correct nor functional for service configuration. So this is not a valid configuration.
Reference
Salesforce B2C Commerce documentation — Service framework in Business Manager (Administration > Operations > Services), specifically Service Credentials for storing authentication username/password used to call external web services, and Service Definitions for configuring endpoints.
A merchant has asked their development team to add a new site. Which task is essential for correct site configuration prior to launch?
A. Assign a default currency.
B. Assign a default payment method.
C. Assign a default payment processor.
Explanation
In Salesforce B2C Commerce (SFCC), when creating and configuring a new site, a default currency is an essential part of the site configuration. The currency determines how prices are displayed and how monetary values (product prices, shipping costs, taxes, totals, etc.) are handled for the site.
The default currency is set as part of the site's core configuration (under Administration > Sites > Manage Sites > [Site] > Currencies, or in the site's regional/currency settings). Without a properly assigned default currency:
* Prices cannot be correctly displayed or calculated.
* The storefront cannot properly process monetary values.
* Orders and transactions cannot be completed correctly.
Because currency is fundamental to pricing and monetary calculations across the entire site, assigning a default currency is an essential step for correct site configuration before launch. This makes option A correct.
Why the Other Options Are Incorrect
B. Assign a default payment method.
– A payment method (e.g., credit card, PayPal) is an important part of a functional storefront, but it is not part of the core site configuration in the same fundamental way as currency. Payment methods are configured under Merchant Tools > Site Preferences > Payment Methods and relate to checkout, not to the site's core identity/setup. While payment methods must eventually be configured for a functional store, they are not the essential site-configuration task described here (and a site can technically be created and configured without a payment method being the defining "default" element).
C. Assign a default payment processor.
– Similar to payment methods, a payment processor (the gateway integration) is configured for payment processing and is important for checkout functionality. However, it is not part of the essential core site configuration in the way that currency is. Payment processors are configured separately (under payment settings) and are not the fundamental site-setup element required for the site to be correctly configured. So this is not the essential task described.
Reference
Salesforce B2C Commerce documentation — Sites configuration in Business Manager (Administration > Sites > Manage Sites), specifically the Currency settings that define the site's default currency as part of core site setup. Also see documentation on Payment Methods and Payment Processors as separate checkout-related configurations.
Which of these situations is an appropriate use of the B2C Commerce OCAPIs?
A. Updating inventory information from a warehouse management software.
B. Extending System Object Type definitions with new attributes.
C. Showing the customer ' s information in their B2C Commerce " My Account " page.
Explanation
The Open Commerce API (OCAPI) in Salesforce B2C Commerce is a REST API designed for external systems to integrate with a B2C Commerce instance. It exposes Shop API and Data API resources that allow external applications (e.g., a warehouse management system, ERP, mobile app, or headless front end) to read and write commerce data such as baskets, orders, products, inventory, customers, and more.
A warehouse management system updating inventory is a classic, appropriate OCAPI use case:
* The warehouse system is an external system.
* It needs to push inventory updates into B2C Commerce.
* OCAPI provides resources for this — for example, the Shop API's `/product/*/inventory` resource (real-time per-product inventory) or Data API inventory lists for bulk/back-office inventory management.
This is exactly what OCAPI is built for — external integration. So option A is the correct, appropriate use.
Why the Other Options Are Incorrect
B. Extending System Object Type definitions with new attributes.
– Extending System Object Type definitions (adding custom attributes to system objects) is done through Business Manager (Administration > Site Development > System Object Types) — it is a configuration/metadata task, not an OCAPI operation. OCAPI is for runtime data access/integration, not for modifying the object type schema (metadata). You cannot extend system object definitions via OCAPI. So this is not an appropriate OCAPI use.
C. Showing the customer's information in their B2C Commerce "My Account" page.
– The "My Account" page is part of the native storefront (server-rendered via SFRA controllers and ISML templates using the Script API). It uses the Script API (dw. classes) — not OCAPI — to retrieve and display customer information. OCAPI is intended for external systems integrating with B2C Commerce, not for rendering the native storefront's own pages. The storefront doesn't call OCAPI to display its own account pages; it uses the Script API. So this is not an appropriate OCAPI use case.
Reference
Salesforce B2C Commerce documentation — Open Commerce API (OCAPI), covering its purpose as a REST API for external system integration (Shop API and Data API), including inventory resources for warehouse/back-office systems, and the distinction between OCAPI (external integration) and the Script API (native storefront rendering).
| Salesforce-B2C-Commerce-Cloud-Developer Exam Questions - Home |
| Page 2 out of 31 Pages |