ExamGecko
Home Home / Salesforce / Certified B2C Commerce Developer

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

Question list
Search
Search

List of questions

Search

Related questions











In order to build the SFRA code to a developer sandbox for the first time, which build steps should the developer perform for the site to appear and function as designed?

A.
npm run compile:js, npm run compile:html, npm run clean
A.
npm run compile:js, npm run compile:html, npm run clean
Answers
B.
npm run compile:js, npm run compile:scss, npm run compile:fonts
B.
npm run compile:js, npm run compile:scss, npm run compile:fonts
Answers
C.
npm run compile:js, npm run compile:scss, npm run compile:html
C.
npm run compile:js, npm run compile:scss, npm run compile:html
Answers
D.
npm run compile:scss, npm run compile:html, npm run clean
D.
npm run compile:scss, npm run compile:html, npm run clean
Answers
Suggested answer: B

Explanation:

Reference: https://trailhead.salesforce.com/content/learn/modules/b2c-page-designer-developers/b2c-page-designer-set-up-dev-environment

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.
Change the data type of the attributes
A.
Change the data type of the attributes
Answers
B.
Set the attributes to site-specific replicable
B.
Set the attributes to site-specific replicable
Answers
C.
Create an Attribute Group with the desired attributes in it
C.
Create an Attribute Group with the desired attributes in it
Answers
D.
Sort the attributes in the custom object type
D.
Sort the attributes in the custom object type
Answers
Suggested answer: A

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

var logger = Logger.getLogger("loggerFile", "category1.eu" );

logger.warn("This is a log message");

What is the result?

A.
Logs will be written to the log file with a prefix loggerFile.
A.
Logs will be written to the log file with a prefix loggerFile.
Answers
B.
Logs will not be written.
B.
Logs will not be written.
Answers
C.
Logs will be written to the log file with a prefix customwarn.
C.
Logs will be written to the log file with a prefix customwarn.
Answers
D.
Logs will be written to the log file with a prefix custom-loggerFile.
D.
Logs will be written to the log file with a prefix custom-loggerFile.
Answers
Suggested answer: A

What are two appropriate uses of the <isif> ISML tag that follow B2C Commerce and SFRA best practices? (Choose two.)

A.
Display a section of the page to logged users only.
A.
Display a section of the page to logged users only.
Answers
B.
Show a different <div> tag depending on a pdict Boolean variable.
B.
Show a different <div> tag depending on a pdict Boolean variable.
Answers
C.
Redirect users to the registration page if they are not logged in.
C.
Redirect users to the registration page if they are not logged in.
Answers
D.
Implement involved business logic through conditional statements.
D.
Implement involved business logic through conditional statements.
Answers
Suggested answer: B, D

Explanation:

Reference: https://support.intershop.com/kb/index.php/Display/247F41

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.
Add the creation date to the attributes of the Custom Object.
A.
Add the creation date to the attributes of the Custom Object.
Answers
B.
Mark the existing creation date attribute as visible.
B.
Mark the existing creation date attribute as visible.
Answers
C.
Add the creation date to the attribute group for the Custom Object.
C.
Add the creation date to the attribute group for the Custom Object.
Answers
D.
Assign the current date/time to a new custom attribute, creationDate, via code.
D.
Assign the current date/time to a new custom attribute, creationDate, via code.
Answers
Suggested answer: A

Explanation:

Reference: https://documentation.b2c.commercecloud.salesforce.com/DOC3/index.jsp?topic=%2Fcom.demandware.dochelp%2FScriptProgramming%2FCreatingCustomBusinessObjectsInstance.html

Given the requirements:

To show the washing instructions for a clothing product on a dedicated section 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?

A.
Create a custom attribute on the product system object and set it as localizable.
A.
Create a custom attribute on the product system object and set it as localizable.
Answers
B.
Set the product system object type as localizable.
B.
Set the product system object type as localizable.
Answers
C.
Add a resource file for every locale for which the attribute needs to be translated.
C.
Add a resource file for every locale for which the attribute needs to be translated.
Answers
D.
Add a custom attribute for each locale.
D.
Add a custom attribute for each locale.
Answers
Suggested answer: B

Refer to this example snippet of an ISML template:

<h2>Welcome back, ${pdict.username}.</h2>

The "pdict.username" variable does not print correctly when used in a similar template.

Assuming that the variable is correct in the Controller's "viewData", how should a developer temporarily modify their code to use a debugger and troubleshoot the issue in the template?

A.
Add an <isbreak> tag to have the debugger stop at the desired line.
A.
Add an <isbreak> tag to have the debugger stop at the desired line.
Answers
B.
Add an <isscript> tag and JavaScript with a breakpoint set.
B.
Add an <isscript> tag and JavaScript with a breakpoint set.
Answers
C.
Add a local <isinclude> tag to inspect the topLevel function in the call stack.
C.
Add a local <isinclude> tag to inspect the topLevel function in the call stack.
Answers
D.
Add an <isdebug> tag to allow the inspection of global variables.
D.
Add an <isdebug> tag to allow the inspection of global variables.
Answers
Suggested answer: C

A developer is given the requirement to add a step to the existing business logic of the registration process.

How should the developer modify the route that handles the customer registration?

A.
Copy the code from the original route to a new controller route, and change it.
A.
Copy the code from the original route to a new controller route, and change it.
Answers
B.
Override the route with new functionality.
B.
Override the route with new functionality.
Answers
C.
Extend the route with new functionality.
C.
Extend the route with new functionality.
Answers
D.
Change the controller route with new functionality.
D.
Change the controller route with new functionality.
Answers
Suggested answer: C

A developer receives a product image that needs to be uploaded to the catalog.

What should the developer use to upload this image?

A.
Products & Catalogs module of Business Manager
A.
Products & Catalogs module of Business Manager
Answers
B.
Sites/Impex WebDAV Directory
B.
Sites/Impex WebDAV Directory
Answers
C.
Content Image Import module of Business Manager
C.
Content Image Import module of Business Manager
Answers
D.
Site Development Import & Export module of Business Manager
D.
Site Development Import & Export module of Business Manager
Answers
Suggested answer: C

Explanation:

Reference: https://trailhead.salesforce.com/en/content/learn/modules/b2c-import-export/b2c-configure-import-export

A developer is asked to create a controller endpoint that will be used in a client-side AJAX request. Its purpose is to display updated information to the user when the request is completed, without otherwise modifying the appearance of the current page.

According to SFRA practices, which method best supports this objective?

A.
res.json()
A.
res.json()
Answers
B.
res.render()
B.
res.render()
Answers
C.
res.print()
C.
res.print()
Answers
D.
res.log()
D.
res.log()
Answers
Suggested answer: B

Explanation:

Reference: https://www.beeit.rs/blog/getting-started-with-controllers-models-and-decorators-sfcc

Total 209 questions
Go to page: of 21