[Sep-2021] Pass Salesforce B2C-Commerce-Developer Exam in First Attempt Guaranteed!
Full B2C-Commerce-Developer Practice Test and 115 unique questions with explanations waiting just for you, get it now!
NEW QUESTION 68
A Digital Developer needs to add logging to the following code:
Which statement logs the HTTP status code to a debug-level custom log file?
- A. Logger.getLogger('profile').debug("Error retrieving profile email, Status Code: {0} was returned.",
http.statusCode); - B. logger.getLogger('profile').debug("Error retrieving profile email, Status Code: ", http.statusCode);
- C. logger.debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode);
- D. Logger.getLogger().debug("Error retrieving profile email, Status Code: {0} was returned.",
http.statusCode);
Answer: C
NEW QUESTION 69
A merchant has a requirement to sell a combination of four existing products with a unique product ID.
This collection will be known as 'Our Top Combo', and is base don the merchant's trading information that shows this combination to be in high demand.
What does the developer need to do next to fulfill this requirement?
- A. Create a recommendation rule associating the four products as a recommendation group.
- B. Create a Content Slot with Content Type = Product and add the four component products into that slot.
- C. Create a Product Set called 'Our Top Combo' and add the products into the set.
- D. Create a unique produce to called 'Our Top Combo' and add the four products into the Product Bundles tab.
Answer: D
NEW QUESTION 70
A Digital Developer has identified that the code segment below is causing performance problems.
What should the Developer do to improve the code?
- A. Breaks the process into separate loops.
- B. Avoid post-processing and use the isOnSaleFlag attribute as a search refinement.
- C. Use a system attribute instead of the isOnSaleFlag custom attribute.
- D. Avoid using an Iterator and use a Collection instead.
Answer: A
NEW QUESTION 71
A developer needs to check for product inventory in all inventory lists using the Open Commerce API.
An example request URL is:
http://refarch.demandware.net/dw/data/v18_3/inventory_lists/ecom-inventory/ product_inventory_records/00883408601 Which property should the developer check in the OCAPI settings to confirm the appropriate resource is enabled?
- A. client_id
- B. ecom-inventory
- C. methods
- D. resource_id
Answer: D
NEW QUESTION 72
A Digital Developer has a new requirement to disable the "Discover" credit card type for all checkouts. What does the Developer need to change in Business Manager to fulfill this requirement?
- A. Checkout exclusion rules in the Merchant Tools > Site Preferences > Checkout Preferences module.
- B. Credit card exclusion rules in the CreditCardType.json configuration file.
- C. Credit card exclusion rules in the Merchant Tools > Site Preferences > Payment Preferences module.
- D. Credit cards in the Merchant Tools > Ordering > Payment Methods module.
Answer: D
NEW QUESTION 73
A Digital Developer has been given a requirement to add fault tolerance to an existing web service integration that uses Service Framework. Administrators at Universal Containers need to be able to configure the timeout and rate limiting.
Which approach should the Developer use to implement the requirement?
- A. Use the setTimeout method to execute fallback code if the request has NOT completed.
- B. Implement a ServiceUnavailableException exception handler to execute fallback code.
- C. Create a site preference to store timeout settings and implement an IOException handler to execute fallback code.
- D. Implement a condition that checks to see if the response was empty and execute fallback code if true.
Answer: B
NEW QUESTION 74
A Digital Developer is requesting product information for an external integration. The following Open Commerce API (OCAPI) request is NOT functioning correctly:
How should the Developer change the request?
- A. Change the HTTP method to GET.
- B. Change the URI to /dw/shop/v18_3/products/creative-zen-v.
- C. Change the HTTP method to PUT.
- D. Include an authentication token in the request.
Answer: A
Explanation:
Explanation
NEW QUESTION 75
A developer has custom debug statements in a script, but the messages are not showing up in the Storefront Toolkit Request Log.
Which step needs to be completed to get the messages to appear in the Request Log?
- A. In Global preferences, check the box for Enable custom logging in Request Log.
- B. In custom Log Settings, activate the loggin category at DEBUG level.
- C. In Custom Log Settings, check the DEBUG box for Select Log Levels Written to Files.
- D. In Site Preferences, check the box for Enable custom Logging in Request Log
Answer: C
NEW QUESTION 76
The Home-Show route uses this middleware chain:
server.get('Show', consentTracking.consent, cache.applyDefaultCache, function (req, res, next) {
// based code here
});
The developer added Home.jsin another cartridge, which is before the original cartridge in the cartridge path, to extend that route but it does not have the middleware chain:
server.append('Show', function (req, res, next) {
// custom code here
});
Assuming the code is correct on both functions, what is the expected result?
- A. The base code executes, but the custom code is ignored because the signature lines do not match
- B. The custom code executes and then the base code executes
- C. The base code executes and then the custom code executes
- D. A RunTime error is thrown, "Error: Params do not match route"
Answer: D
NEW QUESTION 77
A Digital Developer needs to add a new form to the shopping cart page to allow customers to enter their rewards pass ID. There is already an existing Cart.js controller that handles processing of the other cart forms.
In addition, a form field node is in the form XML and the necessary form input is present in the ISML template.
The code below is the submit button for the ISML markup.
What additional steps must occur before the Digital Developer can begin writing the processing code for this request?
- A. Option D
- B. Option C
- C. Option A
- D. Option B
Answer: B
NEW QUESTION 78
A Digital Developer has been given a specification to integrate with a REST API for retrieving weather conditions. The service expects parameters to be form encoded.
Which service type should the Developer register?
- A. FTP
- B. HTTP Form
- C. WebDAV
- D. SOAP
Answer: B
NEW QUESTION 79
Why should a Digital Developer use ProductSearchModel.getProducts() instead of Category.getOnlineProducts() to access products?
- A. It reduces accesses to the application server.
- B. It is more readable code.
- C. It has fewer lines of code.
- D. It uses the search index.
Answer: A
NEW QUESTION 80
A Digital Developer needs to add logging to the following code:
Which statement logs the HTTP status code to a debug-level custom log file?
- A. Logger.getLogger('profile').debug("Error retrieving profile email, Status Code: {0} was returned.",
http.statusCode); - B. logger.getLogger('profile').debug("Error retrieving profile email, Status Code: ", http.statusCode);
- C. logger.debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode);
- D. Logger.getLogger().debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode);
Answer: C
NEW QUESTION 81
A Digital Developer must resolve a performance issue with product tiles. The Developer determines that the product tiles are NOT being cached for a long enough period.
Which two methods can the Developer use to verify the cache settings for the product tiles? (Choose two.)
- A. View the product list page cache settings provided in the Administration > Manage Sites Business Manager module.
- B. View the cache information provided by the Merchant Tools > Technical Reports Business Manager module.
- C. Enable cache information in the storefront toolkit and view the cache information for the product tile.
- D. Enable the template debugger to verify the cache times for the producttile.isml template.
Answer: A,C
NEW QUESTION 82
Assume the code below is executing:
Business Manager has the configuration:
* Active Log category is "root" with log level of "info." Given this information, what is the beginning of the filename in which the log will be written?
- A. custom-xyz
- B. custominfo-blade
- C. xyz
- D. custom-export
Answer: A
NEW QUESTION 83
A Digital Developer is working on a multi-site realm. A new site requires a different layout for the account landing page. The business logic and data model remain the same. The existing code is in AccountControl.js and accountlanding.isml in the app_storefront cartridge. The app_storefront cartridge contains code for all other business functions. The cartridge path for the new site is currently int_cybersource:int_paypal:app_storefront.
The Developer creates a new cartridge named app_newsite that contains only the accountlanding.isml template for the new site.
Which modification should be made to the new cartridge path?
- A. Set the cartridge path so that app_newsite is after app_storefront.
- B. Set the cartridge path so that app_storefront is before int_cybersource.
- C. Set the cartridge path so that app_newsite is before app_storefront.
- D. Set the cartridge path to include only app_newsite.
Answer: B
NEW QUESTION 84
A Digital Developer has identified that the code segment below is causing performance problems.
What should the Developer do to improve the code?
- A. Breaks the process into separate loops.
- B. Avoid post-processing and use the isOnSaleFlag attribute as a search refinement.
- C. Use a system attribute instead of the isOnSaleFlag custom attribute.
- D. Avoid using an Iterator and use a Collection instead.
Answer: A
NEW QUESTION 85
A Digital Developer is adding support for an additional language other than the default. The locale code for the new language is de.
In which folder should the developer place resource bundles?
- A. templates/resources
- B. templates/de
- C. templates/default/resources
- D. templates/default
Answer: A
NEW QUESTION 86
Which three operations should be done in a controller?
Choose 3 answers
- A. Use the Script API to generate data for the view.
- B. Generate the response as JSON or HTML
- C. Create a plain JavaScript object representing a system object
- D. Use middleware functions when applicable
- E. Use the model needed for the view.
Answer: B,D,E
NEW QUESTION 87
A Digital Developer needs to add logging to the following code.
Which statement logs the HTTP status code to a debug-level custom log file?
- A. logger.getLogger('profile').debug("Error retrieving profile email. Status Code: ", http.statusCode);
- B. logger.debug("Error retrieving profile email. Status Code: {0} was returned.", http.statusCode);
- C. Logger.getLogger('profile,).debug("Error retrieving profile email. Status Code: {0} was returned.",
http.statusCode); - D. Logger.getLoggerO-debugfError retrieving profile email. Status Code: {0} was returned.",
http.statusCode);
Answer: C
NEW QUESTION 88
A developer needs to show only car accessories when shoppers use the search term car accessoriesand exclude technology accessoriesand household accessories.
Given the above requirement, what is the recommended approach using the Search Dictionaries Dashboard?
- A. Create a Common Phrase Dictionary entry: car accessories, NOT household, NOT technology.
Use search mode Exact Match. - B. Create a Synonym Dictionary entry: car accessories, |household, |technology.
Use search mode Exact Match. - C. Create a Common Phrase Dictionary entry: car accessories.
Use search mode Exact Match. - D. Create a Synonym Dictionary entry: car accessories, household, technology.
Use search mode First Word.
Answer: D
NEW QUESTION 89
A Digital Developer is requesting product information for an external integration. The following Open Commerce API (OCAPI) request is NOT functioning correctly:
How should the Developer change the request?
- A. Change the HTTP method to GET.
- B. Change the URI to /dw/shop/v18_3/products/creative-zen-v.
- C. Change the HTTP method to PUT.
- D. Include an authentication token in the request.
Answer: A
NEW QUESTION 90
A Digital Developer needs to add a new form to the shopping cart page to allow customers to enter their rewards pass ID. There is already an existing cart.js controller that handles processing of the other cart forms.
In addition, a form field node is in the form XML and the necessary form input is present in the ISML template.
The code below is the submit button for the ISML markup.
What additional steps must occur before the Digital Developer can begin writing the processing code for this request?
- A. * Add the attribute addtl-fonn-action^'addRewardPaas"1 to the ISML form
* Add the key addRewardPass, with a processing function as a value, to the object passed to the Form.handleActionO method in the cart.3s controller - B. * Add a <submit /> node to the form definition XML with the attribute formid=''addRewardPas3"
* Add the key addRewardPasa, with a processing function as a value, to the object passed to the Form.handleActionO method in the Cart.ja controller - C. * Add an action /> node to the form definition XML with the attribute formid="addRewardFa3s"
* No change to cart.3a controller required - D. * Add an <action /> node to the form definition XML with the attribute formid=''addRewardFaas"
* Add the key addRewardPass, with a processing function as a value, to the object passed to the Form.handleActionO method in the Cart .j* controller
Answer: D
NEW QUESTION 91
A developer wants to add a link to the My Account Page.
What is the correct code to accomplish this?
- A. <a
href="${URLUtils.get('Account-Show')}>${Resource.msg('myaccount','account',request.locale())}</a> - B. <a href="${URLUtils
('Account-Show')}>${ResourceMgr.getPropierties('myaccount','account',null)}</a> - C. <a href="${url.get('Account-Show')}>${Resource.message('myaccount')}</a>
- D. <a href="${URLUtils.url('Account-Show')}>${Resource.msg('myaccount','account',null)}</a>
Answer: D
NEW QUESTION 92
Universal Containers recently completed updates to their storefront shopping cart page. A problem has been discovered since the update. Users are no longer able to submit coupon codes on this page. Additionally, authenticated users who try to add a coupon are logged out.
The following processing code Is found In the carets controller file:
What should the Developer verify to Identify the Issue?
- A. The CSRF cartridge Is included in the site's cartridge path.
- B. The form group has the secure attribute set to true.
- C. The CSRF token Is present In the form and Is being submitted in the request.
- D. The CSRF settings In Business Manager are properly configured.
Answer: C
NEW QUESTION 93
......
Prepare for your Salesforce certification with the updated Real4dumps B2C-Commerce-Developer exam questions: https://drive.google.com/open?id=12meriW4TZZWAv3rnsLR2jKxKoeJDcNiN
Get Latest B2C-Commerce-Developer Dumps Exam Questions in here: https://www.real4dumps.com/B2C-Commerce-Developer_examcollection.html

