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

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

Salesforce Certified B2C Commerce Developer (SP23) Questions and Answers

Question 1

Universal Containers is preparing their storefront to use Open Commerce APIs (OCAPI).

To which hook should the Digital Developer move taxation logic to ensure consistent order totals within B2C Commerce?

Options:

A.

dw.ocapi.shop.order.validateOrder

B.

dw.ocapi.shop.basket.calculate

C.

dw.ocapi.shop.basket.afterPostShipment

D.

dw.ocapi.shop.order.afterPOST

Question 2

A merchant has a requirement to sell a combination of four existing products with a unique product ID.

This collection will be known as ‘Our Top Combo’, and is base don the merchant’s trading information that

shows this combination to be in high demand.

What does the developer need to do next to fulfill this requirement?

Options:

A.

Create a unique produce to called ‘Our Top Combo’ and add the four products into the Product Bundles

tab.

B.

Create a Content Slot with Content Type = Product and add the four component products into that slot.

C.

Create a Product Set called ‘Our Top Combo’ and add the products into the set.

D.

Create a recommendation rule associating the four products as a recommendation group.

Question 3

A developer customized the Cart-Show controller route with 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 that the 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 4

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 Manager configuration 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 5

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 appropriate technique 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 to the Stores Data OCAPI.

Siempre que sea un objeto standard será put en vez de post

Question 6

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 7

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 form field.

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 8

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 developer to 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 page Designer components can ve tied to campaigns.

D.

Only content slot configurations can ve localized for different languages.

Question 9

A developer is is configuring Shipping Methods on a storefront. Which of the following considerations must be kept in mind while configuring shipping methods.

Options:

A.

You can exclude products that can't be shipped with a particular shipping method

B.

You can't exclude addresses that aren't used by a particular shipping method

C.

You can't define surcharge shipping costs for specific product groups.

Question 10

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 11

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

Question 12

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 SFRA controller, 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 13

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'

Options:

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.

Question 14

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 15

A developer needs to perform the same additional checks before completing multiple routes in a custom controller, in order to 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 16

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 17

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?

Options:

A.

custom-export

B.

custom-products

C.

products

D.

info-export

Question 18

A developer must configure permissions for an Open Commerce API resource on a sandbox instance that

currently does not have any permissions configured.

Which two configuration properties are required to enable Access to the resource?

Choose 2 answers

Options:

A.

Resource_id

B.

Read_attributes

C.

Client_id

D.

Versión_range

Question 19

A developer is configuring Payment Methods on a storefront. 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 the column headers to change the sort order.

Question 20

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 users who 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 group has 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 21

A Digital Developer has a site export file on their computer that needs to be imported into their sandbox.

How should the developer update their sandbox with the data in this file?

Options:

A.

Connect and import the file using the remote option within the Site Import & Export Business Manager module.

B.

Upload and import the file using the local option within the Site Import & Export Business Manager module.

C.

Upload the file to the Impex WebDAV directory and import using the Site Import tool within UX Studio.

D.

Upload the file to the Static WebDAV directory and import using the Import & Export Business Manager module.

Question 22

A Digital Developer is inspecting the weekly service status report for a critical internally-hosted web service used in the 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 23

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 made for 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 24

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 the Log Files section.

Question 25

A developer has a specification 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 26

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 27

A developer is asked to periodically create a CSB file in a WebDAV folder to hold the orders information of the last 30 days.

What are the appropriate actions to implement such a requirement?

Options:

A.

Develop and configure a steptype and corresponding CommonJ5 job step script.

B.

Implement and configure a recurring task using the cron command in Business Manager.

C.

Configure a new custom OCAPI endpoint and use the Customers resource type.

Question 28

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 29

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 30

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 31

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 the subcategory '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.