ExamGecko
Home Home / Salesforce / Certified B2C Commerce Developer

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

Question list
Search
Search

List of questions

Search

Related questions











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?

A.
Create a service and a Sitepreference that induce the service to respond with a mock response using a conditional.
A.
Create a service and a Sitepreference that induce the service to respond with a mock response using a conditional.
Answers
B.
Create a service and implement the mockFull callback and set the service mode to mock.
B.
Create a service and implement the mockFull callback and set the service mode to mock.
Answers
C.
Create a service and implement the mockFull callback and a sitepreference to enable or disable the mock response.
C.
Create a service and implement the mockFull callback and a sitepreference to enable or disable the mock response.
Answers
D.
Create two services, one mock and the real one, and a Sitepreference that enable the mock or the real one.
D.
Create two services, one mock and the real one, and a Sitepreference that enable the mock or the real one.
Answers
Suggested answer: C

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.
Add American Express as a Payment Preference in Site Preferences
A.
Add American Express as a Payment Preference in Site Preferences
Answers
B.
Add American Express into the Order settings in Site Preferences
B.
Add American Express into the Order settings in Site Preferences
Answers
C.
In Payment Methods, enable American Express as a credit card type
C.
In Payment Methods, enable American Express as a credit card type
Answers
D.
In Payment Processor, create American Express as a payment type
D.
In Payment Processor, create American Express as a payment type
Answers
Suggested answer: A

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?

A.
$url('Content-Page', 'cid', 'about-us')$
A.
$url('Content-Page', 'cid', 'about-us')$
Answers
B.
$url('Content-Show', 'about-us')$
B.
$url('Content-Show', 'about-us')$
Answers
C.
$url('Page-Show', 'about-us')$
C.
$url('Page-Show', 'about-us')$
Answers
D.
$url('Page-Show', 'cid', 'about-us')$
D.
$url('Page-Show', 'cid', 'about-us')$
Answers
Suggested answer: A

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?

A.
The custom code executes and then the base code executes
A.
The custom code executes and then the base code executes
Answers
B.
A RunTime error is thrown, "Error: Params do not match route"
B.
A RunTime error is thrown, "Error: Params do not match route"
Answers
C.
The base code executes, but the custom code is ignored because the signature lines do not match
C.
The base code executes, but the custom code is ignored because the signature lines do not match
Answers
D.
The base code executes and then the custom code executes
D.
The base code executes and then the custom code executes
Answers
Suggested answer: B

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?

A.
custom-products
A.
custom-products
Answers
B.
products
B.
products
Answers
C.
custom-export
C.
custom-export
Answers
D.
info-export
D.
info-export
Answers
Suggested answer: D

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?

A.
app_custom_new_project:app_storefront_base:app_custom_brand_project
A.
app_custom_new_project:app_storefront_base:app_custom_brand_project
Answers
B.
app_custom_new_project:app_custom_brand_project:app_storefront_base
B.
app_custom_new_project:app_custom_brand_project:app_storefront_base
Answers
C.
app_storefront_base:app_custom_brand_project:app_custom_new_project
C.
app_storefront_base:app_custom_brand_project:app_custom_new_project
Answers
D.
app_custom_brand_project:app_custom_new_project:app_storefront_base
D.
app_custom_brand_project:app_custom_new_project:app_storefront_base
Answers
Suggested answer: B

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?

A.
The existing category's endpoint to perform a REST call
A.
The existing category's endpoint to perform a REST call
Answers
B.
The ProductSearch resource of the Shop OCAPI
B.
The ProductSearch resource of the Shop OCAPI
Answers
C.
The iframe of the existing category page
C.
The iframe of the existing category page
Answers
D.
The Search-Show Controller URL to perform a web crawl
D.
The Search-Show Controller URL to perform a web crawl
Answers
Suggested answer: D

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

What happens in this situation?

A.
The current log file is archived and a new log file is created
A.
The current log file is archived and a new log file is created
Answers
B.
The log file is deleted and a new log file is created
B.
The log file is deleted and a new log file is created
Answers
C.
Logging is suspended for the day
C.
Logging is suspended for the day
Answers
D.
The log file rolls over and the oldest log messages are overwritten
D.
The log file rolls over and the oldest log messages are overwritten
Answers
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

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?

A.
Use a client-side cookie to store the information for the session duration
A.
Use a client-side cookie to store the information for the session duration
Answers
B.
Use the Session class, and its additional class references and attributes, in the B2C Commerce API
B.
Use the Session class, and its additional class references and attributes, in the B2C Commerce API
Answers
C.
Use a non-replicable Custom Object to store the information temporarily
C.
Use a non-replicable Custom Object to store the information temporarily
Answers
D.
Use an SFRA controller. Because it runs server-side, the state is automatically maintained
D.
Use an SFRA controller. Because it runs server-side, the state is automatically maintained
Answers
Suggested answer: A

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.)

A.
Implement template decorators paired with replace tags
A.
Implement template decorators paired with replace tags
Answers
B.
Embed partial files using ISML expressions
B.
Embed partial files using ISML expressions
Answers
C.
Require and render templates with <isscript> tags
C.
Require and render templates with <isscript> tags
Answers
D.
Use local template includes
D.
Use local template includes
Answers
Suggested answer: B, C
Total 209 questions
Go to page: of 21