Comm-Dev-101 Salesforce Certified B2C Commerce Developer Questions and Answers
A developer needs to render a Page Designer page in JSON format. What is the correct syntax?
The developer is asked to enhance the functionality of an existing controller route by adding information to the response ' s viewData.
How should the developer approach this task while following SFRA best practices?
What should a developer do to ensure that the gift vouchers are always available?
A merchant has a new requirement to accept American Express credit cards on its Storefront. A credit card payment method already exists.
Which step must a developer take in Business Manager to achieve this?
A developer uses the call() instance method of dw.svc.Service to invoke a web service and implemented the callback methods defined by the dw.svc.ServiceCallback class.
Which callback method is required only when invoking a SOAP service?
A merchant uploads an image using the Content Image Upload module of Business Manager.
Which module can the merchant use to display the image on the Storefront?
A developer needs to ensure that a specific product is always available for purchase, regardless of inventory levels. What should the developer do in Business Manager?
The developer needs to add custom category debug logging into the " contact " script, to ensure that a third-party service call responds as expected.
Assuming that the logging configurations for the contact category are correctly in place, which line of code should the developer add in the 06 placeholder to meet this requirement?
01varLogger=require( ' dw/system/Logger ' );
02varservice=dw.svc.LocalServiceRegistry.createService( ' contact.http.submit ' ,options);
03varserviceResponse=service.call(requestJSON);
04
05if(serviceResponse.ok) {
06// Insert logging code here
07}
A developer is asked to periodically create a CSV file in a WebDAV folder to hold the orders information of the last 30 days.
What are the appropriate actions to implement such a requirement?
A developer plans to use the/search_suggestion(Shop API) in a Storefront application and the following property must be set to do so:
suggestion.product.image:view_type
What consideration should the developer keep in mind to ensure that image data is returned correctly as part of search suggestions?
A developer has these requirements for out-of-stock products:
• Save the SKUs of the out-of-stock products that the customer is interested in.
• Save the customer email regardless if the customer is a guest or registered.
• Email the customer when the product is back-in-stock.
Which step should the developer perform as part of the solution to achieve the requirements?
A developer cannot create a custom object in Business Manager because the attributes do not show. The developer can view the object but not the attributes.
Which action should the developer take to resolve the problem?
A client has three different sites with three locales. Two of the sites share a library and one site has a private library.
What does the shared library allow in this context?
A developer needs to display a products list of their " Women Dresses " category in a new web application, independent of their main B2C Commerce site. This custom listing page needs to be styled differently from the existing one, as per marketing requirements. Which B2C Commerce tool should the developer use to collect the necessary information?
How should a developer set up the files before making required edits to the address form?
Recent code changes to an existing cartridge do not appear correctly on a Storefront. The developer confirms that the code is uploaded in the IDE and ensures that the cartridge is associated with the sandbox.
After checking the Storefront site cartridge path, which step should the developer take to troubleshoot this problem?
Given a site called RefArch with the settings shown, what must be done for RefArch to use the same customer list as RefArchGlobal?
A developer needs to perform the same additional checks before completing multiple routes in a custom controller, in order to decide whether to render a template or redirect the user to a different page.
According to SFRA best practices, what is the correct approach to improve code reusability in this scenario?
A developer is asked to implement a simple call to an authentication-protected REST web service.
Which configuration is valid?
What is the expected result when extending a route without the middleware chain?
There are three logging categories: category1, category1.eu, and category1.us. In Business Manager, category1 is enabled for WARN level and no other categories are configured. All custom log targets are enabled.
The code segment below executes.
varlogger=Logger.getLogger( " loggerFile " , " category1.eu " );
logger.warn( " This is a log message " );
What is the result?
A merchant has asked their development team to add a new site.
Which task is essential for correct site configuration prior to launch?
Which is an appropriate use of the < isif > ISML tag that follows B2C Commerce and SFRA best practices?
There is a business requirement that a custom controller in app_custom_my_cartridges invokes the calculateTax function of the dw.order.calculateTax hook that is defined in app_storefront_base. How can the developer implement this call?
A developer has a B2C site and a merchant requirement to add a new locale to it.
What are the steps to enable the locale in the Storefront?
Which ISML tag should a developer use to avoid code repetition in common header and footer layout?
Which method should a developer use to create a service instance that will call a remote web service?
Given a job step configured in the steptype.json that calls a script module, a developer needs to add a custom status code " NO_FILES_FOUND " in the script. The status does not represent an error condition.
Which code snippet completes this requirement?
What action meets the requirement to show washing instructions for a clothing product?
A developer is inspecting the weekly service status report for a critical internally-hosted web service and notices there are too many instances of unavailability.
Which solution can reduce service unavailability?
A merchant has reported that customers are seeing low stock items at the top of their search results, giving them a subpar customer experience and impacting conversion.
How might this issue be resolved to ensure a better customer journey?
What is the expected result when the code segment executes with the logger configuration?
A NewsletterSubscription custom object exists that has a key attribute named email of type String and the following script code.
varCustomObject=
dw.object.CustomObjectMgr.createCustomObject(
' NewsletterSubscription ' ,
newsletterForm.email.value
);
However, the NewsletterSubscription custom object is not persisted. What is a possible reason?
A developer needs to implement a new feature that requires the use of a custom attribute. What is the first step the developer should take?
A developer observed a specific issue in production, which they cannot reproduce in other environments. The developer wants to do a hot fix to one of the ISML pages, which uses the < iscache > tag, to see if that resolves the issue. Which consideration must the developer keep in mind while deploying the hot fix in production?
A developer is working on a new site for the U.S. based on an existing Canadian site. One of the requirements is a change to the address form. The current Canadian form has an < options > list with the correct two-letter abbreviation for the provinces.
The U.S. requirements are to:
Have an < options > list with the correct two-letter abbreviation for the states in place of the province field.
Set the U.S. site locale.
Add the options list field definition to the XML file.
How should the developer set up the files before making the required edits?
A client sells its products in North America, Europe, and Asia, and has a B2C Commerce Site for each of these markets. The client receives three area-specific snippets of analytics code by a third-party provider to insert in the sites.
How should the developer configure an instance to allow the merchant to independently insert and update these snippets?
A retailer notices that the Account Addresses page is showing the wrong shopper ' s address.
Which tool should the developer start with to identify the issue?
There is a business requirement to allow a third-party warehouse management system to update the MySample.com storefront product inventory in real time. The architect decided that this is most easily accomplished by using the Open Commerce API (OCAPI). The developer needs to test the OCAPI settings in their sandbox. Assume the client ID for testing is " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " . What is the correct OCAPI setting for this?
When looking at Custom Object instances for a site, a merchant notices that the creation date is not showing up on the instances in Business Manager.
Where should the developer add this attribute to the Custom Object so it is visible for the merchant to see in Business Manager?
A developer needs to ensure that a specific product is displayed only to customers in a certain region. What is the best approach to achieve this?
What should a developer implement to enhance the functionality of an existing controller route?