ExamGecko
Ask Question

Salesforce Certified B2C Commerce Developer Practice Test - Questions Answers, Page 9

List of questions

Question 81

Report
Export
Collapse

Given the requirements:

To integrate with an external web service using HTTP requests.

To create a service for this purpose with the Service framework using the LocalServiceRegistry class. To test the service before the external service provider makes the API available.

Which solution allows the developer to satisfy the requirements?

Create a service and a Sitepreference that induce the service to respond with a mock response using a conditional.
Create a service and a Sitepreference that induce the service to respond with a mock response using a conditional.
Create a service and implement the mockFull callback and set the service mode to mock.
Create a service and implement the mockFull callback and set the service mode to mock.
Create a service and implement the mockFull callback and a sitepreference to enable or disable the mock response.
Create a service and implement the mockFull callback and a sitepreference to enable or disable the mock response.
Create two services, one mock and the real one, and a Sitepreference that enable the mock or the real one.
Create two services, one mock and the real one, and a Sitepreference that enable the mock or the real one.
Suggested answer: C
asked 23/09/2024
Stephen McMahon
33 questions

Question 82

Report
Export
Collapse

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?

Add American Express as a Payment Preference in Site Preferences
Add American Express as a Payment Preference in Site Preferences
Add American Express into the Order settings in Site Preferences
Add American Express into the Order settings in Site Preferences
In Payment Methods, enable American Express as a credit card type
In Payment Methods, enable American Express as a credit card type
In Payment Processor, create American Express as a payment type
In Payment Processor, create American Express as a payment type
Suggested answer: A
asked 23/09/2024
Prakash Varghese
37 questions

Question 83

Report
Export
Collapse

A developer wants to embed a link to a content page from within the body of another content asset.

The target content asset ID is: about-us

Which option represents the correct format to use?

$url('Content-Page', 'cid', 'about-us')$
$url('Content-Page', 'cid', 'about-us')$
$url('Content-Show', 'about-us')$
$url('Content-Show', 'about-us')$
$url('Page-Show', 'about-us')$
$url('Page-Show', 'about-us')$
$url('Page-Show', 'cid', 'about-us')$
$url('Page-Show', 'cid', 'about-us')$
Suggested answer: A
asked 23/09/2024
ajay jaiswal
37 questions

Question 84

Report
Export
Collapse

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.js in 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?

The custom code executes and then the base code executes
The custom code executes and then the base code executes
A RunTime error is thrown, "Error: Params do not match route"
A RunTime error is thrown, "Error: Params do not match route"
The base code executes, but the custom code is ignored because the signature lines do not match
The base code executes, but the custom code is ignored because the signature lines do not match
The base code executes and then the custom code executes
The base code executes and then the custom code executes
Suggested answer: B
asked 23/09/2024
Antonio Carlos Figueiredo Junior
50 questions

Question 85

Report
Export
Collapse

Business Manager has the configuration:

Active Log category is "root" Log level of INFO

The code below executes.

var log = 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?

custom-products
custom-products
products
products
custom-export
custom-export
info-export
info-export
Suggested answer: D
asked 23/09/2024
Casie Clements
37 questions

Question 86

Report
Export
Collapse

A developer adds a file named ControllerA.js in the cartridge named app_custom_new project. The design calls for this new file to extend functionality from ControllerA.js in app_custom_brand_project. The app_custom_brand_project and app_storefront_base cartridges include additional functionality that is required.

Which cartridge path meets the project requirements?

app_custom_new_project:app_storefront_base:app_custom_brand_project
app_custom_new_project:app_storefront_base:app_custom_brand_project
app_custom_new_project:app_custom_brand_project:app_storefront_base
app_custom_new_project:app_custom_brand_project:app_storefront_base
app_storefront_base:app_custom_brand_project:app_custom_new_project
app_storefront_base:app_custom_brand_project:app_custom_new_project
app_custom_brand_project:app_custom_new_project:app_storefront_base
app_custom_brand_project:app_custom_new_project:app_storefront_base
Suggested answer: B
asked 23/09/2024
David Shokrai
37 questions

Question 87

Report
Export
Collapse

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?

The existing category's endpoint to perform a REST call
The existing category's endpoint to perform a REST call
The ProductSearch resource of the Shop OCAPI
The ProductSearch resource of the Shop OCAPI
The iframe of the existing category page
The iframe of the existing category page
The Search-Show Controller URL to perform a web crawl
The Search-Show Controller URL to perform a web crawl
Suggested answer: D
asked 23/09/2024
Andrew Oliphant
36 questions

Question 88

Report
Export
Collapse

An instance has custom logging enabled. The log reaches the file size limit.

What happens in this situation?

The current log file is archived and a new log file is created
The current log file is archived and a new log file is created
The log file is deleted and a new log file is created
The log file is deleted and a new log file is created
Logging is suspended for the day
Logging is suspended for the day
The log file rolls over and the oldest log messages are overwritten
The log file rolls over and the oldest log messages are overwritten
Suggested answer: C

Explanation:

Reference: https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fcontent%2Fb2c_commerce%2Ftopics%2Fsite_development%2Fb2c_understanding_log_files.html

asked 23/09/2024
Rob Kennis
31 questions

Question 89

Report
Export
Collapse

A developer is writing a server side script that needs to maintain state across calls. The persistent information needed includes these items. The current customer

Whether or not the customer is authenticated

The privacy attributes (such as tracking consent or cookie policy)

Which technique should the developer use to maintain state in an efficient and scalable manner that follows best practice?

Use a client-side cookie to store the information for the session duration
Use a client-side cookie to store the information for the session duration
Use the Session class, and its additional class references and attributes, in the B2C Commerce API
Use the Session class, and its additional class references and attributes, in the B2C Commerce API
Use a non-replicable Custom Object to store the information temporarily
Use a non-replicable Custom Object to store the information temporarily
Use an SFRA controller. Because it runs server-side, the state is automatically maintained
Use an SFRA controller. Because it runs server-side, the state is automatically maintained
Suggested answer: A
asked 23/09/2024
Enayat Meer
28 questions

Question 90

Report
Export
Collapse

A developer is asked to improve the maintainability of a page by reducing its code repetition.

What are two techniques the developer should implement to achieve this? (Choose two.)

Implement template decorators paired with replace tags
Implement template decorators paired with replace tags
Embed partial files using ISML expressions
Embed partial files using ISML expressions
Require and render templates with <isscript> tags
Require and render templates with <isscript> tags
Use local template includes
Use local template includes
Suggested answer: B, C
asked 23/09/2024
Morten Sivertsen
30 questions
Total 209 questions
Go to page: of 21
Search

Related questions