Salesforce-B2C-Commerce-Cloud-Developer Practice Test
Updated On 18-Sep-2025
202 Questions
A Digital Developer added a file named MyBusinessController.js in the cartridge named app_project. The project design calls for this new file to override MyBusinessController.js in client_project. The client_project cartridge contains other necessary functionality. Additional functionality is also included in the storefront_core and storefront_controllers cartridges. Which cartridge path meets the project requirements?
A. client_project:app_project:storefront_controllers:storefront_core
B. app_project:storefront_controllers:storefront_core
C. app_project:client_project:storefront_controllers:storefront_core
D. storefront_core:storefront_controllers:client_project:app_project
Explanation:
🧠 Goal of Cartridge Path Ordering
The cartridge path determines override priority. When multiple cartridges contain a file with the same name and location, the cartridge listed first in the path takes precedence.
In this case:
MyBusinessController.js exists in both app_project and client_project
You want app_project to override the file in client_project
However, client_project still needs to be present for its other functionality
✅ Option C Explained
app_project:client_project:storefront_controllers:storefront_core
app_project comes first → takes override priority for the controller
client_project still included → retains access to its other logic/components
storefront_controllers and storefront_core are appended for base functionality
This satisfies all the requirements:
Override works ✅
Nothing gets lost ✅
Execution sequence respects dependency order ✅
❌ Why the Other Options Fail
A. client_project:app_project:storefront_controllers:storefront_core
❌ client_project comes before app_project → override fails
B. app_project:storefront_controllers:storefront_core
❌ client_project is missing entirely → breaks needed functionality
D. storefront_core:storefront_controllers:client_project:app_project
❌ Lowest priority given to app_project → override fails
📘 Reference:
From Salesforce B2C Commerce Developer Guide:
“When a file exists in multiple cartridges, the version in the cartridge that appears first in the cartridge path is the one used. Ordering is crucial when overriding logic across multiple cartridges.”
🧩 Exam Tip
Override logic is frequently tested. Keep a reusable snippet in your notes:
Cartridge Override Logic
Order matters: First listed cartridge wins
Include all required cartridges for functionality
Override + dependency? Place override cartridge first
A Digital Developer noticed that cartridges in their workspace are NOT executing. The Developer confirms that the cartridges are uploaded to the B2C Commerce server connection’s target version directory. Which action potentially solves this problem?
A. Set the active code version to use the latest compatibility mode.
B. Remove invalid characters from the code version’s name.
C. Remove invalid characters from cartridge file and folder names.
D. Set the server connection’s target version directory to the active code version.
Explanation:
The issue is that cartridges are uploaded but not executing, even though they are in the target version directory. This typically happens when the active code version (the version currently running on the site) does not match the server connection’s target directory. Here’s the breakdown:
Root Cause:
B2C Commerce executes cartridges from the active code version, not just any uploaded directory.
If the server connection’s target version directory (where cartridges are uploaded) is not set as the active version, the code won’t run.
Solution:
The Developer must ensure the target version is activated in Business Manager (Administration > Site Development > Code Deployment).
Why Not the Other Options?
A. Set the active code version to use the latest compatibility mode
Compatibility mode affects script interpretation (e.g., ES5 vs. ES6), but won’t fix missing execution due to incorrect version activation.
B. Remove invalid characters from the code version’s name
While invalid characters can cause issues, the problem here is code version activation, not naming.
C. Remove invalid characters from cartridge file and folder names
Invalid filenames could prevent uploads, but since cartridges are already uploaded, this isn’t the issue.
Exam Relevance:
Tests understanding of code deployment workflow in B2C Commerce.
Key concept: Active code version vs. target directory.
Reference:
Salesforce Help: Code Deployment
Universal Containers created a site export file from staging in the global export directory. How should the Digital Developer update their sandbox using this staging site export file?
A. Perform a data replication from staging.
B. Use the Site Development >SiteImport & Export Business Manager module.
C. Download the site export file and use UX Studio to transfer the data to the sandbox.
D. Use the Site Development > Import & Export Business Manager module.
Explanation:
The scenario involves a site export file created from the staging environment, located in the global export directory, and the task is to update the sandbox environment with this file. In Salesforce B2C Commerce, a site export file typically contains site configuration, content, and data (e.g., catalogs, price books, or site settings) used to replicate or transfer site data between instances (e.g., staging to sandbox). Let’s evaluate each option to determine the best approach:
A. Perform a data replication from staging.
Explanation: Data replication in Salesforce B2C Commerce refers to the process of synchronizing data between instances (e.g., staging to production or staging to sandbox) using the replication functionality in Business Manager. Replication is typically used for database-level synchronization of specific data types (e.g., products, inventories, or orders) and requires the instances to be configured for replication. However, the question specifies a site export file, which is a file-based export (usually a ZIP file containing XML or other data) created via the site export process, not a direct database replication.
Why it’s incorrect: Data replication does not involve site export files. It’s a separate process that synchronizes database content directly between instances, not through exported files. The question focuses on using a specific export file, making replication irrelevant here.
Reference: The Data Replication Documentation explains replication as a database synchronization process, distinct from file-based site imports/exports.
B. Use the Site Development > Site Import & Export Business Manager module.
Explanation: In Salesforce B2C Commerce, the Site Import & Export module under Site Development in Business Manager is specifically designed to handle site export and import operations. A site export file (typically a ZIP file) contains site-specific data, such as catalogs, content, site preferences, and configurations. To update a sandbox with a staging site export file, the Digital Developer would:
Access the sandbox instance’s Business Manager.
Navigate to Site Development > Site Import & Export.
Upload the site export file from the global export directory (or a local copy if downloaded).
Run the import process to apply the site data to the sandbox. This process ensures that the sandbox is updated with the staging environment’s site configuration and data, aligning with the question’s requirements.
Why it’s correct:The Site Import & Export module is the standard tool for handling site export files in B2C Commerce. It directly supports importing ZIP files created via the export process, making it the most appropriate method for updating the sandbox with the staging site’s data. This approach is file-based and does not rely on direct database replication or external tools like UX Studio.
Reference: The Site Import & Export Documentation details the process of importing and exporting site data using the Business Manager module, confirming its use for this scenario.
C. Download the site export file and use UX Studio to transfer the data to the sandbox.
Explanation: UX Studio (now part of Salesforce Commerce Cloud’s development tools, often referred to as Salesforce Commerce Cloud UX or integrated with Visual Studio Code extensions) is primarily used for developing and managing storefront code, such as cartridges, templates, and scripts. While UX Studio supports WebDAV for transferring files (e.g., cartridges or static assets), it is not designed for importing site export files, which contain site data like catalogs or configurations. Site export files are processed through the Business Manager’s Site Import & Export module, not through development tools like UX Studio.
Why it’s incorrect: UX Studio is not the appropriate tool for handling site export files. It’s used for code development and deployment, not for importing site data (e.g., catalogs or site settings). Using UX Studio to transfer a site export file would not apply the data to the sandbox’s database or configuration, as it lacks the functionality to process these files.
Reference: The UX Studio Documentation focuses on code development and WebDAV for file transfers, not site data imports.
D. Use the Site Development > Import & Export Business Manager module.
Explanation: This option is similar to option B but uses slightly different terminology (“Import & Export” instead of “Site Import & Export”). In Salesforce B2C Commerce, the correct module name in Business Manager is Site Import & Export under Site Development. There is no module explicitly named “Import & Export” in this context. The Data Import & Export module exists under Administration, but it’s used for importing/exporting specific data types (e.g., catalogs, price books) in XML/CSV format, not for full site export files, which include broader site configurations.
Why it’s incorrect: The terminology “Import & Export” is imprecise and likely refers to the Data Import & Export module, which is not suited for processing full site export files. The Site Import & Export module (option B) is the correct tool for handling site export ZIP files, as it supports the comprehensive import of site data and configurations.
Reference: The Data Import & Export Documentation clarifies its use for specific data types, not full site exports, unlike the Site Import & Export module.
Why Option B is the Best Choice:
Purpose of Site Import & Export: The Site Import & Export module in Business Manager is explicitly designed to handle site export files, which are ZIP files containing site configurations, content, and data (e.g., catalogs, price books, site preferences). This aligns perfectly with the question’s requirement to update the sandbox using a site export file from staging.
Process Simplicity: The developer can upload the site export file directly in Business Manager (via Site Development > Site Import & Export) without needing external tools like UX Studio or database replication.
Global Export Directory: The global export directory is accessible via WebDAV or Business Manager, and the Site Import & Export module supports importing files from this location (or a local copy if downloaded).
Standard Practice: Using the Site Import & Export module is the recommended approach in Salesforce B2C Commerce for transferring site data between instances, as outlined in the official documentation.
Steps to Update the Sandbox:
Access the Site Export File:
If the file is in the global export directory, the developer can download it via WebDAV (using a WebDAV client) or access it directly if it’s shared between instances.
Alternatively, the file may already be available in the sandbox’s Business Manager if the global export directory is configured for access.
Log into Sandbox Business Manager:
Navigate to Site Development > Site Import & Export.
Upload and Import:
Select the site export file (ZIP format) from the global export directory or a local copy.
Configure import settings (e.g., overwrite existing data or merge) as needed.
Run the import process to update the sandbox with the staging site’s data.
Verify the Import:
Check the sandbox to ensure the site data (e.g., catalogs, content, settings) matches the staging environment.
Additional Notes:
File Location: The global export directory is typically a WebDAV-accessible folder (/impex/src/export) where site export files are stored. The developer may need WebDAV credentials to retrieve the file if it’s not directly accessible in the sandbox’s Business Manager.
Import Considerations: Site imports overwrite or merge data based on settings. The developer should review the import options to avoid unintended data loss (e.g., preserving sandbox-specific customizations).
Permissions: The developer needs appropriate Business Manager permissions (e.g., access to Site Development) to perform the import.
Version Compatibility: Ensure the staging and sandbox instances are on compatible versions of Salesforce B2C Commerce to avoid import errors, as noted in the Site Import & Export Documentation.
Conclusion:
The correct action is B. Use the Site Development > Site Import & Export Business Manager module, as it is the standard and most efficient method for updating a sandbox with a site export file from staging. This approach leverages the dedicated Business Manager module designed for site data imports, ensuring the sandbox is updated accurately without relying on replication or development tools like UX Studio.
A Digital Developer wants to selectively retrieve products and process them from an iPhone. Which action should the Developer take, given that JavaScript controllers CANNOT be used?
A. Use import/export in Business Manager.
B. Create a webservice to retrieve products.
C. Use OCAPI and invoke it in native language.
D. Use WebDAV Client to retrieve products.
Explanation:
Since the question states that JavaScript controllers CANNOT be used, the developer must rely on other APIs provided by Salesforce B2C Commerce Cloud for retrieving product data from a mobile device like an iPhone.
Let’s examine the options:
🔹 Option A: Use import/export in Business Manager
This is not suitable for real-time or selective product retrieval.
Import/export is meant for bulk operations, usually done offline or during deployment cycles.
It doesn't provide a dynamic interface for a mobile app to fetch specific product data.
🔴 Incorrect
🔹 Option B: Create a webservice to retrieve products
While this sounds like a viable approach, Salesforce B2C Commerce Cloud does not allow arbitrary custom webservices outside of JavaScript controllers, and the question specifically restricts their use.
Additionally, B2C Commerce is a hosted platform, so deploying a custom web service server-side is not natively supported unless you use the platform's exposed APIs.
🔴 Incorrect
🔹 Option C: Use OCAPI and invoke it in native language
Open Commerce API (OCAPI) is the correct solution here.
OCAPI has two major components:
Shop API (for storefront interactions)
Data API (for backend data manipulation)
From an iPhone app, the developer can use OCAPI Shop API endpoints to retrieve product details over HTTPS.
The API can be called using the iOS native language (like Swift), and responses are in JSON.
✅ Correct Answer
📚 Reference:
Salesforce B2C Commerce - OCAPI Shop API
Example: GET /s/-/dw/data/v21_3/products/{product_id}
🔹 Option D: Use WebDAV Client to retrieve products
WebDAV is used primarily for uploading/downloading code and static assets, such as cartridges or content assets.
It is not used to retrieve product data and is not suitable for real-time access from a mobile application.
🔴 Incorrect
🧠 Summary:
When a mobile client like an iPhone app needs to selectively retrieve product data and JavaScript controllers are not an option, the best solution is to use OCAPI, specifically the Shop API, and invoke it using the native language of the mobile platform.
Which object type can a developer importusing the Merchant Tools > Import $ Export module in Business Manager?
A. Images and other static assets
B. Content slots
C. Products
Explanation:
📦 Why "Products" Can Be Imported via Business Manager
In Salesforce B2C Commerce, the Merchant Tools > Import & Export module is specifically designed for importing and exporting structured business data like:
Products
Categories
Price books
Inventory lists
Customer data
Promotion configurations
Catalogs
You can import product data using XML, CSV, or Excel formats via:
Merchant Tools > Products and Catalogs > Import & Export
This allows bulk creation, update, or deletion of product attributes, assignments, online status, availability, etc.
❌ Why A & B Are Incorrect
A. Images and other static assets
Managed via WebDAV, not Business Manager’s Import & Export — images are uploaded to specific folders, not imported as objects
B. Content slots
These are part of content assets or page designer structures, and aren’t directly importable through this module — managed via Content tools or custom deployments
🔗 Reference:
“Use Import & Export to load product catalogs, inventory, and business configurations. Static assets like images are uploaded separately via WebDAV.” — Salesforce B2C Commerce | Data Management Guide
📖 Import & Export Overview
Salesforce-B2C-Commerce-Cloud-Developer Exam Questions - Home |
Page 2 out of 41 Pages |