Salesforce B2B Commerce Developer Practice Questions with Explanations
Free Salesforce B2B Commerce Developer practice questions. 21 of them, each with the correct answer, a full explanation, and the reason every other option is wrong.
B2B Commerce Developer practice questions
Question 1
A developer is creating a component to implement a custom Terms and Conditions checkbox at checkout in the Aura Commerce template.
Which method should the developer implement on the Lightning web component to ensure the user accepts the terms and conditions?
- A. Validate
- B. CheckValidity
- C. SaveCheckout
- D. ComponentValidity
Show answer and explanation ▾
Correct answer: A
In the Aura checkout, a custom component implements the Validate method so the checkout can confirm the user accepted the terms before it moves on.
Why the other options are wrong:
- B. CheckValidity is not the checkout step method for this.
- C. SaveCheckout is not the validation method.
- D. ComponentValidity is not a checkout method.
Question 2
An administrator has just provided a developer with a completely new org and a username. Assuming the username is me@my-new-org.org, what is the correct set of steps to authorize the org for Command Line Interface (CLI) access so the developer can deploy Lightning web components?
- A. Run the command ‘sdfx force:auth:web:login-a “https://login.salesforce.com” and then supply the credentials in the browser when it opens.
- B. Run the command ‘sdfx force:auth:web:login-r “https://login.salesforce.com” and then supply the credentials in the browser when it opens.
- C. Run the command ‘sdfx force:auth:web:login-r “https://login.salesforce.com”-username= “me@my-new-org.org”
- D. Run the command ‘sdfx force:login-r “https://login.salesforce.com” and supply the credentials in the browser when it opens.
Show answer and explanation ▾
Correct answer: B
The web login command with the -r option sets the instance URL to https://login.salesforce.com and opens the browser, where the developer enters the credentials.
Why the other options are wrong:
- A. The -a option sets an alias, not the login URL.
- C. The web login flow takes the credentials in the browser, not as a username option on the command.
- D. force:login is not the command for web authorization.
Question 3
How can a developer bring in a checkout flow step to another sequence order?
- A. Reorder step in checkoutSteps.xml
- B. drag and drop subflows in main checkout flow
- C. drag and drop checkout Screens in main checkout flow
- D. Adjust next-state in previous subflow configuration
Show answer and explanation ▾
Correct answer: A
The sequence of checkout steps is defined in checkoutSteps.xml. Moving a step to a different position in that file changes where it runs in the checkout sequence.
Why the other options are wrong:
- B. Dragging subflows in the main checkout flow is not how the step sequence is changed.
- C. Dragging checkout screens in the main checkout flow is not how the step sequence is changed.
- D. Adjusting next-state in the previous subflow is not the way to reorder a step.
Question 4
What are two advantages of using the Lightning Data Service? (Choose two.)
- A. It provides caching
- B. It synchronizes data shared by other base components
- C. It converts between different data formats
- D. It communicates with other components
Show answer and explanation ▾
Correct answer: A, B
Lightning Data Service caches records and keeps data in sync between components that use the same record.
Why the other options are wrong:
- C. Converting between data formats is not a Lightning Data Service benefit.
- D. Communicating with other components is done with events, not Lightning Data Service.
Question 5
What are two ways a developer should modify the out-of-the-box checkout flow template? (Choose two.)
- A. Download the Commerce Flow Example package from AppExchange and use it to modify the checkout flow template.
- B. Clone the checkout flow template in Setup and ensure the context of how the flow is running is correct.
- C. Navigate to the store administration to modify the checkout flow template.
- D. Access the checkout page within Experience Builder to modify the checkout flow template using Flow Builder.
Show answer and explanation ▾
Correct answer: B, D
The checkout flow template is customized by cloning it in Setup, keeping the flow's running context correct, and editing the clone. The flow can also be reached from the checkout page in Experience Builder and changed in Flow Builder.
Why the other options are wrong:
- A. An AppExchange example package is not the way to modify the store's checkout flow template.
- C. Store administration is not where the checkout flow template is edited.
Question 6
Northern Trail Outfitters (NTO) wants to be able to reference historical data in another system from the Salesforce user experience as read-only, but does not want to import the data into the org or incur storage costs.
What is one product feature that could accomplish this?
- A. External SOQL queries In Apex code
- B. Big Objects
- C. Lightning out
- D. External objects
Show answer and explanation ▾
Correct answer: D
External objects, part of Salesforce Connect, map to data that stays in another system. Users see the records in the Salesforce interface, but the data is fetched on demand and is not stored in the org.
Why the other options are wrong:
- A. Apex has no external SOQL query feature that shows outside data in the user experience.
- B. Big Objects store the data inside Salesforce, so it must be imported.
- C. Lightning Out runs Lightning components in outside sites, it does not bring outside data into Salesforce.
Question 7
Which two log levels does a developer need to include to debug platform events? (Choose two.)
- A. Apex Code
- B. Database
- C. Callout
- D. Workflow
Show answer and explanation ▾
Correct answer: A, B
Platform event triggers are Apex, so the Apex Code category captures their execution. The Database category captures the publish and data operations tied to the events, so both are included in the debug log levels.
Why the other options are wrong:
- C. The Callout category logs HTTP callouts, not platform event activity.
- D. The Workflow category logs workflow rules and related automation, not platform event activity.
Question 8
A developer has written the logic to import products from an enterprise resource planning (ERP) platform into B2B storefront products. The imported products are in Salesforce, but they are not visible in the store.
What did the developer forget to assign to the imported products?
- A. Storefront
- B. Entitlement policy
- C. Account
- D. Promotion
Show answer and explanation ▾
Correct answer: A
Products are shown to buyers only in a store they are assigned to. Imported product records that are not linked to the storefront exist in Salesforce but do not appear in the store.
Why the other options are wrong:
- B. An entitlement policy is not the assignment that places the imported products in the store.
- C. Products are not assigned to an account to make them appear in a store.
- D. A promotion affects pricing, not whether a product appears.
Question 9
Which cart item type is created with the Cart Delivery Group Method after the shipping integration?
- A. Surcharge
- B. Delivery
- C. Shipping
- D. Charge
Show answer and explanation ▾
Correct answer: C
After the shipping integration runs and a delivery method is selected for the cart delivery group, the shipping cost is added to the cart as its own cart item for shipping, separate from the product items.
Why the other options are wrong:
- A. Surcharge is not the cart item type created for the delivery method.
- B. Delivery is not the cart item type created for the delivery method.
- D. Charge is not the item type tied to the Cart Delivery Group Method here.
Question 10
Universal Containers (UC) is ready to build a tax provider class using the interfaces available in the Buyer Experience SDK.
When creating a tax provider, what are three things that a developer should consider first? (Choose three.)
- A. What to implement
- B. Steps to complete in the Tax Service
- C. Whether to use JSON or XML
- D. How to handle results
- E. What events to fire in the Lightning web component
Show answer and explanation ▾
Correct answer: A, C, D
Before writing a tax provider, the developer decides what to implement from the available interfaces, which data format the tax service exchanges, JSON or XML, and how the results returned by the service are handled and written back.
Why the other options are wrong:
- B. Steps inside the tax service belong to the external provider, not to the first design decisions for the class.
- E. A tax provider class runs on the server and does not fire Lightning web component events.
Question 11
In a B2B Commerce store, which three tasks must a developer complete to implement the use of a third-party service for either tax, shipping, or pricing calculation? (Choose three.)
- A. Create an Apex class implementing the appropriate interface.
- B. Create a named credential for authentication with an external service.
- C. Create a flow to call the external service directly.
- D. Register an Apex class as the integration in the store administration.
- E. Create an Apex class with an invocable method.
Show answer and explanation ▾
Correct answer: A, B, D
A third-party tax, shipping or pricing service is integrated with an Apex class that implements the matching interface, a named credential that authenticates the callout, and registration of that class as the integration in store administration.
Why the other options are wrong:
- C. A flow that calls the service directly is not part of the store integration framework.
- E. An invocable method is not required, because the integration uses a class that implements the interface.
Question 12
Ursa Major is planning to implement Salesforce B2B Commerce, and a developer needs to configure taxes for their storefront. The company operates in multiple states, each with different tax rates and tax rules.
What are two ways the developer should configure taxes in B2B Commerce? (Choose two.)
- A. Use a different pricebook for each state.
- B. Configure a tax engine using third-party software.
- C. Use the Salesforce out-of-the-box tax calculator.
- D. Configure tax rates and rules for each state in Salesforce B2B Commerce.
Show answer and explanation ▾
Correct answer: B, D
Taxes for a store that sells in several states can be calculated by a third-party tax engine connected as the tax integration, or by tax rates and rules configured for each state in B2B Commerce.
Why the other options are wrong:
- A. Price books set product prices and are not a tax mechanism.
- C. An out-of-the-box tax calculator is not one of the two ways to configure state taxes here.
Question 13
A developer exports data from an org on a standard entity which has a custom attribute.
When they launch Data Loader, select the entity, click the
Select All Fields button and click Finish, the custom field they added called MyCustomField__c has no values and no column header in the CSV file.
What is the root cause?
- A. A mapping file was not used when the data was loaded in
- B. The user needs to install a specific Zulu JDK that is recommended by Salesforce.
- C. The user has rights to the field but there are no values in it
- D. The user does not have access to the field
Show answer and explanation ▾
Correct answer: D
Data Loader only lists and exports fields the logged-in user can read. When a custom field has no column header at all in the export, field-level security is hiding the field from that user.
Why the other options are wrong:
- A. A mapping file is used when loading data in, not when exporting all fields.
- B. The JDK that Data Loader runs on does not decide which fields are exported.
- C. A readable field with no values would still appear as a column header in the file.
Question 14
What are two ways a developer should ensure that a store verifies shipping charges by using an external service? (Choose two.)
- A. Create an Apex class implementing the sfdc_checkout.CartShippingCharges interface to retrieve shipping charges from an external service and register it as the Shipping Calculation Integration in the store administration,
- B. Create a trigger to retrieve shipping charges from an external service and update the Cart Delivery Group Methods.
- C. Create a flow using an action to retrieve shipping charges from an external service and update the Cart Delivery Group Methods.
- D. Create an Apex class to retrieve shipping charges from an external service and update the Cart Delivery Group Methods.
Show answer and explanation ▾
Correct answer: A, D
Shipping charges from an external service are brought in with Apex. A class implementing sfdc_checkout.CartShippingCharges is registered as the Shipping Calculation Integration in store administration, and the Apex retrieves the charges and updates the Cart Delivery Group Methods.
Why the other options are wrong:
- B. A trigger is not the supported way to call the external shipping service during checkout.
- C. A flow action is not how the shipping calculation integration retrieves external charges.
Question 15
While in the process of gathering requirements from a customer about how they would like to set up their net new storefront checkout experience, a consultant learns that the customer needs the ability to add new shipping and billing addresses during checkout.
Which approach should a developer take to meet this requirement?
- A. Enable Buyer Managed Contact Point Addresses within the Shipping Address standard component in the Checkout subflow.
- B. Create a Lightning web component that enables this functionality and replaces the current shipping address screen within the Checkout subflow.
- C. Create a new shipping address checkout subflow that utilizes the Buyer Managed Contact Point Addresses component.
- D. Enable Buyer Managed Contact Point Addresses within Commerce Administration.
Show answer and explanation ▾
Correct answer: A
The standard Shipping Address component in the checkout subflow has a Buyer Managed Contact Point Addresses setting. Enabling it lets buyers add new shipping and billing addresses during checkout without custom development.
Why the other options are wrong:
- B. A custom Lightning web component is unnecessary when the standard component already offers this.
- C. A new subflow is unnecessary when the existing standard component has the setting.
- D. Commerce Administration is not where this setting is enabled.
Question 16
A developer is working in Visual Studio Code on a previously deployed project which is rather large and deployments are time consuming. The developer wants to know if a CSS file containing small changes was actually deployed to the org.
What is one way this can be accomplished?
- A. Right-click the folder for the component and choose Diff Files Against Org
- B. Right-click the folder for the component and choose Diff Styles Against Org
- C. Click the Tools menu and select Diff Styles Against Org
- D. Right-click the CSS file and choose Diff File Against Org
Show answer and explanation ▾
Correct answer: D
The Salesforce extensions for Visual Studio Code add a Diff File Against Org command to a file's right-click menu. It compares the local CSS file with the version in the org, showing whether the small changes were deployed.
Why the other options are wrong:
- A. The comparison needed here is run on the single CSS file, not on the component folder.
- B. There is no Diff Styles Against Org command.
- C. There is no Diff Styles Against Org command in a Tools menu.
Question 17
A developer is on a tight timeline and needs to implement a Lightning web component which can read, create and modify single records.
What is the recommended path forward?
- A. Write custom functions against a wire adapter
- B. Use Lightning Data Service
- C. Create an Apex Controller
- D. Use base components
Show answer and explanation ▾
Correct answer: B
Lightning Data Service lets a Lightning web component read, create and update single records without Apex. It handles sharing and field-level security and keeps a shared cache, which makes it the fastest path on a tight timeline.
Why the other options are wrong:
- A. Writing custom functions against a wire adapter takes more work than the built-in record handling.
- C. An Apex controller means writing and testing server code that is not needed for single records.
- D. Base components on their own are user interface elements, not the recommended data layer named here.
Question 18
A developer is working on a storefront and is seeing unexpected UI behavior in one of the custom Lightning web components (LWCs) their team has built.
How should the developer investigate the issue?
- A. Enable Debug Mode for a storefront user, load the LWC in Visual Studio (VS) Code, attach to session, and view debug logs in VS Code
- B. Enable Debug Mode for a storefront user, log in to the storefront, and use Browser Inspection tools and debugger points
- C. Identify the user, inputs, and failure, then ask Salesforce support to investigate the issue with the custom LWC
- D. Enable debug logs for a storefront user, log in to storefront and perform action, and view debug logs in Setup
Show answer and explanation ▾
Correct answer: B
Lightning web components run in the browser. Enabling Debug Mode for the storefront user serves unminified code, so the developer can log in to the store and use the browser's developer tools and breakpoints to trace the behavior.
Why the other options are wrong:
- A. Client-side component code is not debugged by attaching Visual Studio Code to a session and reading debug logs.
- C. Salesforce support does not investigate a team's own custom component code as the first step.
- D. Debug logs in Setup record server-side activity, not browser interface behavior.
Question 19
A developer is trying to integrate a new shipping provider to use during checkout in a storefront.
Which two steps must the developer take to make an integration available for selection? (Choose two.)
- A. Enter the integration class name and version in the store administration.
- B. Create a RegisteredExternalService record using Workbench.
- C. Create an Apex class that uses the integration framework.
- D. Modify the StoreIntegratedService to map to an Apex class ID using Workbench.
Show answer and explanation ▾
Correct answer: A, C
The developer writes an Apex class that uses the integration framework, then enters the class name and version in store administration. That registers the integration so it can be selected for the store.
Why the other options are wrong:
- B. Creating a RegisteredExternalService record in Workbench is not needed when the class is registered in store administration.
- D. Editing StoreIntegratedService in Workbench is not needed to make the integration selectable.
Question 20
How can a developer introduce new screen behavior in a checkout flow step?
- A. Adjust next-state in previous subflow configuration
- B. Clone the appropriate subflow and replace the Lightning web components in it
- C. Modify the property mappings in checkoutSteps.xml
- D. Edit the default subflow directly
Show answer and explanation ▾
Correct answer: B
New screen behavior in a checkout step is added by cloning the subflow for that step and replacing the Lightning web components on its screen. The standard subflow stays untouched.
Why the other options are wrong:
- A. Changing next-state alters the step sequence, not what a screen does.
- C. Property mappings in checkoutSteps.xml do not add new screen behavior.
- D. The default subflow should be cloned, not edited directly.
Question 21
A developer has the task to create custom Lightning web components (LWCs).
Which two steps must a developer take when creating custom LWCs? (Choose two.)
- A. Clone a LWC.
- B. Create an Apex class.
- C. Deploy a custom component.
- D. Authorize an org for an SFDX project.
Show answer and explanation ▾
Correct answer: C, D
Custom Lightning web components are built in a Salesforce DX project. The developer authorizes an org for the project, then deploys the custom component to that org so it can be used.
Why the other options are wrong:
- A. A new component does not have to be cloned from an existing one.
- B. An Apex class is optional and only needed when the component calls server-side logic.
Get the complete B2B Commerce Developer bank
These 21 questions are roughly 24% of the bank. The full pack has 87 real exam questions, each with the same depth of explanation, plus a questions-only PDF for timed practice and free updates forever.
View the full Salesforce B2B Commerce Developer question bank →
About the B2B Commerce Developer exam
These 21 Salesforce B2B Commerce Developer questions are free here. The free sample PDF has 22.