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

Free Salesforce B2C Commerce Developer with SFRA CCD-102 Exam Questions

Last updated: · 11 practice questions with answers and explanations

Page: 1 / 14 Total 207 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: Introduction to SFRA

Skill tested: Configure a local SFRA development workspace and establish a server connection.

A developer joins a team maintaining an SFRA storefront. The source repository contains the storefront cartridges and an `sgmf-scripts`-based workflow, but the developer has not yet deployed or run the code. The team requires local editing, linting, and deployment to a nonproduction B2C Commerce instance without editing cartridge files directly in Business Manager. The instance hostname, code version, and credentials are available. Which approach best establishes the development environment?

Correct Answer: C. Create a local workspace from the SFRA repository, configure the server connection with the instance details and credentials, and use the project workflow to upload cartridges to the selected code version.
Explanation:

A local workspace based on the repository supports source editing and the project's development tools; the server connection supplies the target instance and authentication details used for cartridge upload. Deploying to a selected nonproduction code version keeps development separate from the active production version. Editing deployed files in Business Manager undermines source control and repeatable builds. A storefront URL is not a cartridge upload endpoint, and the production code version is not an appropriate development target.

Question 2

New Single answer

Topic: Cartridges

Skill tested: Determine how cartridge-path order controls storefront implementation and plugin overrides.

A retailer uses a base SFRA storefront and a plugin cartridge that adds wishlist behavior. A custom cartridge contains a replacement wishlist controller and a template override. The plugin must remain available for its other functionality, while the retailer's replacement must take precedence wherever it provides an implementation. The team also wants to avoid copying the plugin's unchanged files into the custom cartridge. Which cartridge-path strategy best meets these requirements?

Correct Answer: B. Place the custom cartridge before the plugin and base cartridges, allowing its matching files to be resolved first while retaining access to the others.
Explanation:

The cartridge path is ordered, and resolution gives precedence to matching resources in cartridges earlier in the path. Putting the custom cartridge first lets its controller and template override the plugin or base implementation while leaving other plugin files available through the remaining path. Placing the base first or relying on later cartridges to override earlier ones reverses the intended precedence. Removing the plugin would discard its unchanged functionality and require unnecessary copying.

Question 3

New Multiple answers

Topic: Controllers

Skill tested: Apply SFRA middleware in controller routes to validate requests and control execution.

A storefront exposes a route that accepts a customer-selected product quantity and then adds the requested product to the basket. A security review requires the route to reject invalid input before basket mutation and to use the SFRA server-side validation pipeline. The existing controller already imports `server`, and its middleware functions are available. Which two implementation choices best satisfy the requirement? Select TWO.

Correct Answer: B. Use route middleware that validates the request parameters and invokes the next middleware only when validation succeeds.; D. Register the route with the input-validation middleware before the basket mutation middleware, so invalid input stops the route before the update.
Explanation:

SFRA controller routes compose middleware in execution order. Validation must run before the operation that changes the basket; a validation middleware can reject the request without calling the next function, preventing the mutation. Performing the update first defeats the security requirement. Templates do not run ahead of controller middleware and should not own request validation or basket operations. A client-side script cannot safely replace server-side validation because requests can bypass the browser.

Question 4

New Multiple answers

Topic: Models

Skill tested: Extend an SFRA model through its documented extension mechanism without altering base cartridge files.

A retailer needs to add a derived delivery-estimate property to product data used by several storefront templates. The value depends on existing product information and must be calculated server-side. The change must survive SFRA upgrades, leave the base product model unchanged, and avoid duplicating controller logic across routes. Which two approaches are appropriate? Select TWO.

Correct Answer: B. Implement the calculation as a model extension and expose the result to templates through the model's returned data.; D. Extend the relevant model through the SFRA model extension mechanism in a custom cartridge and add the derived property there.
Explanation:

An SFRA model extension in a custom cartridge is the upgrade-friendly place to add derived server-side model data. Returning the property from the model makes it available to the templates and routes that consume that model, avoiding duplicated calculations. Editing the base cartridge risks losing the change during upgrades. Reimplementing business logic in each template duplicates logic and mixes presentation with server-side data preparation. A client-controlled cookie is neither a reliable nor authoritative source for product-derived information.

Question 5

New Single answer

Topic: Internet Store Markup Language

Skill tested: Use ISML resource expressions and conditional rendering to localize storefront content.

A storefront page displays a promotional message that differs by locale and should be omitted when the corresponding resource is unavailable. The team stores translated text in resource bundles and wants the template to remain presentation-focused, with no hard-coded language-specific copy. Which implementation is the best fit?

Correct Answer: C. Use an ISML resource expression for the message and an ISML conditional to render the promotional block only when the resource value is available.
Explanation:

ISML resource expressions resolve localized values from resource bundles, while conditional statements can control whether the associated block is rendered. This keeps translated copy out of the template and avoids displaying a missing value. Hard-coded text and client-side substitution duplicate localization logic. Request parameters should not be used as a translation store. Including all translations and hiding most with CSS exposes unnecessary content and does not solve missing-resource handling cleanly.

Question 6

New Single answer

Topic: Content Slots

Skill tested: Configure reusable content slots and select the appropriate slot rendering behavior.

A merchandiser wants a campaign banner on the home page that can be changed in Business Manager without a code deployment. The campaign should be active only during its configured schedule, and the same placement should be available for site-specific campaign content. The development team wants to preserve the storefront template's reusable slot integration rather than hard-code the banner. What should the team do?

Correct Answer: A. Create and configure the appropriate content slot and campaign in Business Manager, then render that slot from the home-page template using the slot integration.
Explanation:

A configured content slot provides a managed placement that merchandisers can populate and schedule through Business Manager, while the template renders the placement through the storefront's slot integration. This separates campaign content from code and supports reuse. Hard-coding the banner requires deployments for changes. A Page Designer component is not automatically a slot or a replacement for slot rendering. A content link provides link-related behavior; it does not itself schedule a complete promotional placement.

Question 7

New Single answer

Topic: Page Designer

Skill tested: Implement a custom Page Designer component with its business-facing configuration and storefront rendering.

A retailer wants marketing users to assemble landing pages from reusable editorial panels. Each panel needs a configurable heading, image, and call-to-action link, while developers must control the rendered markup and ensure the component appears as an available type in the Page Designer editor. The team must avoid allowing marketers to edit arbitrary source code. Which implementation best meets these needs?

Correct Answer: B. Create a custom component type with its component configuration and rendering implementation, then make it available for page assembly in Page Designer.
Explanation:

A custom Page Designer component combines business-configurable attributes with developer-controlled rendering and is registered for use in page composition. This gives marketers the requested fields without granting access to arbitrary code. Direct template editing is unsafe and bypasses Page Designer's business-user workflow. A content slot is a placement mechanism, not an editor for interpreting arbitrary ISML. Requiring marketers to select controller names exposes implementation details and does not provide a reusable configurable component.

Question 8

New Multiple answers

Topic: Forms Framework

Skill tested: Define form metadata and enforce server-side validation before processing submitted form data.

A support request form uses a custom object to store a customer's preferred contact time and a free-text message. The business requires a required-field rule, server-side rejection of malformed submissions, and a localized error displayed in the ISML form. Client-side checks may improve usability but cannot be treated as the security boundary. Which two implementation choices satisfy these requirements? Select TWO.

Correct Answer: B. Define the form fields and relevant constraints in the form XML metadata, and use the framework's form handling in the ISML template.; E. Implement server-side validation for the submitted values before creating or updating the custom object, and return validation errors to the form.
Explanation:

Form XML metadata defines the form structure and constraints consumed by the forms framework, and the ISML template renders the form and its errors. Server-side validation must occur before data is persisted because client-side checks can be bypassed. Browser-only validation is insufficient. ISML markup does not replace the custom object's system-object metadata or form XML definitions. Authentication does not make submitted input trustworthy, and logging is not a substitute for validation.

Question 9

New Single answer

Topic: Hooks

Skill tested: Register and invoke a custom hook through the B2C Commerce hook framework.

A retailer wants to run a custom audit action when a specific storefront operation reaches a defined extension point. The implementation should use the B2C Commerce hook framework so that the calling code remains decoupled from the custom implementation. The team has a custom cartridge and can update its metadata and scripts. Which approach is most appropriate?

Correct Answer: C. Register an implementation for the appropriate hook in the cartridge metadata and invoke that hook from the supported extension point using the hook framework.
Explanation:

The hook framework provides a named extension point and registered implementation, allowing the operation to invoke custom behavior without depending directly on a particular script. Registration in cartridge metadata makes the implementation discoverable, and the supported hook call runs it at the intended point. Direct calls couple controllers to the audit implementation and miss other callers. Browser code is not a trustworthy server-side audit mechanism. A scheduled scan is indirect and does not provide the required operation-time extension.

Question 10

New Single answer

Topic: Open Commerce API (OCAPI)

Skill tested: Distinguish OCAPI Shop and Data API use cases and configure access for the intended client.

An integration team is building two client capabilities. A storefront-facing application must retrieve product and basket information using customer-context operations. A separate back-office integration must update an eligible business object through administrative API operations. The security team requires each client to receive only the permissions required for its API use and rejects using one broad permission set for both. Which configuration approach is best?

Correct Answer: A. Use the Shop API for storefront customer-facing operations and the Data API for the back-office operation, configuring separate, least-privilege OCAPI settings for each client.
Explanation:

The Shop API is designed for storefront commerce operations such as customer-facing product and basket interactions, whereas the Data API supports administrative access to business data. Configuring separate permissions lets each client receive only the resources and methods it needs. Using one API for both use cases either fails to match the operation or risks overbroad access. The Meta API describes API resources and schemas; it is not a substitute for Shop or Data operations.

Question 11

New Single answer

Topic: Jobs

Skill tested: Design a configurable B2C Commerce job flow with reusable steps and parameters.

A retailer needs a nightly job that exports a chosen set of catalog records. Operations staff must be able to change the catalog identifier and output location between environments without editing script source. The export must run as a managed job with a clear sequence and a separately testable processing step. Which design best meets these requirements?

Correct Answer: B. Create a job flow with a job step that invokes the export logic, define the catalog identifier and output location as job parameters, and configure their values for the job.
Explanation:

A B2C Commerce job is configured as a managed flow of steps, and parameters let operators supply environment- or run-specific values without changing source code. Keeping export logic in a job step also supports a clear operational boundary and testing. A storefront controller or ISML template is not an appropriate scheduled batch implementation. Hard-coded values or source-file changes require development and deployment for routine operational configuration changes.