Salesforce Comm-Dev-101 Salesforce Certified B2C Commerce Developer Exam Practice Test
Salesforce Certified B2C Commerce Developer Questions and Answers
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?
Which action should a developer take to resolve the problem of not seeing attributes when creating a custom object?
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?
What is the expected result when the code segment executes with the logger configuration?
Given a NewsletterSubscription custom object that has a key attribute named email of type String, what is the correct syntax to create the NewsletterSubscription custom object?
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?
A client has two B2C Commerce sites in the same instance: one for the U.S. market, the other for the European market. They offer free gift wrapping on a selection of products. For each order, five products can be wrapped in the U.S., but only three products can be wrapped in the European region.
How should a developer allow the merchant to independently adjust this number?
Which method should a developer use to create a service instance that will call a remote web service?
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?
To implement site custom functionality, a developer creates a new cartridge.
Which step should the developer take to ensure their cartridge changes take effect?
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?
Which method is efficient and scalable because it uses the product search index rather than searching the database?
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 developer is importing edits for two different sites into the same sandbox and is provided with four different files.
Which two XML files should the developer import using the site-specific Merchant Tools import modules?
What is the correct format to use for embedding a link to a content page?
Which of these situations is an appropriate use of the B2C Commerce OCAPIs?
A developer is asked to implement a simple call to an authentication-protected REST web service.
Which configuration is valid?
Business Manager has the configuration:
• Active Log category is " root "
• Log level of INFO
The code below executes.
varlog=Logger.getLogger( " products " , " export " );
log.info( " This is important information " );
Using this information, what is the beginning of the filename in which the log will be written?
A developer wants to configure multiple products that should only be sold as a group. It should not be possible for buyers to buy these products individually. How should the developer configure the products?
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?
Given a site called RefArch with the settings shown in the screenshot (ID: RefArch, Name: RefArch, Time Zone: Etc/UTC, Default Currency: US Dollar, Taxation: Net, Customer List: RefArch), what must be done for RefArch to use the same customer list as RefArchGlobal?
A merchant has asked their development team to add a new site.
Which task is essential for correct site configuration prior to launch?
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 client has two B2C Commerce sites in the same instance: one for the U.S. market, the other for the European market. The products they make are sold with different safety certificates based on the world location.
For example, they sell a smartphone with certificate A in the U.S. and certificate B in Europe, a hairdryer with certificate C in the U.S. and certificate D in Europe, and more.
How should a developer allow the merchant to display the appropriate certification logo in the product details page, depending on the customer ' s location?
A developer is using the Script Debugger to troubleshoot an issue. They observe that the debugger is not able to resolve a specific breakpoint on one of the scripts. What is a possible reason for this issue?
A client that sells to multiple countries in Europe needs to disable Apple Pay for Denmark.
Which Business Manager module is used to achieve this requirement?
A developer configures the dw.json file and needs to fill in the necessary parameters to complete the task.
Which parameter is required when using npm scripts?
Given this customer basket information:
• A customer has an existing basket that consists of multiple items.
• One of the items is identified as a gift item by an attribute at the product line item.
• The developer needs to write custom code to fetch the customer basket and then modify the basket based upon the items in the cart. If the basket contains any gift items, modify the basket and create a separate shipment for the gift item.
Four hooks are required to make the modification, beginning with modifyGETResponse and ending with validateBasket.
dw.ocapi.shop.basket.modifyGETResponse
-- missing hook --
-- missing hook --
dw.ocapi.shop.basket.validateBasket
What are the two missing hooks in the middle?
A new product has been added to the Storefront catalog that is assigned to a site.
Which configuration does a developer need to ensure to have a new product visible in the Storefront?
What is the expected result when extending a route without the middleware chain?
A developer customized the Cart-Show controller route with a LINK cartridge that adds social media data. There is a new requirement to add a dataLayer object to the Cart-Show controller route.
How should the developer achieve this to ensure that no code change will be needed if the client decides to remove the LINK cartridge?
Given the requirements:
• To show the washing instructions for a clothing product on a dedicated section of the detail page
• Washing instructions come from the product information manager (PIM)
• To have this attribute available to localize in the Storefront
Which action meets these requirements?
What is the result when the code segment executes with the logger configuration?
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?
The developer created a new Storefront category in storefront-catalog-m-en, but when viewing the Storefront site, the category is not visible.
Why might the categories not be visible?
A developer wants to create a Business Manager extension with the cartridge named plugin_bm_extension.
Which two steps should the developer take for the extension option to show up in Business Manager?
Given a template rendered by a controller with caching and a remote include without caching, which situation applies?
To ensure SFRA best practices and protect against request forgery, the developer introduced CSRF token generation in the customer address form.
< form ... action= " submit " >
< input name= " ${dw.web.CSRFProtection.getTokenName()} "
value= " ${dw.web.CSRFProtection.generateToken()} " >
...
< the rest of the Form Fields >
....
< /form >
To implement CSRF protection when the form is submitted, the developer needs to introduce the CSRF validation using one or both of these methods as applicable:
validateRequest
validateAjaxRequest
Where in the code does the developer need to add this CSRF validation check?
A developer uses hooks for an extension point. Which is true for running multiple hooks for an extension point?
What action meets the requirement to show washing instructions for a clothing product?
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?
How might a developer resolve the issue of low-stock items appearing at the top of search results?
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 has a requirement to display a banner in two different category pages.
Which snippet of code should the developer add to a template to allow the merchant to configure each independently?
A custom cartridge that seemed to be performing well in a sandbox has been installed in production. The production instance is showing increased page load times that seem to be related to the new custom code. What can a developer do to quickly track down the potential problem?
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?