Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free Salesforce Accredited B2B Commerce Developer Professional B2B-Commerce-Developer Exam Questions

Last updated: · 14 practice questions with answers and explanations

Page: 1 / 15 Total 221 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: Checkout Flow Development

Skill tested: Customize checkout flow behavior while preserving the standard storefront checkout sequence.

A distributor's storefront uses the standard checkout flow. Buyers must now provide a delivery-site reference before submitting an order. The value must be persisted with the order, and the team wants to retain standard address selection, delivery method, and payment behavior. The existing checkout implementation should be changed as little as possible, and the reference must be available to downstream order processing. Which approach best meets these requirements?

Correct Answer: A. Extend the checkout flow at the appropriate step to collect the reference, persist it to the relevant order data, and leave standard checkout actions intact.
Explanation:

Extending the existing flow at the appropriate point preserves standard checkout behavior while adding the required business data. Persisting the reference with the order makes it available after checkout for downstream processing. Replacing the flow would add unnecessary implementation and maintenance risk. Browser session storage does not reliably persist the value with the order, and placing a delivery reference in payment authorization data misuses the payment integration and does not ensure the order retains it.

Question 2

New Single answer

Topic: Checkout Flow Development

Skill tested: Select checkout extension points that add required data without disrupting standard checkout actions.

A retailer needs a business-buyer tax exemption identifier collected during checkout. The identifier must be validated before order placement, but the storefront must continue using its configured payment integration and standard order submission. The custom validation service is already available to the storefront's server-side code. Which design is most appropriate?

Correct Answer: B. Run validation when the buyer enters the identifier and prevent progression or submission if validation fails, while retaining the standard payment and order-placement actions.
Explanation:

The requirement makes successful validation a prerequisite to placing the order, so validation must block progression or submission when it fails. This can be added without replacing standard payment or order-placement behavior. A nightly check and post-order validation allow invalid orders to be created, violating the requirement. The tax validation service is not a substitute for the payment action, and coupling it to payment processing introduces an unnecessary dependency.

Question 3

New Single answer

Topic: Reference Implementations

Skill tested: Choose supported payment reference actions for authorization and subsequent capture.

A B2B site is implementing a payment provider that authorizes funds during checkout but captures them only after warehouse fulfillment. The existing Commerce payment interface follows the supported payment reference implementation, and the business requires an auditable separation between authorization and capture. Which action sequence best represents this lifecycle?

Correct Answer: B. Authorize the payment during checkout, then capture the authorized amount when fulfillment is ready.
Explanation:

Authorization reserves funds without completing the charge, which supports the stated policy of capturing only after fulfillment. The later capture completes the charge against the authorization. Capturing at checkout reverses the required timing, while authorizing after shipment would leave the order without the intended prior funds reservation. Void and refund actions do not establish the authorization-then-capture lifecycle: a void cancels an authorization, and a refund reverses a completed charge.

Question 4

New Single answer

Topic: Reference Implementations

Skill tested: Use payment reference actions to reverse an authorization when an order is cancelled.

A buyer places an order using a payment method that is authorized at checkout but not yet captured. Before the order is released for fulfillment, an administrator cancels it. The merchant must release the reserved funds without creating a charge or refund, and the implementation must use the payment actions exposed by the reference interface. Which action is appropriate?

Correct Answer: C. Void the authorization.
Explanation:

Voiding is the appropriate action for an uncaptured authorization that should no longer hold funds. It releases the authorization without completing a charge. Capturing and refunding would create unnecessary financial activity and may incur processing costs. A chargeback applies to a disputed completed transaction, not an uncaptured authorization. A negative authorization is not the proper reversal mechanism and is not a supported substitute for voiding.

Question 5

New Multiple answers

Topic: Reference Implementations

Skill tested: Apply the payment reference interface's distinct actions for capture, void, and refund scenarios.

A merchant's payment implementation must support three operational cases: capture an existing authorization after fulfillment, release an authorization when an order is cancelled before capture, and return money after a captured order is accepted back. The team is reviewing its action mapping before release. Select TWO mappings that correctly meet these requirements. Select 2 answers.

Correct Answer: C. Use void to release an authorization that has not been captured.; D. Use refund to return funds from a completed, captured transaction.
Explanation:

A void releases an authorization that has not been captured, while a refund returns money after a charge has been completed; these are the two mappings that match the operational cases. Capturing an authorization after fulfillment is also a valid action in isolation, but the question asks for two mappings and prioritizes the cancellation and return cases described alongside it. Voiding a captured transaction is not the normal reversal action, and refunding an uncaptured authorization confuses two different transaction states.

Question 6

New Multiple answers

Topic: Reference Implementations

Skill tested: Separate payment authorization, capture, and reversal handling across the payment interface.

A developer is integrating a gateway through the supported Commerce payment reference implementation. The storefront must authorize at order submission, capture only when the order is ready to ship, cancel an uncaptured authorization when an order is cancelled, and refund a captured amount for an approved return. The implementation review finds that the developer uses the same gateway operation for cancellation and refunds, and captures immediately after authorization. Select TWO corrections that address the transaction-state errors. Select 2 answers.

Correct Answer: B. Use void for a cancelled transaction that remains authorized and uncaptured.; E. Defer capture until the order reaches the fulfillment event specified by the business process.
Explanation:

Capture must follow the business event that makes the order eligible for charging, so it should occur when the order is ready to ship. If an order is cancelled while the authorization remains uncaptured, voiding releases the hold. Refund is appropriate only after a captured transaction, so it should not be used indiscriminately for authorizations. Capture completes a charge rather than reversing it, and another authorization cannot return funds.

Question 7

New Single answer

Topic: Basic Lightning Web Component Development

Skill tested: Use reactive component state to refresh displayed cart data after checkout-related changes.

A storefront team enhances a Lightning Web Component that displays cart totals. The component initially reads cart data from the Commerce context, but after a buyer changes quantities in a sibling component, the displayed totals remain stale until the page is reloaded. The team wants the smallest change that follows Lightning Web Component data-flow practices and does not add a second independent cart store. What should the developer do?

Correct Answer: A. Subscribe to the appropriate cart data or change notification mechanism and update the component's reactive state when the cart changes.
Explanation:

A component should respond to the Commerce cart's supported data or change-notification mechanism and bind the refreshed value to reactive state. That keeps the displayed totals synchronized without creating a competing source of truth. A module-level copy is not a reliable shared cart store. Continuous polling adds needless network and rendering work, while direct DOM mutation bypasses LWC's rendering model and can be overwritten during a rerender.

Question 8

New Single answer

Topic: Basic Lightning Web Component Development

Skill tested: Preserve standard component accessibility and state behavior when adding storefront interactions.

A product-page enhancement adds a custom quantity selector to an existing LWC. Keyboard-only buyers must be able to change the quantity, screen readers must receive an understandable label, and the selected quantity must continue to update the standard add-to-cart behavior. The team is not authorized to replace the commerce product-detail component. Which implementation is the best fit?

Correct Answer: C. Use an accessible input with an explicit label, keep its value in component state, and pass the updated quantity through the supported product-detail interaction.
Explanation:

An explicitly labeled, keyboard-operable input supports accessibility, and reactive component state allows the selected quantity to be passed through the established add-to-cart interaction. This preserves the existing product-detail component rather than replacing it. Clickable text excludes keyboard interaction unless carefully implemented as controls, direct DOM updates are fragile and do not update the standard action's state, and an unlabeled input is inaccessible and relies on brittle DOM inference.

Question 9

New Single answer

Topic: Basic Lightning Web Component Development

Skill tested: Use LWC event handling and public properties to coordinate a reusable storefront component.

A reusable LWC displays account-specific ordering guidance. The same component is placed on multiple pages, and each page supplies different guidance text. On one page, a buyer action inside the component must notify the containing page to open its existing help panel. The component must not query or modify its parent's DOM. Which design follows LWC component boundaries?

Correct Answer: C. Read the guidance from a public component property and dispatch a custom event that the parent handles to open its help panel.
Explanation:

Public properties allow the containing page to provide instance-specific data, and a custom event gives the child a decoupled way to communicate an action to its parent. The parent remains responsible for its own help panel. A global variable does not provide clean per-instance configuration, DOM traversal violates component encapsulation, and directly invoking a parent's private method creates tight coupling. Local storage and page reloads are unrelated and degrade the experience.

Question 10

New Multiple answers

Topic: Basic Lightning Web Component Development

Skill tested: Apply LWC data binding and lifecycle-safe updates to an existing storefront component.

An existing LWC shows a delivery estimate derived from a public product property. The estimate must update if the containing page supplies a different product, and the component must avoid stale calculations or manual DOM manipulation. A developer proposes calculating the value only once in the component constructor. Select TWO implementation practices that best satisfy the requirement. Select 2 answers.

Correct Answer: D. Recalculate the estimate from the current product data and expose it through template-bound state.; E. Respond to changes in the public property through an appropriate reactive or property-setter pattern.
Explanation:

The component must account for public-property changes after creation, then derive and render the estimate from the current product data. A reactive or setter-based response and template-bound state preserve LWC's data flow. A module-level variable improperly shares state between instances, direct DOM mutation can be lost during rerendering, and public properties can be updated by a containing component.

Question 11

New Single answer

Topic: Advanced Lightning Web Component Development

Skill tested: Design a new LWC with encapsulated state and parent-child communication.

A B2B storefront needs a new LWC that presents a configurable purchasing checklist. A page supplies the checklist items, and the component must report selected item identifiers to the page when the buyer confirms. The component will be reused across several page layouts, and neither side should depend on the other's internal implementation. Which design best supports this requirement?

Correct Answer: C. Expose checklist input as a public property, keep selection state inside the component, and dispatch a custom event containing the confirmed identifiers.
Explanation:

Public properties provide configuration from the containing page, while component-local state encapsulates interaction details. Dispatching a custom event communicates the confirmed identifiers without exposing the child's internal markup or requiring direct access to parent state. Global variables and local storage create fragile shared communication channels. Querying shadow DOM violates encapsulation and makes the page dependent on implementation details that can change.

Question 12

New Single answer

Topic: Advanced Lightning Web Component Development

Skill tested: Build an LWC that handles asynchronous Apex results and surfaces actionable errors.

A custom storefront LWC calls an Apex method to retrieve contract-specific product restrictions before enabling purchase. The request can fail because of access, validation, or transient server errors. The buyer must not be allowed to purchase until a successful response establishes eligibility, and support staff need a useful error message without exposing sensitive server details. Which implementation is most appropriate?

Correct Answer: D. Track loading and eligibility state, keep purchase disabled until success, and show a safe user-facing error while logging diagnostic details through the approved support path.
Explanation:

Eligibility is a prerequisite, so the component should represent the asynchronous request explicitly and keep purchase disabled until a successful result confirms eligibility. A safe message informs the buyer, while diagnostic details can be retained for support without leaking sensitive server information. Enabling purchase before the response or treating errors as eligibility failures open an unsafe path. An unbounded retry loop hides the problem and can overload the service.

Question 13

New Single answer

Topic: Advanced Lightning Web Component Development

Skill tested: Choose a secure and maintainable data-access pattern for a custom storefront LWC.

A developer creates a new LWC that displays a buyer's negotiated account attributes. The component is used in a community storefront, where records are subject to the running user's access permissions. The data must be refreshed when relevant record data changes, and the component should minimize custom server code. Which approach is best?

Correct Answer: C. Use an appropriate Lightning data service or supported wire adapter for the records, respecting access controls and reactive refresh behavior.
Explanation:

A supported Lightning data service or wire adapter is the appropriate choice when it can serve the required records. It reduces custom server code and integrates with platform access controls and reactive data behavior. An Apex method that bypasses sharing and filters in the browser can expose unauthorized data. Hard-coded values are neither secure nor current, and scraping rendered HTML is brittle and bypasses intended data-access patterns.

Question 14

New Single answer

Topic: Advanced Lightning Web Component Development

Skill tested: Optimize LWC rendering by minimizing unnecessary state changes and repeated server requests.

A new storefront LWC renders a large list of eligible products. A buyer can filter by category, but each keystroke currently causes the component to request the full list again and rebuild every row, producing noticeable latency. The source data changes infrequently, and the component must still show current results when the selected category changes. Which improvement is most appropriate?

Correct Answer: C. Fetch the required data through an appropriate reactive data mechanism, retain it in component state, and derive the visible list from the selected category.
Explanation:

When the source data changes infrequently, the component can obtain it through an appropriate data mechanism and filter locally from state as the selected category changes. This avoids repeated server requests and lets LWC update the view through normal reactive rendering. More frequent requests worsen latency and load, direct mutation of rendered rows bypasses LWC state, and a global shared list creates ownership and consistency problems. Removing filtering does not meet the requirement.