Black Friday Biggest Discount Flat 70% Offer - Ends in 0d 00h 00m 00s - Coupon code: 70diswrap

Salesforce B2C-Commerce-Developer Dumps

Salesforce Certified B2C Commerce Developer (SU24) Questions and Answers

Question 1

Universal Containers requires that a new order comments attribute is added to the existing SiteGenesis checkout flow. This new attribute needs to be included as part of the standard order export.

Aside from updating the HTML markup and form definition, which option contains all necessary steps to achieve this task?

Options:

A.

• Add the new attribute to the "Order" system object.• Modify the "COPIaceOrder" controller to add this new attribute to the current session's "Order" object.

B.

• Modify the "COPIaceOrder" controller to update a CSV file in the IMPEX WebDAV directory with the order ID and comments.• Modify the order export process to read information in the CSV file and include it as part of the export.

C.

• Add the new attribute to the "Customer" system object.• Modify the "COPIaceOrder" controller to add this new attribute to the current session's "Customer" object.

D.

• Create a new custom object type for order comments that contains the attributes: order ID and comments.• Modify the "COPIaceOrder" controller to create a new order comments custom object upon order completion.

Question 2

A developer is asked to create a controller endpoint that will be used in a client-side AJAX request. Its purposes is to displayupdated 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?

Options:

A.

res.json()

B.

res.render()

C.

res.print()

Question 3

A developer has a requirement to display a banner in two different category pages.

Which snippet of code should the developeradd to a template to allow the merchant to configure each independently?

A)

as

B)

as

C)

as

Options:

A.

Option A

B.

Option B

C.

Option C

Question 4

A Digital Developer is requesting product information for an external integration. The following Open Commerce API (OCAPI) request is NOT functioning correctly:

as

How should the Developer change the request?

Options:

A.

Change the URI to /dw/shop/v18_3/products/creative-zen-v.

B.

Change the HTTP method to PUT.

C.

Change the HTTP method to GET.

D.

Include an authentication token in the request.

Question 5

In order to implement site custom functionality, a developer creates a new cartridge.

Which step should the developer take to ensure their cartridge changes take effect?

Options:

A.

Add the new cartridge to the cartridge path for the business Manager site.

B.

Rebuild the site indexes to capture incremental changes.

C.

Add the new cartridge to the cartridge path for the relevant Storefront site.

Question 6

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.

Whichaction should the developer take to resolve the problem?

Options:

A.

Change the data type of the attributes.B Create an Attnbute Group with the desired attributes in it.

B.

Set the attributes to site-specific replicable.

Question 7

A retailer notices that the Account Addresses page is showing the wrong shopper’s address.

Which tool should the developerstart with to identify the issue?

Options:

A.

Pipeline profiler

B.

Code Profiler

C.

Storefront Toolkit

D.

Reports and Dashboards Module

Question 8

A client sells its product in single-brand stores as well as in multi-brand stores. When shown in the store

locator list, the client wants the single-brand stores to have a particular background color to highlight them.

Which Business Manager action should be completed to allow the developer to apply different styling to

the single-brand stores?

Options:

A.

Add a Boolean custom attribute to the Store system object

B.

Configure theexisting Store custom object type definition

C.

Create a new SingleBrandStore custom object configuration.

D.

Adjust the relevant Site Preference in the Stores group

Question 9

Which method is efficient and scalable because it uses the product search index rather than searching the database?

Options:

A.

ProducrlndexModel.getOrderableProductsOnly()

B.

ProduccAvailabiliryModel.isOrderable()

C.

ProductSearcbHodel().gerProductSearchHita()

D.

ProductVanari.cnMcciel.aerVariams ()

Question 10

Universal Containers needs to have Apple Pay disabled for the country of Spain.

Which Business Manager module should the Developer use to meet this requirement?

Options:

A.

Merchant Tools > Ordering > PaymentMethods

B.

Merchant Tools > Site Preferences > Apple Pay

C.

Merchant Tools > Ordering > Payment Processors

D.

Merchant Tools > Site Preferences > Payment Types

Question 11

A developer isimplementing new Page Designer content on a merchant's Storefront and adds the line shown below to the setupCsntentSearch function in the searchHelpers.Js file.

What does this achieve?

Options:

A.

Allows Page Designer pages and components to be searchable

B.

Prevents Page Designer pages from being searchable

C.

Allows filtering Page Designer pages by folder

Question 12

What is accomplished by the code below?

as

Options:

A.

Performs a remote include from the Account-Header endpoint.

B.

Performs a local include from the Account-Header endpoint.

C.

Creates a link to the Account-Header end point that allows mobile navigation.

Question 13

as

The developer wants to be able to view DEBUG

The developer wants to be able to view DEBUG level messages for myLogCategory in the Request Log tool. Given the custom log configurations in the image above, what does the developer need to do to accomplish this?

Options:

A.

Change the Log Level for myLogCategory to DEBUG.

B.

Check the DEBUG box in the Log Files section.

C.

Change the Log Level for myLogCategory to DEBUG and check the DEBUG box in theLog Files section.

Question 14

A developer has a sandbox with code to log a message during execution, and the following code:

After the code executes the developer does not see any log file with the message in the WebDEV folder.

Which two XML filesshould the developer import using the using-specific Merchant Tools import modules?

Options:

A.

Search settings and Promotion

B.

Search settings and Site Jobs

C.

Promotions and Site jobs

Question 15

Universal Containers wants to give customers the ability to refine product search results by a product custom attribute,weightCapacity.

Which series of steps should a Digital Developer take to show this refinement on the storefront?

Options:

A.

Define a sorting rule for weightCapacity, then rebuild the product search index.

B.

Define a search refinement for weightCapacity, then rebuild the product search index.

C.

Define search-suggestion buckets for weightCapacity, then rebuild the product search index.

D.

Define a search refinement for weightCapacity, then clear the page cache segment for Search-Show.

Question 16

A developer wants to create in Business Manager extension with thecartridge named

plugin_vm_extension.

Which two steps should the developer take for the extension option to show up in Business Manager?Choose 2 answers:

Options:

A.

Add plugin_bm_extension to the cartridge path under business manager cartridge site

B.

Add the appropiate roles and permission to the user to view the business manager extension.

C.

Add plugin_bm_extension to the cartridge path under Storefront cartridge site path.

D.

Activate a new code version for the Business Manager Site.

Question 17

Business Manager has the configuration:

Active Log category is "root"

Log level of WARN

The code below is executing:

var log = Logger.getLogger("products");

Using this information, which two logs will be written?

Choose 2 answers

Options:

A.

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

B.

log.error("This is an error message");

C.

log.info("This is an info message");

D.

log.debugfThis is a debug message");

Question 18

There is a business requirement thata custom controller in app_custom_my_cartridge invokes the calculateTax(basket) function of the dw, order calculateTex hook that is defined in app_storefront_base. How can the developer implement this call?

A)

as

B)

as

C)

as

Options:

A.

Option A

B.

Option B

C.

Option C

Question 19

A Digital Developer is inspecting the weekly service status report for a critical internally-hosted web service used inthe application and notices that there are too many instances of unavailability.

Which two solutions are possible options to reduce the unavailability of the service? (Choose two.)

Options:

A.

Modify the code that makes the request to the external service to be wrapped in a try / catch block.

B.

Change the code that makes the request to set the throwOnError attribute, of the service, to be true.

C.

Increase the web service time out.

D.

Update the external service to have a faster response time.

Question 20

A merchant has a requirement to render personalized content ton a category page via a Content Slot that

targets VIP high-spending customers during a specific promotional period.

Which two items should the developer create to achieve the specified requirements?

Choose 2 answers:

Options:

A.

VIP Customer Group

B.

Page Template

C.

Slot Configuration

D.

Rendering Template

Question 21

The following sample code is NOT providing the desired results. The Digital Developer needs to add an entry to the logs to debug the problem.

as

Which statement correctly adds a log entry?

Options:

A.

Logger.exception(‘Unable to find Apple Paypayment instrument for order.‘+paymentInstruments);

B.

Logger.getErrorLog().log(‘Unable to find Apple Pay payment instrument for order.‘+paymentInstruments);

C.

Logger.fault(‘Unable to find Apple Pay payment instrument for order.‘+paymentInstruments);

D.

Logger.error(‘Unable to find Apple Pay payment instrument for order.‘+paymentInstruments);

Question 22

A merchant uploads an image using the ContentImage Upload module of Business Manager.

Which three modules can the merchant or developer use to display the image on the Storefront?

Choose 3 answers

Options:

A.

ISML templates

B.

Content assets

C.

Storefront catalogs

D.

Content slots

E.

Payment types

Question 23

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?

Options:

A.

In Global preferences, check the box for Enable custom logging in Request Log.

B.

In Site Preferences, check the box for Enable custom Logging in Request Log

C.

In Custom Log Settings, check the DEBUG box for Select Log Levels Written to Files.

D.

In custom Log Settings, activate the loggin category at DEBUG level.

Question 24

Given the following conditions:

Site export file with a copy of the Storefront data for a custom site

Sandbox with the custom site code, but no Storefront data

Requirement for a working copy of SFRA for development reference

A developer is assigned the following Business manager tasks:

A) Import the custom Site using Site Import/Export

B) Import the SFRA Demo Sites using Site Import/Export

C) Rebuild the custom Site search indexes

In what sequence should the developer perform the tasks, so that the custom Site displays the products as intended?

Options:

A.

Task A, then C, then B

B.

Task B, then C, then A

C.

Task A, then B, then C

D.

Task B, then A, then C

Question 25

Which two methods are efficientand scalable? (Choose two.)

Options:

A.

ProductMgr.queryAllSiteProducts()

B.

ProductSearchHit.getRepresentedProducts()

C.

ProductSearchModel.getProductSearchHits()

D.

Category.getProducts()

Question 26

A developer wants to use an external application to manage their stores information (such as opening

hours, and so on), and see their changes in their B2C Commerce Staging instance aas son as they are

saved.

What is the appropriatetechnique the developer should perform to allow the merchant to create a new

store in this scenario?

Options:

A.

A POST request to the Stores Data OCAPI.

B.

A PUT request to the Stores Data OCAPI.

C.

A PATCH request to the Stores Data OCAPI.

D.

An UPDATE request tothe Stores Data OCAPI.Siempre que sea un objeto standard será put en vez de post

Question 27

In Log Center, a developer notes anumber of Cross Site Request Forgery (CSRF) log entries. The developer knows that this happens when a CSRF token is either not found or is invalid, and is working to remedy the situation as soon as possible.

Which two courses of action might solve the problem?

Choose 2 answers

Options:

A.

Add the token in the ISML template.

B.

Extend the CSRF token validity to avoid timeouts.

C.

Delete the existing CSRF whitelists in Business Manager.

D.

Add csrfProtection.generateToken as a middleware step in the controller.

Question 28

Server.get(‘Show’, consentTracking.consent, cache.applyDefaultCache, function (req,res,next){

Var Site = require(‘dw/system/Syte”);

Var pageMetaHelpter = require(‘*/cartridge/scripts/helpers/pageMetaHelper’);

pageMetaHelpter.setPageMetaTags(req.pageMetaData, Site.current);

res.render(‘/home/homePage’);

Missing code here

}, pageMetadata.computedPageMetadata);

The controller endpoint code snippet above does not work.

Which line of code should the developer use to replace line 6 and correct the problem?

Options:

A.

next();

B.

return res;C. res.next();

C.

req.next();

Question 29

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?

as

A)

as

B)

as

C)

as

Options:

A.

Option A

B.

Option B

C.

Option C

Question 30

To ensure SFRA best practices and protect against request forgery, the developer introduced CSRF token

generation in the customer address form:

value = “${dw.web.CSRFProtection.generateToken()”>

To implement CSRF protection when the form is submitted, the developer needs to introduce the CSRF

validation using one or both of these methods as applicable:

validateRequest

validateAjaxRequest

Where in the code does the developer need to add this CSRF validation check?

Options:

A.

In the controller function that displays the form

B.

In the middleware chain of the controller post route

C.

In the controller function that handles the submitted form

D.

In the model function that persists the form data

Question 31

When inspecting the weekly service status report for a critical internally hosted web service used in the

application, a developer notices that there are too many instances of unavailability.

Which two solutions can reduce the unavailability of the service?

Choose 2 answers.

Options:

A.

Update the service to have a faster response time.

B.

Modify the code that makes the request to the external service to be wrapped in a try/catchblock.

C.

Increase the web service time out

D.

Change the code that sets the throwOnError attribute of the service to be true.

Question 32

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 allowin this context?

Options:

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

Question 33

A developer has a sandbox with code to log a message during execution, and the following code:

as

After the code executes, the developer does not see any log file with the message in the WebDAV folder.

What could the developer do to correct this issue?

Options:

A.

Set the root log level to debug AND check the box for info under Log Files.

B.

Set the logging global preference to true AND set the root log level to debug.

C.

Set the logging global preference to true AND check the box for Info under Log Files

Question 34

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

Options:

A.

npm run compile:js, npm run compile:html, npm run clean

B.

npm run compile:scss, npm run compile:html, npm run clean

C.

npm run compile:js, npm run compile: scss, npm run compile:html

D.

npm run compile:js, npm run compile:scss, npm run compile:fonts

Question 35

Universal Containers specifies a new category hierarchy for navigating thedigital commerce storefront. A Digital Developer uses Business Manager to manually create a catalog with the specified category hierarchy, then uses the Products & Catalogs > Import & Export module to export the catalog as a file.

How can other Developerswith sandboxes on the same realm create the same catalog in their own sandboxes?

Options:

A.

Use Business Manager to upload and import a copy of the export file obtained from the original Developer.

B.

Use the remote upload capability of the Site Import & Exportmodule of Business Manager.

C.

Use the import capability of the Site Import & Export module of Business Manager.

D.

Use the Business Manager Data Replication module to replicate the catalog from the original Developer’s sandbox.

Question 36

A Digital Developer wants to selectivelyretrieve products and process them from an iPhone.

Which action should the Developer take, given that JavaScript controllers CANNOT be used?

Options:

A.

Use import/export in Business Manager.

B.

Create a webservice to retrieve products.

C.

Use OCAPI and invoke it in native language.

D.

Use WebDAV Client to retrieve products.

Question 37

The developer is asked to enhance the functionality of an existing controller route by adding information to the response's viewData.

How should thedeveloper approach this task while following SFRA best practices?

Options:

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.

Question 38

A developer needs to perform the same additional checks before completing multiple routes in a custom controller, in orderto decide whether to render a template or redirect the user to a different page.

According to SFRA best practices, what is the correct approach to improve code reusability in this scenario?

Options:

A.

Define a new middleware function and use it in the existing routes.

B.

Append a new function to all the existing routes with the server module.

C.

Replace the existing routes by creating a controller in separate new cartridge.

D.

Use the superModule property in the existing routes to extend their functionality.

Question 39

A merchant has a content slot on a page that currently displays products based on the top Sellers for the

current week.

They wish to change this functionality and, instead, have the slot render a specific content asset so that the

content experience is more personalized to the visitors.

Which two actions are necessary to make this change?

Choose 2 answers

Options:

A.

Delete the existing content slot and create a new one.

B.

Change the rendering template in the slot configuration

C.

Change the default setting in the slot configuration

D.

Change the content type for the slot configuration

Question 40

The following code ensures that an address ID CANNOT be used if it is already in use by another address in the customer’s address book. There is a problem with the code. The error message for an invalid address ID is never shown to the user on the formfield.

as

How should the Digital Developer resolve this issue so that the error message is displayed on the address ID form field?

Options:

A.

addressForm.invalidateFormElement("addressid");

B.

addressForm.addresssid.invalidateFormElement = true;

C.

addressForm.invalidateFormElement(addressForm.addressid);

D.

addressForm.addresssid.invalidateFormElement();

Question 41

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

Which threeparameters are required when using npm scripts?

Choose 3 answers

Options:

A.

Usemame/Password

B.

Code Version

C.

Hostname

D.

Site ID

E.

CSRF Token

Question 42

A developer working on a multi country site is asked to store country specific data that drives the creation of a country selector. Examples of the data storedare:

Pricebook to be used

Image URL for country flag

The data used in staging also applies in production, but only for this site.

Which approach should the developer take to implement these requirements?

Options:

A.

Extend the Locale System Object to contain the custom data for each country.

B.

Create a replicable, site-specific Custom Object with the custom data for each country.

C.

Create site-specific content assets to store the data for each country.

Question 43

A merchant has reported that customers are seeing low stock items at the top of their search results, giving them a subpar customer experience and impacting conversion.

How might this issue be resolved to ensure a better customer journey?

Options:

A.

In Business Manager, select Show Orderable Products Only at the root level to hide any products that are currently out of stock.

B.

In Business Manager, enter a higher boost factor for availability in SearchableAttributes.

C.

In Business Manager, set an availability low ranking threshold in Search Preferences.

D.

Create a job that sets all unavailable products to be hidden. Schedule the job to run hourly to clean up the catalog on a regular basis.

Question 44

Given the code snippet aboce, what should be added after this code so it can be used for page

component display?

Options:

A.

Base.render = render;

B.

Module.exports.render = render;

C.

Module.exports = render;

D.

Module.exports = server.exports();

Question 45

Adeveloper 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?

Options:

A.

Change the data type of the attributes.

B.

Create an attribute Group with the desired attributes in it.

C.

Set the attributes to site-specific replicable.

Question 46

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

as

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

Options:

A.

pdict.newslettersFrom

B.

Pdict, newsletter

C.

sowslettersform

Question 47

A developer needs to check for product inventory in all inventory lists using the Open Commerce API.

An example requestURL is:

as

Which properly should the developer check in the OCAPI settings to confirm the appropriate resource is enabled?

Options:

A.

Client_id

B.

Ecom-inventory

C.

Inventory_list

Question 48

A developer observed a specific issue in production, which they cannot reproduce in other environments. The developer wants to do a hot fix to one of the ISMLpages, which uses tag, to see if that resolves while issue. Which consideration must the developer keep in mind while deploying the hot fix in production?

Options:

A.

It will be required to invalidate the cache for the hot fix.

B.

If the page has multipletags, the highest cache duration will be used in production to determine the resulting page's caching behavior.

C.

The TTL cache setting only affects static content and not the page cache, which could potentially cause he production issue.

Question 49

A developer wants to configure the following products so that same search results ire returned regardless of the search term used. The search term can be bag, purse, pocketbook, and tote. Mow should the developer configure this?

Options:

A.

Synonyms

B.

Hypernyms

C.

Hyponyms

Question 50

A controller route in the SFRA base looks as follows:

as

In order to extend this route using prepared ( ), what should the developer consider?

Options:

A.

Specifyany middleware functions needed for the new functionality.

B.

Specify any middleware functions needed for the new functionality using only those called by the base route.

C.

Remove next ( ); on the new route so only the route's middleware functions execute.

Question 51

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 itis visible for the merchant to see in Business Manager?

Options:

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.

Question 52

Which object type can a developer import using the Merchant Tools > Import $ Export module in Business Manager?

Options:

A.

Images and other static assets

B.

Content slots

C.

Products

Question 53

Universal Containers has expanded its implementation to support German with a locale code of de. The current resource bundle is checkout.properties.

To which file should the developer addGerman string values?

Options:

A.

checkout_de.properties in resources folder

B.

checkout.properties in the de locale folder

C.

checkout.properties in the default locale folder

D.

de_checkout.properties in resources folder

Question 54

A merchant requires that an existing section of the Site become editable from the Business Manager, so

that they can modify it independently of the developer.

Which of these is an important factor for a developerto consider when choosing the appropriate solution

between a content slot and a Page Designer component?

Options:

A.

Only Page Designer Components can be localized for different languages.

B.

Only content slot configurations can be tied to campaigns.

C.

Only pageDesigner components can ve tied to campaigns.

D.

Only content slot configurations can ve localized for different languages.

Question 55

A retailer notices that the Account Addresses page is showing the wrong shopper's address.

Which toolshould the developer start with to identify the issue?

Options:

A.

Storefront Toolkit

B.

Reports and Dashboards module

C.

Pipeline Profiler

Question 56

A merchant wants customers to be able to order gift vouchers via their site. Since they can issue an

unlimited number of these digital vouchers, this item should be available to sell at all items.

How can a developer use Business Manager to ensure that the gift vouchers are always available?

Options:

A.

Check the perpetual flag in the product inventory record

B.

Check the Available to Sell (ATS) flag dor the producto set

C.

Set StockLevel = maxAllocation for the producto.

D.

Manually set the inventory to a high number.

Question 57

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?

Options:

A.

templates/de

B.

templates/default

C.

templates/resources

D.

templates/default/resources

Question 58

A developer uses hooks for an extension point. Which n true for running multiple hooks for an extension point?

Options:

A.

It is possible to register multiple modules to call for an extension point in a singlehooks.json file

B.

It is possible to control the order in which registered modules are called.

C.

If you call multiple modules, only the first hook called returns a value

Question 59

What happens if the log file size limit is reached in custom logging?

Options:

A.

Logging is suspended for the day.

B.

Logging is suspended for two hours.

C.

The log file is deleted and recreated from scratch.

D.

The log file rolls over and the last used log is overwritten.

Question 60

Given the above OCAPI definitions, which permission or permissions apply?

as

Options:

A.

Allows external applications to create coupons

B.

Allows external applications to create, update, and delete coupons

C.

Allow external applications to create, update, and delete both coupons and coupon codes

D.

Allows external applications to update coupons

Page: 1 / 20
Total 203 questions