Labour Day Sale - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: mxmas70

Home > Salesforce > Developers > B2C-Commerce-Developer

B2C-Commerce-Developer Salesforce Certified B2C Commerce Developer (SP23) Question and Answers

Question # 4

Given a job step configured in the steptype.json, a developer needs to add a custom status code

“No_FILES_FOUND”.

Which code snippet will complete the requirement?

A.

var status = {success: ‘OK’. Message: ‘NO_FILES_FOUND’};

return status;

B.

var status = require(‘dw/system/status’);

return new Status(Status.OK, ‘NO_FILES_FOUND’);

C.

this.status = ‘NO_FILES_FOUND’

return this;

D.

return ‘NO_FILES_FOUND

Full Access
Question # 5

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.

Use the Code Profiler in production instance. Set the mode to Development Mode and then wait a few minutes to collect data from onsite traffic. Click the refresh button to see the new data.

B.

Use the Code Profiler in production instance. Set the mode to Development Mode and click the refresh button to see the new mode displayed.

C.

Use the Code Profiler in a sandbox instance. Set the mode Extended Development Mode and then load the suspected pages and run the suspected process several times. Click the refresh button to see the new data.

Full Access
Question # 6

A developer is asked to create a new service instance that will call a remote web service.

Which method should the developer use to create the service instance?

A)

B)

C)

A.

Option A

B.

Option B

C.

Option C

Full Access
Question # 7

Which two methods are efficient and scalable? (Choose two.)

A.

ProductMgr.queryAllSiteProducts()

B.

ProductSearchHit.getRepresentedProducts()

C.

ProductSearchModel.getProductSearchHits()

D.

Category.getProducts()

Full Access
Question # 8

A merchant checked the "Show Orderable Products Only" preference in Business Manager. What impact does this have on the Storefront from a user perspective?

A.

Back-order products will be excluded from search results.

B.

Products with an Available to Sell (ATS) - 0 will be excluded from search results.

C.

The product detail page will be hidden if Available to Sell (ATS) = 0.

D.

Pre-order products will be excluded from search results.

Full Access
Question # 9

Multiple shoppers report slow performance on the Product Details Page.

Which tool can a developer use to view average response times for the Product-Detail controller route?

A.

Pipeline Profiler

B.

Request Logs

C.

URL Request Analyzer

Full Access
Question # 10

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 must these requirements?

A.

Create a custom attribute on the product system object and set it as localizable.

B.

Add a resource file for every locale for which the attribute needs to be translated.

C.

set the product system object type as localizable.

Full Access
Question # 11

Business Manager has the configuration:

Active log category is “root”

Log level of INFO

The code below execites:

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-export

B.

custom-products

C.

products

D.

info-export

Full Access
Question # 12

Which three configuration does a developer need to ensure to have a new product visible in the

Storefront?

Choose 3 answers

A.

The product has a Price

B.

The Storefront catalog that contains the product is assigned to a site

C.

The product has a master product

D.

The product is online and searchable

E.

The search index is built.

Tengo dudas con el A. REVISAR

Full Access
Question # 13

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.

Assign the current date/time to a new custom attribute, creationDate, via code.

B.

Add the creation date to the attributes of the Custom Object.

C.

Mark the existing creation date attribute as visible.

D.

Add the creation date to the attribute group for the Custom Object.

Full Access
Question # 14

The developer has been given the following business requirement:

The shipping method, Free Standard Ground Shipping' has an exclusion for products *lth category equals or is child of electronics-televisions.'

The marketing department has scheduled a sale offering a “Free Standard Ground Shipping” method for brand XyzTv televisions for the next 3 months.

What method accomplishes this while following best practices?

A.

Extend the code in cartridge/models/shipping/shippingMethod.js using module, super Module and add an exception for the specified brand.

B.

Extend the CheckoutShippingservices controller using module.superModule and add an exception for the specified brand

C.

Create an allow list for the existing shipping method by adding a product exclusion for 'brand equals XyzTV" to the exclusion list for "Free Standard Ground Shipping."

Full Access
Question # 16

Below is a form definition snippet from the newsletter.xml file:

Which line of code creates a JSON object to contain the form data?

A.

Server.form.getForm(‘dwfrm_newsletter’)

B.

Server.form.getForm(‘newsletter’);

C.

Server.forms.getForm(‘newsletter’);

D.

Server.forms.getForm(‘dwfrm_newsletter’)

En el controller:

En el Formulario:

Full Access
Question # 17

The developer created a new Storefront category in storefront-catalog-m-en, but when viewing the

Storefront site, the category is not visible.

What are two possible reasons?

A.

The Storefront catalog is offline

B.

The category does not contain available products

C.

The category is not sorted

D.

The category is offline.

Full Access
Question # 18

A developer configures the dw.json file and needs to fill in the necessary parameters to complete the task.

Which three parameters are required when using npm scripts?

Choose 3 answers

A.

Usemame/Password

B.

Code Version

C.

Hostname

D.

Site ID

E.

CSRF Token

Full Access
Question # 19

A developer is implementing new Page Designer content on a merchant's Storefront and adds the line below to

What does this achieve?

A.

Enables searching to find Page Designer content assets that are not in folders.

B.

Prevents Page Designer pages and components from being searchable.

C.

Filters Page Designer search results into separate page and component folders.

D.

Extends the ConrencSearchModei to allow the folder filter.

Full Access
Question # 20

The developer needs to add custom category debug logging into the “contact’’ script, to ensure that a third-party service call responds as expected.

Assuming that the logging configurations for the contact category are correctly in place, which line of code should the developer add in the 06 placeholder to meet this requirement?

A)

B)

C)

A.

Option A

B.

Option B

C.

Option C

Full Access
Question # 21

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.

The cartridge containing the script is not in the site’s cartridge path

B.

The script debugging session is not active

C.

The script is form a third party cartridge and hence does not allow_settings breakpoints.

Full Access
Question # 22

In Log Center, a developer notes j number of Cross Site Request Forgery (CSRF) log entries.

After adding the token in the 15ML template, which action might solve this problem'

A.

Add csrfProtection middleware steps in the controller

B.

Extend the CSRF token validity to avoid timeouts.

C.

Delete the existing CSRF allow list in Business Manager.

Full Access
Question # 23

A developer has the following files in template/resources:

account.proierties

weight.unit=kilos

account_en.propierties

weight.unit=stones

account_en_US.propierties

weight.unit= pounds

Using the default locale configuration, what is the current outcome of the page that renders the

account.isml template snippet below when visiting the Sofrefront with the English for Canada(en_CA) locale=

Your parcel weighs 10 ${Resource.msg(‘weight.unit’,’account’)}

A.

Your parcel weighs 10 stones.

B.

Your parcel weighs 10 pounds.

C.

Your parcel weighs 10 undefined.

D.

Your parcel weighs 10 kilos

Full Access
Question # 24

A developer is tasked with the development of anew Page Designer Page Type, as requested by the merchant.

How should they define the rendering logic of the page?

A.

Implement a JavaScript file with a render () function.

B.

Implement a metadata JSON file with a ''render'' property.

C.

Implement a Controller file with a ''render'' route.

Full Access
Question # 25

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.

Replace the callback function of the existing route using superModule.

B.

Use the "extend" method of the server module for the existing route.

C.

Copy the existing route in a new cartridge and modify where necessary.

D.

Use the "append" method of the server module for the existing route.

Full Access
Question # 26

A Digital Developer is working in a sandbox on a site named test-site using the domain test.demandware.net. The Developer needs to compile a url to make an Open Commerce API (OCAPI) request that returns product information.

By default, which URL format is a proper Open Commerce API for Sandbox?

Full Access
Question # 27

Which three techniques improve client-side performance in production while following documented best practices? (Choose three.)

A.

Use one style sheet for each ISML decorator template.

B.

Place CSS outside of templates.

C.

Compress CSS.

D.

Use inline Javascript.

E.

Combine several images into a single image.

Full Access
Question # 28

Once the Cache Information tool of the storefront toolkit is enabled, how can a Digital Developer view caching information for a particular component of the page?

A.

Hover over the caching icons now present on the storefront.

B.

Open the Request Logs to view the caching information.

C.

Start a pipeline debugging session and view the caching information provided.

D.

Right-click on the component in UX Studio and view the caching properties of the file.

Full Access
Question # 29

Universal Containers calls the following combination of products “The Basics” and sells the combination as a unique product ID:

  • One Model 103 container
  • Five Model 611 container
  • Tree Model 201 container

The Developer created these three products in the catalog.

What is the next step in Business Manager to create “The Basics” as a combination?

A.

In the Product Bundles module, create a bundle named “The Basics”.

B.

In the Products module, create a product named “The Basics” and add the products to the Product Bundles tab.

C.

In the Products module, create a product named “The Basics” and add the products to the Product Sets tab.

D.

In the Product Sets module, create a product set named “The Basics”.

Full Access
Question # 30

A client has three different sites with three locales. Two of the sites share a library and one site has a private library.

What does the shared library allow in this context?

A.

Sharing content slots between sites

B.

Sharing content assets among locales

C.

A Sharing content assets between sites

D.

Sharing content slots among locales

Full Access
Question # 31

Reference the following code snippets that allow a form to function correctly.

Which code should a developer insert at the EXPRESSION placeholder m the ISML template snippet above to have the form work as expected?

A.

pdict.newslettersFrom

B.

Pdict, newsletter

C.

sowslettersform

Full Access