B2C Commerce Cloud Developer Free Sample Questions

12 free sample questions100 in the full practice test

Try simulator

Comm-Dev-101 Sample Questions

  1. Question 1

    Intermediate

    B2C Commerce Setup · Cartridge Configuration

    A developer is configuring the cartridge path for a new B2C Commerce site based on the Storefront Reference Architecture (SFRA). The requirement is to override the standard checkout flow with custom logic defined in a cartridge named app_custom_checkout, while ensuring core SFRA functionality remains available for other areas.

    Given the standard SFRA cartridges are app_storefront_base and modules, which cartridge path configuration ensures the custom checkout logic takes precedence?

    Answer and explanation

    Correct answer: D

    In B2C Commerce, the cartridge path is traversed from left to right. To override functionality in app_storefront_base, the custom cartridge app_custom_checkout must be placed to the left of the base cartridge. This ensures that when the system looks for a controller or template, it finds the custom version first.

  2. Question 2

    Beginner

    Application Development · ISML Templates

    A merchant requires a new variation of the Product Detail Page (PDP) that displays a specialized inventory countdown for flash sales. This component should only appear for products assigned to the 'Flash Sale' category. The developer decides to use an ISML template decorator.

    Which ISML tag should be used in the product template to wrap the content with the site's standard look and feel while allowing the specific page content to be injected?

    Answer and explanation

    Correct answer: A

    The tag is specifically designed to wrap the enclosed content with a decorating template (like a layout). The decorating template uses to identify where the inner content should be rendered. simply includes another file and does not provide the wrapping/decorator pattern.

  3. Question 3

    Advanced

    Application Development · Jobs and Scheduling

    During a code review, a Technical Architect notices the following pattern in a scheduled job script intended to export order data to an ERP system:

    var orderIterator = dw.order.OrderMgr.searchOrders('status = {0}', 'creationDate desc', dw.order.Order.ORDER_STATUS_NEW);
    while (orderIterator.hasNext()) {
    var order = orderIterator.next();
    // ... complex processing ...
    }
    

    The job fails with a QuotaExceededException on production when order volume is high. What is the root cause and the correct remediation?

    Answer and explanation

    Correct answer: A

    Iterating through large result sets using searchOrders and hasNext/next keeps objects in memory, eventually hitting the heap quota. OrderMgr.processOrders() is designed for batch processing; it loads objects into memory one by one (or in small batches) and clears them after the callback executes, preventing memory leaks.

  4. Question 4

    IntermediateMultiple answers

    Data Management Using Business Manager Usage · Services Framework

    A developer needs to implement a real-time inventory check against an external SAP system when a user navigates to the cart page. The integration requires a timeout of 2 seconds and must handle 500 status codes gracefully by falling back to cached inventory data.

    Which three components of the Service Framework are essential to configure this integration correctly? (Select THREE)

    Answer and explanation

    Correct answers: B, C, F

    The Service Profile defines functional aspects like timeouts, rate limits, and the circuit breaker capability, which is critical for the 2-second timeout requirement.

    The Service Registry Callback (specifically the createRequest and parseResponse methods in the initialization script) is where the logic for handling the request payload and parsing the 500 error or success response resides.

    The Service Credential stores the URL, username, and password required to connect to the external SAP system.

  5. Question 5

    Intermediate

    Application Development · Caching and Performance

    A developer is creating a new ISML template that includes a remote include to cache a footer element separately from the main page.

    
    

    True or False: The Footer-Show controller endpoint MUST explicitly enable caching (e.g., using response.setExpires()) for the remote include to be cached independently of the parent page.

    Answer and explanation

    Correct answer: A

    True. Remote includes initiate a separate request pipeline. For the result of that request (the footer) to be cached, the controller handling that request must define its own caching policy. If it does not, it will default to not caching, or inherit default behavior which might not be the intended independent cache duration.

  6. Question 6

    Beginner

    Application Development · Localization

    A global brand is rolling out a new site for the Japanese market. They have created a new locale ja_JP. The developer has received a forms_ja_JP.properties file containing the translated labels.

    Where must this file be placed within the cartridge structure to be automatically picked up by the Forms Framework?

    Answer and explanation

    Correct answer: A

    Resource bundles (properties files) used for localization in B2C Commerce are typically placed in the templates/resources folder of the cartridge. The system automatically resolves the correct file based on the current locale.

Register free for 6 more questions

Or unlock all 100 Comm-Dev-101 questions with explanations, timed mode and flashcards.