Black Friday Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70percent

Salesforce B2C-Commerce-Developer Salesforce Certified B2C Commerce Developer (SU24) Exam Practice Test

Salesforce Certified B2C Commerce Developer (SU24) Questions and Answers

Question 1

The developer has been given the following business requirement:

The shipping method, Free Standard Ground Shipping' hasan 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?

Options:

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.superModuleand 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."

Question 2

A Digital Developer is implementing an Open Commerce API call to add products to a basket. Given the following resource configuration:

Which modification allows the requests to successfully execute?

Options:

A.

Change the "resource_id" value to: "/baskets/*/items".

B.

Change the "write_attributes" value to: "(+items)".

C.

Change the "read_attributes" value to: "(items)".

D.

Change the "methods" value to: ["get", "post"].

Question 3

When exporting a price book from an externalsystem, which file format or formats should a developer use so it can be imported into a B2C Commerce site?

Options:

A.

JSON only

B.

XML only

C.

CSV only

D.

XML and CSV

Question 4

Which three operations should be done in a controller?

Choose 3 answers

Options:

A.

Generate the response as JSON or HTML

B.

Use the Script API to generate data for the view.

C.

Use middleware functions when applicable

D.

Create a plain JavaScript object representing a system object

E.

Use the model needed for the view.

Question 5

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 6

A Digital Developer has detected storefront pages being rendered with an error message. After inspecting the log files, the Developer discovered that an enforced quota is being exceeded.

What action should the Developer take to stop the quota violation?

Options:

A.

Rewrite the code that is causing the overage.

B.

Change the Business Managerconfiguration for the quota settings.

C.

Take no action, the overage will be resolved when concurrent visitors are reduced.

D.

Ask support to remove the quota limit.

Question 7

A client has a requirement to render different content on the homepage based on if the customer is logged in or guest user.

What should a developer implement to achieve this requirement?

Options:

A.

Write specific custom code in the Content Asset for a customer that is a registered, versus unregistered, user.

B.

Set the Content Slot configuration so it is based on the system customer group registered, versus unregistered.

C.

Set the Content Asset configuration for a customer that is a registered, versus unregistered, user.

D.

Add specific custom messages in Page Designer for a customer that is a registered, versus unregistered, user.

Question 8

A developer plans to use the /search_suggestion (Shop API) in a Storefront application and the following property must be set to do so

suggestion.product.image:view_type

What consideration should the developer in keep in mind to ensure that image data is returned correctly as part of search suggestions?

Options:

A.

If the view_type is not set or if the view_type is unknown, the image properties are not part of the response.

B.

If the view_type is not set or if the view_type is unknown, the image size of 'small' is used by default

C.

If the view_type is not set or if theview_type is unknown, the image size of 'large' is used by default

Question 9

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 10

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

How should they define the rendering logic of the page?

Options:

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.

Question 11

A developer is using logging in scripts to troubleshoot an issue. They are using thedw.system.Log class to write to specific log levels and categories. Which log level is always enabled by default?

Options:

A.

FATAL

B.

INFO

C.

ERROR

Question 12

Which code sample is required to use a custom tag provided in SiteGenesis in an ISML template?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 13

Universal Containers calls thefollowing 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 stepin Business Manager to create “The Basics” as a combination?

Options:

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

Question 14

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 15

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

What happens in this situation?

Options:

A.

The log file is deleted and a new log file is created.

B.

Logging is suspended for the day

C.

The currentlog file is archived and a new log file is created.

D.

The log file Rolls over and the oldest log messages are overwritten

Question 16

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 17

A developer set up a newsite with Taxation: Net. However, the business requirements changed and the

site now needs to be Taxation:Gross. The Business Manager interface does not give this option.

Which sequence of steps is necessary to change the site to gross taxation?

Options:

A.

Make sure that the developer has “Administrator” Access, then change the Taxationsetting to Gross

B.

Unlock the site preferences and then change the Taxation setting to Gross

C.

Change the global setting,”Enable Taxation Methods” to true, then change the Taxationsetting to Gross

D.

Create a new site with Taxation set to Gross, then delete the old site.

Question 18

Given a NewsletterSubscription custom object that has a key attribute named email of type String, what is the correct syntax to create the NewsletterSubscription custom object and persist it to the database?

Options:

A.

Var customobject = dw.object.CustomObjectMgr.createNewsletterSubscription(‘email’,newsLetterForm.email.value);

B.

Var customobject =dw.object.CustomObjectMgr.createCustomObject(newsletterForm.email.value,‘NewsletterSubscription’);

C.

Var customobject = dw.object.CustomObjectMgr. createCustomObject(‘NewsletterSubscription’, newsLetterForm.email.value);

D.

Varcustomobject = dw.object.CustomObjectMgr. createCustomObject(‘NewsletterSubscription’,’email’, newsLetterForm.email.value);

Question 19

A Digital Developer needs to add logging to the following code:

Which statement logs the HTTP status code to a debug-level custom log file?

Options:

A.

logger.getLogger(‘profile’).debug("Error retrieving profile email, Status Code: ", http.statusCode);

B.

logger.debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode);

C.

Logger.getLogger().debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode);

D.

Logger.getLogger(‘profile’).debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode);

Question 20

Universal Containers sells physical gift cards for the holidays.

What needs to occur to guarantee the cards will always be available?

Options:

A.

Create an inventory record with an unlimited Allocation value.

B.

Create an inventory record with an extremely high Allocation value (i.e., 1 billion certificates).

C.

Create a perpetual inventory record.

D.

Create an inventory record with Backorder Handling enabled.

Question 21

A developer has these requirements for out-of-stock products:

Save the SKUs of the out-of-stock products that the customer is interested in

Save the customer email regardless if the customer is a guest or registered

Email the customer whenthe product is back-in-stock

Which step should the developer perform as part of the solution to achieve the requirements?

Options:

A.

Create a new set-of-string type custom attribute to the system object type Profile to save all the SKUs and use the existing emailfield for the email.

B.

Create a new system object type that has a set-of-string type custom attribute for the SKUs and a string for the email field.

C.

Create a new custom object type that has a set-of-string type custom attribute for the SKUs and a string for the email field.

D.

Create a new set-of-string type custom attribute to the system object type Product to save all the customer email addresses for back-in-stock notification.

Question 22

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)

Options:

A.

Option A

B.

Option B

C.

Option C

Question 23

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

A merchant has asked their development team to add a new site.

Which two tasks are essential for correct site configuration prior to launch?

Choose 2 answers

Options:

A.

Assign a default payment processor.

B.

Assign a default payment method.

C.

Assign a default currency.

D.

Assign a default payment type.

E.

Assign the appropriate taxation type.

Question 26

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 27

A Digital Developer needs to store information temporarily and decides to create a custom object.

Which code creates a custom object?

Options:

A.

CustomObject.createCustomObject(CustomObjectType,primaryKey);

B.

CustomObject.createCustomObject(primaryKey,CustomObjectType);

C.

CustomObjectMgr.createCustomObject(primaryKey);

D.

CustomObjectMgr.createCustomObject(CustomObjectType,primaryKey)

Question 28

Why should a Digital Developeruse ProductSearchModel.getProducts() instead of Category.getOnlineProducts() to access products?

Options:

A.

It is more readable code.

B.

It has fewer lines of code.

C.

It uses the search index.

D.

It reduces accesses to the application server.

Question 29

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

An example requestURL is:

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 30

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

Options:

A.

pdict.newslettersFrom

B.

Pdict, newsletter

C.

sowslettersform

Question 32

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 segmentbelow executes.

What is the result'

Options:

A.

Logs will not be written.

B.

Logs will be written to the log file with a prefix loggerFile.

C.

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

Question 33

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 34

A developer has configured the following log levels for categories & sub categories as

WARN logging is enabled for 'product’ and DEBUG for "product.import"

What will be the log level used for various categories and sub-categories?

Options:

A.

WARN and ERROR are lugged for product" and all its subcategories. For thesubcategory 'product.import' DEBUG and INFO are also logoed

B.

WARN and ERROR are logged fix product' and all its subcategories. For the subcategory’’ product.import* DEBUG and INFO are not logged.

C.

WARN and FRROR ate lugged for product" and all its subcategories.

Question 35

Given a template rendered by a controller with caching and a remote include without caching, which situation applies?

Options:

A.

Both the remote include portion and the rest of the page are cached.

B.

The remote include portion is not cached, but the rest of the page is cached.

C.

The page is cached only for returning customers because of the remote include.

D.

The page is not cached because the remote include introduces an uncached portion.

Question 36

A client has a requirement to allow users on the Storefornt to filter by a newly created attribute.

Which is necessary to achieve this?

Options:

A.

Add a new Search Refinment Definition.

B.

Set the attributeas Searchable.

C.

Change the productseachrefinerbar.iml template

Question 37

A merchant wants to obtain an export file that contains all the products .assigned to their Storefront catalog. They do not know how to achieve this easily without manual processing, so asked their developer to help Generate this. The merchant s Instance setup is as follows:

They have one Master catalog and one storefront catalog.

Some, but not all, of the products in the Master catalog are assigned to categories within the Storefront catalog.

Which method allows the developer to generate the export for the merchant?

Options:

A.

Using the Catalog Import and Export module, export the Master catalog with a category-assignment search to export specific

B.

Using the Site Import and Export module, export both the Site catalog and the Master catalog in a single archive.

C.

Using the Site Import and Export module, export the Master catalog filtered by the site catalog categoriesto export specific products.

Question 38

A business user wants to add a link to a content page from within the body of another content asset. The target content asset ID is: terms-and-conditions.

Which link function generates the correct link?

Options:

A.

$include(‘Page-Include’, ‘cid’,‘terms-and-conditions’)$

B.

$http(‘Content-Page’, ‘cid’, ‘terms-and-conditions’)$

C.

$httpUrl(‘Content-Show’, ‘cid’, ‘terms-and-conditions’)$

D.

$url(‘Page-Show’, ‘cid’, ‘terms-and-conditions’)$

Question 39

Which line of code creates a content slot that can be included on homepage.isml to display on the home page?

Options:

A.

B.

C.

D.

Question 40

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?

Options:

A.

Pipeline Profiler

B.

Request Logs

C.

URL Request Analyzer

Question 41

Adigital instance has one site, with one master product catalog separate from the site catalog. Some, but NOT all, products in the master catalog are assigned to categories of the site catalog.

Using Business Manager, how can a Digital Developer create a catalog export file that contains only the products assigned to the site catalog?

Options:

A.

Use the Catalog Export module to export the site catalog.

B.

Use the Catalog Export module to export the master catalog, with a category-assignment search to export specific products.

C.

Use the Site Import & Export module to export both the site catalog and the master catalog in a single archive.

D.

Use the Site Import & Export module to export the master catalog, filtered by site catalog categories to export specific products.

Question 42

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 43

A Digital Developernoticed that cartridges in their workspace are NOT executing. The Developer confirms that the cartridges are uploaded to the B2C Commerce server connection’s target version directory.

Which action potentially solves this problem?

Options:

A.

Set the active code version to use the latest compatibility mode.

B.

Remove invalid characters from the code version’s name.

C.

Remove invalid characters from cartridge file and folder names.

D.

Set the server connection’s target version directory to the active code version.

Question 44

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 45

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 46

Universal Containers recently completed updates to their storefront shopping cart page. A problem has been discovered since the update. Users are no longer able to submit coupon codes on this page. Additionally, authenticated userswho try to add a coupon are logged out.

The following processing code is found in the Cart.js controller file:

What should the Developer verify to identify the issue?

Options:

A.

The CSRF cartridge is included in the site’s cartridge path.

B.

The form grouphas the secure attribute set to true.

C.

The CSRF token is present in the form and is being submitted in the request.

D.

The CSRF settings in Business Manager are properly configured.

Question 47

Universal Containers wants to associate a region code value with an order to indicate the general area of its destination. This region code must be accessible whenever the order history is displayed.

What is required toaccomplish this?

Options:

A.

Store the region code value in a session variable.

B.

Define a custom attribute on the Order system object type to store the region code value.

C.

Define a custom object type to store the username with the region code.

D.

Store the region code value in the geolocation system attribute of the Order.

Question 48

Universal Containers wants to change a content slot that is currently configured to display a content asset. Now they want the slot to display the top five selling boxes for the week.

Which two changes need to be madefor this to occur? (Choose two.)

Options:

A.

Change the slot’s configuration content type to “products.”

B.

Change the slot’s configuration content type to “recommendations.”

C.

Change the slot’s configuration template to the appropriate rendering template.

D.

Delete the existing content asset.

Question 49

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

Storefront?

Choose 3 answers

Options:

A.

The product has a Price

B.

The Storefront catalog that contains the product is assignedto 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

Question 50

A Digital Developer extends a system object, Product, andadds a Boolean attribute, “sellable,” to it.

Assuming “prod” is the variable name handling the product, what code can the Developer use to access it?

Options:

A.

prod.extended.sellable

B.

prod.sellable

C.

prod.persistable.sellable

D.

prod.custom.sellable

Question 51

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 52

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

A controller route in the SFRA base looks as follows:

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 54

Consider the following information:

• A merchant has this three-tier category structure setup in the Storefront catalog:

New Arrivals > Women > Clothing

• The category namedClothing has all the clothing items for Women and is merchandised.

• A Search Refinement named Newness is correctly configured for the Clothing category.

When a merchandiser views the Clothing category, the Search Refinement appears and Works as

expected.However, the merchandiser does not see the Search Refinement when searching for Clothing via

the Storefront search.

What is the Reason?

Options:

A.

There are conflicting Search Refinement definitions for Clothing and one of its parentcategories

B.

The Search Refinement definition is not set up for the Women category

C.

The Search Refinement definition is not set up for the New Arrivals Category.

D.

The Search Refinement definitions is not set up for the Root Category

Question 55

The Home-Show route uses this middleware chain:

The developer added Home.;s 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:

Assuming the code is correct on both functions, what is the expected result?

Options:

A.

A RunTime error is thrown, "Error: Params do not match route".

B.

The base code executes and then the custom code executes.

C.

The custom code executes and then the base code executes.

D.

The base code executes, but the custom code is ignored becausethe signature lines do not match.

Question 56

A Digital Developer must give users the ability to choose an occasion (holiday, birthday, anniversary, etc.) for which gifts are currently being selected. Thedata needs to be persistent throughout the current shopping experience.

Which data store variable is appropriate, assuming there is no need to store the selection in any system or custom objects?

Options:

A.

Request scope variable

B.

Page scope variable

C.

Session scope variable

D.

Content slot variable

Question 57

A developer customized the Cart-Show controller routewith a LINK cartridge that adds social media data. There is a new requirement to add a datalayer object to the Cart-Show controller route.

How should the developer achieve this to ensure that no code change will be needed if the client decides to remove the LINK cartridge?

Options:

A.

Replace the Cart-Show controller route in client cartridge and add datalayer object to the viewData variable.

B.

Replace the Cart-Show controller route in client cartridge and add datalayer object to the viewData variable. Ensure thatthe client cartridge is on the left of the U.HK cartridge m cartridge path.

C.

Append Cart-Show controller route in the client cartridge and add datalayer object to the viewData variable.

Question 58

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?

Options:

A.

In Payment Methods, enable American Express as a credit card type.

B.

Add American Express intothe Order settings in Site Preferences.

C.

In Payment Processor, create American Express as a payment type.

D.

Add American Express as a Payment Preference in Site Preferences.

Question 59

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 60

Which is an appropriate use of the ISML tag that follows B2C Commerce and SFRA best practices?

Options:

A.

Display a section of the page to logged users only

B.

Implement involved business logs through conditional statements.

C.

Redirect users to the registration page if they are not logged in