Summer Sale- Special Discount Limited Time 65% Offer - Ends in 0d 00h 00m 00s - Coupon code: netdisc

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

Page: 1 / 20
Total 203 questions

Salesforce Certified B2C Commerce Developer (SP24) Questions and Answers

Question 1

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 2

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

Question # 2

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 3

Which of these situations is anappropriate use of the B2C Commerce OCAPIs?

Options:

A.

Updating inventory information from a warehouse management software.

B.

Extending System Object Type definitions with new attributes.

C.

Showing the customer's information in their B2C Commerce "My Account’’ page.

Question 4

A Newsletter controller contains the following route:

Server.post(‘Subscribe’, function (req,res,next){

var newsletterForm = server.forms.getForm(‘newsletter’);var CustomObjectMgr = require(‘dw/object/CustomObjectMgr’);

if(newsletterForm.valid){

try{

var CustomObject =

CustomObjectMgr.createCustomObejct(‘NewsletterSubscription’, newsletterform.email.value);

CustomObject.custom.firstName = newsletterForm.fname.value;

CustomObject.custom.lastName = newsletterForm.lname.value;-

} catch(e){

//Catch error here

}

}

next();

});

Assuming the Custom Object metadata exists, why does this route fail to render the newsletter template

when the subscription form is correctly submitted?

Options:

A.

Custom Objects can only be created by Job scripts

B.

The Subscribe route is missing the server.middleware.httpt middleware.

C.

The CustomObjectMgr variable should be declare outside of the route.

D.

The Custom Object creation is not wrapped in a Transaction.

Question 5

A Digital Developer needs to check for product inventory in a specific inventory list using the Open Commerce API.

An example request URL is:

Question # 5

Which resource_id value enables the appropriate resource?

Options:

A.

/inventory_lists/*

B.

/inventory_lists/**

C.

/inventory_list_search

D.

/products/*

Question 6

A developer has aspecification to integrate with a REST API for retrieving traffic conditions. The service expects parameters to be form encoded.

Which service type should the developer register?

Options:

A.

HTML Form

B.

SOAP Form

C.

POST Form

D.

HTTP Form

Question 7

A Digital Developer must resolve a performance issue with product tiles. The Developer determines that the product tiles are NOT being cached for a long enough period.

Which two methods can the Developer use to verify the cache settings for the product tiles? (Choose two.)

Options:

A.

Enable cache information in the storefront toolkit and view the cache information for theproduct tile.

B.

View the cache information provided by the Merchant Tools > Technical Reports Business Manager module.

C.

View the product list page cache settings provided in the Administration > Manage Sites Business Manager module.

D.

Enable the template debugger to verify the cache times for the producttile.isml template.

Question 8

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 9

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 10

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 11

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

Options:

A.

ProductMgr.queryAllSiteProducts()

B.

ProductSearchHit.getRepresentedProducts()

C.

ProductSearchModel.getProductSearchHits()

D.

Category.getProducts()

Question 12

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 13

A client that sells sport shows wants to allow its customers to filer products based on the intended activity (such as tennis, jogging, basketball, etc.) but this particular information is not present in the current catalog.

Which two actions does a developer need to perform in a B2C Commerce instance to allow this two happen?

Options:

A.

Createa new Product custom attribute AND add a new Search Refinement Definition for the desired categories.

B.

Create a new ProductRefinement custom attribute AND add a new Search Refinement Definition for the desired categories.

C.

Create a new Product customattribute AND add a new viewtype in the storefront catalog settings

Question 14

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 15

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

Options:

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.

Question 16

A Digital Developer wants pass control to an ISML template from a JavaScript Controller and load product on thepipeline dictionary with the name myProduct.

Which code sample will achieve this?

Options:

A.

ISML.renderTemlpate ( "helloworld.isml", { "myProduct": "product" });

B.

ISML.renderTemlpate ( "helloworld.isml", { "product": myProduct });

C.

ISML.renderTemlpate ( "helloworld.isml", { product: myProduct });

D.

ISML.renderTemlpate ( "helloworld.isml", { myProduct: product });

Question 17

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?

Options:

A.

The ProductSearch resource of the Shop OCAPI.

B.

The existing category's endpoint to perform a REST call.

C.

The iframe of the existing category page.

D.

The Search-Show Controller URL to perform a web crawl.

Question 18

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 19

A job executes a pipeline that makes calls to an external system.

Which two actions prevent performance issues in this situation? (Choose two.)

Options:

A.

Use synchronous import or export jobs

B.

Configure a timeout for the script pipelet.

C.

Disable multi-threading.

D.

Use asynchronous import or export jobs.

Question 20

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. Whatcan a developer do to quickly track down the potential problem?

Options:

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.

Question 21

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

Options:

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.

Question 22

A NewsletterSubscription custom object exists that has a key attribute named email of type String and the following script code.

Question # 22

However, the NewsletterSubscription custom object is not persisted.

What is a possible reason?

Options:

A.

The code shownneed to be wrapped in a transaction.

B.

The code shown needs to be wrapped in a try/catch block.

C.

The code shown is the wrong syntax. The correct syntax is:

Question 23

A Digital Developer has created a new PaymentForm controller thatrequires communication with the server and must be made using the HTTPS protocol.

Which code sample should the Developer use to make sure that HTTPS is used?

Options:

A.

exports.PaymentForm = guard.ensure([‘http’, ‘post’, ‘loggedIn’], handlePaymentForm);

B.

exports.PaymentForm = guard.expose([‘post’, ‘loggedIn’], handlePaymentForm);

C.

exports.PaymentForm = guard.httpsPost(handlePaymentForm);

D.

exports.PaymentForm = guard.ensure([‘https’, ‘post’, ‘loggedIn’], handlePaymentForm);

Question 24

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?

Options:

A.

Use a non-replicable Custom Object to store the information temporarily.

B.

Use the Session class in the B2C Commerce api.

C.

Use an SFRAcontroller, because it runs server-side, the state is automatically maintained

D.

Use a client-side cookie to store the information for the session duration.

Question 25

Given the file structure below, which ISML method call renders the customLandingPage template?

Question # 25

Options:

A.

ISML.renderTamplate(‘cartridge/templates/default/content/custom/customLandingPage’);

B.

ISML(‘content/custom/customLandingPage’);

C.

ISML.render(‘content/custom/customLandingPage’);

D.

ISML.renderTemplate(‘content/custom/customLandingPage’);

Question 26

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

Question 27

A merchant has complained to the developers that some products are not appearing in the storefront and has asked them to diagnose and solve the issue.

Which two factors might be causing a product to be hidden?

Choose 2 answers

Options:

A.

Product has been set to searchable.

B.

Product lacks a price.

C.

Product does not have any images.

D.

ProductAvailable to sell is <1.

E.

Product is not online.

Question 28

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 29

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 30

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

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

Options:

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:

Question 31

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 32

A client wants to differentiate their monobrand stores with a special icon when shown in the store

locator. The information is saved in a true/false custom attribute for each Store object in Merchant tools.

How should the developer follow SFRA best practices to expose this data for rendering?

Options:

A.

Extend the existing Stores_Find controller with a new middleware function that performs the query

B.

Pass theStore system object to the template, so that custom propierties are available

C.

Ad dan to the template, and call StoreMgr.searchStoresByCoordinates();

D.

Use the module.superModule functionality and the call method to add a new property to theStore Model.

Question 33

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 34

Given the requirement to add caching toan existing page while adhering to SFRA best practices, which code snippet should be used?

A)

Question # 34

B)

Question # 34

C)

Question # 34

Options:

A.

Option A

B.

Option B

C.

Option C

Question 35

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?

Question # 35

A)

Question # 35

B)

Question # 35

C)

Question # 35

Options:

A.

Option A

B.

Option B

C.

Option C

Question 36

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 37

A merchant has a content slot on a page that currently displays products based on thetop sellers for the current week. The merchant wants to change this functionality. They want to 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 thischange?

Options:

A.

Change the content type AND the rendering template in the slot configuration.

B.

Change the default setting AND the rendering template in the slot configuration.

C.

Change the rendering template in the slot configuration AND delete the existingcontent slot to create a new one.

Question 38

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 39

A client has two B2C Commerce sites in the same instance: one forthe U.S. market, the other for the European market. They offer free gift wrapping on a selection of products. For each order, five products can be wrapped in the U.S., but only three products can be wrapped in the European region.

How should a developer allow the merchant to independently adjust this number?

Options:

A.

Create a new custom preference by extending the Site Preference object type.

B.

Select the corresponding option in the system preference for Orders.

C.

Add a new Campaign using the Online Marketing section of the Business Manager.

D.

Configure a new localizable content slot with a market-specific value.

Question 40

A developer is configuring Payment Methods on astorefront. Which of the following considerations should be kept in rmnd while configuring payment methods,

Options:

A.

You can't delete a default payment method. You can only disable it.

B.

You can add only up to 5 payment methods

C.

You can't drag and drop thecolumn headers to change the sort order.

Question 41

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.

Question # 41

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 42

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 43

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

Question # 43

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 44

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 45

Given the SFRA Controller below:

Question # 45

Why would a JavaScript debugger, that is stopped at line 06, fall to show the viewdata variable in the inspection tool?

Options:

A.

cache. applyDefauItCache is not a valid middleware.

B.

viewdata is declared but not assigned.

C.

viewdata is assigned but not declared.

D.

viewdata is a B2C Script reserved name.

Question 46

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 47

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 48

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

Question # 48

What does this achieve?

Options:

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.

Question 49

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 50

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 51

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?

Options:

A.

$url(''page-Show,''cid'', about-us')$

B.

$url('Content_Show', 'about-us')$

C.

$url('Content-Page', cid 'about-us;)$

Question 52

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?

Options:

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.

Question 53

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 54

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 55

Aclient has custom object definition and requirement that occasional data changes in staging also need to

exist in production,

Which task should the developer perform to meet these requirements when setting up the custom object?

Options:

A.

Create two copies of thecustom object in staging and set Sharing = True.

B.

Create the custom object definition in staging as Shared

C.

Create the custom object definition in production as Replicable

D.

Create the custom object definition in staging as Replicable

Question 56

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.

Question # 56

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 57

A developer wants to configure multiple products that should only be sold as a group. It should not bepossible for buyers to buy these products individually. How should the developer configure the products?

Options:

A.

Bundle

B.

Set

C.

Variation Group

Question 58

A merchant is selling a new product line of televisions. In order to deliver a good customer experience, the merchandising team wants the screen size to beincorporated into the search and navigation journey.

Which two things can the developer do to facilitate this for them?

Choose 2 answers

Options:

A.

Create a new search refinement for a Boolean value true or false and label it "big screen."

B.

Define a new searchable attribute for Screen Size.

C.

Configure catalog-level search refinement definition for Screen Size.

D.

Configure Screen Size threshold search refinement bucket definitions.

Question 59

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 60

Which three object types can a developer import using the Merchant Tools > Content > Import & Export module in Business Manager? (Choose three.)

Options:

A.

Content slots

B.

Images and other static assets

C.

Products

D.

Folders

E.

Content assets

Page: 1 / 20
Total 203 questions