Last Updated On : 7-Apr-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 merchant has complained to the developers that some products are not appearing in the
storefront and has asked them to diagnose and solve the issue.
Which two factors might be causing a product to be hidden?
Choose 2 answers
A. Product has been set to searchable.
B. Product lacks a price.
C. Product does not have any images.
D. ProductAvailable to sell is <1.
E. Product is not online.
E. Product is not online.
Explanation:
When diagnosing why products are not appearing in the storefront in Salesforce B2C Commerce Cloud, developers must consider the conditions required for a product to be visible to customers. Two critical factors are pricing and the online flag.
Why B (Product lacks a price) is Correct:
A product must have a valid price assigned in the catalog to be displayed in the storefront. Without a price:
- The system cannot calculate totals or display the product in search results or category listings.
- Even if the product is marked as searchable or online, it will remain hidden because pricing is a mandatory attribute for commerce functionality.
This is a common issue when merchants forget to assign prices during catalog imports or when price books are misconfigured.
Why E (Product is not online) is Correct:
The online flag determines whether a product is available for display in the storefront. If this flag is set to false:
- The product will not appear in search results, category listings, or product detail pages.
- This is often used by merchants to temporarily hide products (e.g., seasonal items or products under review).
Thus, ensuring the product is marked as online is essential for visibility.
Why the Other Options Are Incorrect:
A (Product has been set to searchable): Being searchable only affects whether the product can be found via search queries. It does not control storefront visibility. A product can be searchable but still hidden if it lacks a price or is not online.
C (Product does not have any images): Images are recommended for customer experience but not mandatory for visibility. Products without images can still appear in the storefront.
D (Product Available to Sell < 1): ATS (Available to Sell) affects whether a product can be purchased, not whether it is displayed. Products with ATS = 0 can still appear but will show as “Out of Stock.”
References:
Salesforce B2C Commerce Cloud Documentation: Product Setup and Visibility
Salesforce Help: Product Online Flag and Pricing Requirements
Adeveloper cannot create a custom object in Business Manager because the attributes do
not show. The developer can view the object but not the attributes.
Which action should the developer take to resolve the problem?
A. Change the data type of the attributes.
B. Create an attribute Group with the desired attributes in it.
C. Set the attributes to site-specific replicable.
Explanation:
Why This Answer Is Correct:
In B2C Commerce's Business Manager, custom object definitions are composed of custom attributes. However, these attributes are not directly visible or manageable on the custom object until they are organized into an Attribute Group. Attribute Groups act as containers or tabs that hold a collection of attributes, providing the UI structure for data entry and display. If a developer has created custom attributes but cannot see them when trying to create or edit an instance of the custom object, the most common reason is that the attributes have not been assigned to any Attribute Group.
To resolve this, the developer must:
- Navigate to Administration > Site Development > Custom Objects.
- Select the object definition.
- Go to the Attribute Groups tab.
- Create a new Attribute Group (e.g., "General Information") and assign the existing custom attributes to this group.
Once this is done and saved, the attributes will appear within that group's section when creating or editing a custom object record. This is a fundamental step in the setup process that is often overlooked.
Why the Other Options Are Incorrect:
A. Change the data type of the attributes:
The data type (string, number, date, etc.) of an attribute does not affect its visibility in the Business Manager UI for data entry. An attribute with an incorrect data type would still be visible; it would just cause validation errors when an inappropriate value is entered. Changing the data type is unrelated to the symptom of attributes not appearing at all.
C. Set the attributes to site-specific replicable:
The "site-specific" and "replicable" flags control the scope and distribution of custom object data across a multi-site realm. They determine whether an attribute's value is unique per site and whether it is copied between sandboxes. These settings do not govern the UI visibility of the attribute within a single site's Business Manager. An attribute that is not site-specific or not replicable will still appear in the UI.
Reference:
Salesforce B2C Commerce Business Manager Guide: "Defining Custom Objects and Attributes."
The documentation outlines the sequential process:
1. Define the custom object.
2. Define its custom attributes.
3. Create attribute groups and assign attributes to them.
It emphasizes that attributes must be in a group to be displayed.
A developer is asked to implementa 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'sendpoint in a .properties file
Explanation:
Secure Configuration for Authenticated Web Services
When implementing an authenticated REST web service call in Salesforce B2C Commerce, the Service Framework relies on service credentials to manage sensitive data like usernames, passwords, tokens, and authentication headers.
✅ Option A: Add the authentication password to the service credentials
Correct and secure
In Business Manager, under:
Administration > Operations > Services > Credentials
the developer configures:
Username
Password
Additional headers or tokens if needed
These credentials are linked to a service profile, which is then tied to the actual service.
Avoids hardcoding sensitive data in scripts or templates.
📌 This method ensures separation of concerns and keeps authentication flexible across environments (sandbox, staging, production).
❌ Option B: Configure authentication username using a site preference
Incorrect
Site preferences are meant for site-specific business settings, not authentication for external services.
Storing credentials here is not secure, not encrypted, and not intended for use in service logic.
❌ Option C: Insert the service’s endpoint in a .properties file
Partially relevant, but not the right answer for authentication
.properties files can contain endpoint URLs or configuration flags, but:
They’re not suitable for storing credentials
They don't participate in the secure credential flow for service invocations
🔗 Reference:
“Credential information for authentication-protected services must be configured in the Credentials module and linked to the service profile.” — Salesforce B2C Commerce | Service Framework Guide
📖 Service and Credentials Setup
A controller route in the SFRA base looks as follows:

In order to extend this route using prepared ( ), what should the developer consider?
A. Specifyany middleware functions needed for the new functionality.
B. Specify any middleware functions needed for the new functionality using only those called by thebase route.
C. Remove next ( ); on the new route so only the route's middleware functions execute.
Explanation:
In SFRA, the server module provides methods like append(), replace(), and prepend() to modify existing routes in the base cartridge. When a developer uses server.prepend('Route-Name', ...), they are inserting custom logic before the original base route logic executes.
Middleware Chains:
Every route in SFRA is essentially a chain of middleware functions. When you prepend to a route, you are creating a new, longer chain. The functions you provide in your cartridge will run first. A critical consideration here is that you must explicitly include any middleware (like server.middleware.https or userLoggedIn.validateLoggedIn) that your new logic requires.
Passing Execution with next():
The most important rule when prepending is to ensure that your custom function ends with a call to next(). This passes control to the next function in the chain (which would be the original base route logic). If you fail to call next(), the base route logic will never run, and the request will hang or result in an incomplete response.
Why B and C Are Wrong:
You are not limited to using the same middleware as the base route (B); you should use whatever is necessary for your specific addition. Removing next() (C) would stop the execution entirely, which defeats the purpose of extending a route and instead turns the prepend into an accidental replace.
References:
Salesforce Developers: Extending Controllers and Middleware
B2C Commerce Infocenter: Middleware - prepend()
A developer configures the dw.json file and needs to fill in the necessary parameters to
complete the task.
Which threeparameters are required when using npm scripts?
Choose 3 answers
A. Usemame/Password
B. Code Version
C. Hostname
D. Site ID
E. CSRF Token
C. Hostname
D. Site ID
Explanation:
When configuring the dw.json file for use with npm scripts in Salesforce B2C Commerce, the required parameters are B. Code Version, C. Hostname, and D. Site ID. These settings enable the npm scripts (e.g., upload, deploy) to connect to the correct instance, target the appropriate site, and use the specified code version for deployment or other operations.
Reasoning:
dw.json Configuration: The dw.json file is used by the B2C Commerce CLI (via npm scripts) to define connection and deployment settings for interacting with a sandbox or instance.
Required Parameters:
B. Code Version: Specifies the code version (e.g., version1) to deploy or activate. This is mandatory to ensure the correct codebase is used during operations like npm run deploy.
C. Hostname: Defines the instance hostname (e.g., dev01-001.demandware.net) to connect to the B2C Commerce environment. This is essential for establishing the API connection.
D. Site ID: Identifies the target site (e.g., RefArch or SiteGenesis) for the operation. This is required to scope the deployment or action to the correct site.
Example dw.json:
{
"hostname": "dev01-001.demandware.net",
"code-version": "version1",
"site-id": "RefArch",
"username": "admin",
"password": "password"
}
Optional Parameters:
A. Username/Password: These are used for authentication but are not always required if credentials are managed separately (e.g., via environment variables or a credentials file). They are optional in dw.json if other authentication methods are configured.
E. CSRF Token: This is not a parameter in dw.json; it’s an internal security token used during API requests but handled automatically by the CLI, not manually specified.
Reference:
Salesforce B2C Commerce Documentation: CLI Configuration lists required and optional dw.json parameters.
Trailhead Module: “B2C Commerce Developer” module on “Development Tools” covers npm script setup.
Exam Tip:
For the Salesforce B2C-Commerce-Developer exam, know that dw.json requires hostname, code-version, and site-id for npm script operations. Be cautious of distractors like CSRF Token (not configurable) or Username/Password (optional).
| Salesforce-B2C-Commerce-Cloud-Developer Exam Questions - Home | Previous |
| Page 6 out of 41 Pages |