Month End Special - 75% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: discactive

Salesforce Comm-Dev-101 Salesforce Certified B2C Commerce Developer Exam Practice Test

Page: 1 / 15
Total 154 questions

Salesforce Certified B2C Commerce Developer Questions and Answers

Question 1

A developer is inspecting the weekly service status report for a critical internally-hosted web service and notices there are too many instances of unavailability.

Which solution can reduce service unavailability?

Options:

A.

Increase the web service time out.

B.

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

C.

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

Question 2

Which action should a developer take to resolve the problem of not seeing attributes when creating a custom object?

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 3

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 keep in mind to ensure that image data is returned correctly as part of search suggestions?

Options:

A.

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

B.

If theview_typeis not set or if theview_typeis unknown, the image size ofsmallis used by default.

C.

If theview_typeis not set or if theview_typeis unknown, the image size oflargeis used by default.

Question 4

What is the expected result when the code segment executes with the logger configuration?

Options:

A.

Logs will be written to the log file with a prefix custom-loggersFile.

B.

Logs will be written to the log file with a prefix custom-loggers.

C.

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

Question 5

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?

Options:

A.

varCustomObject=dw.object.CustomObjectMgr.createCustomObject( ' NewsletterSubscription ' ,newsletterForm.email.value);

B.

varCustomObject=dw.object.CustomObjectMgr.createCustomObject(newsletterForm.email.value, ' NewsletterSubscription ' );

C.

varCustomObject=dw.object.CustomObjectMgr.createCustomObject( ' NewsletterSubscription ' , ' email ' ,newsletterForm.email.value);

Question 6

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

How should the developer approach this task while following SFRA best practices?

Options:

A.

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

B.

Replace the callback function of the existing route using superModule.

C.

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

Question 7

A client has two B2C Commerce sites in the same instance: one for the 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.

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

C.

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

Question 8

Which method should a developer use to create a service instance that will call a remote web service?

Options:

A.

dw.svc.LocalServiceRegistry.createService()

B.

dw.svc.LocalServiceInstance

C.

dw.svc.LocalServiceRegistry.getDefaultService()

Question 9

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.

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.

B.

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

C.

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

Question 10

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 11

When looking at Custom Object instances for a site, a merchant notices that the creation date is not showing up on the instances in Business Manager.

Where should the developer add this attribute to the Custom Object so it is visible for the merchant to see in Business Manager?

Options:

A.

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

B.

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

C.

Mark the existing creation date attribute as visible.

Question 12

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

Options:

A.

ProductAvailabilityModel.isOrderable()

B.

ProductIndexModel.getOrderableProductsOnly()

C.

ProductSearchModel().getProductSearchHits()

Question 13

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.

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 14

A developer is importing edits for two different sites into the same sandbox and is provided with four different files.

Which two XML files should the developer import using the site-specific Merchant Tools import modules?

Options:

A.

Search settings and Promotions

B.

Search settings and System type extensions

C.

Promotions and System type extensions

Question 15

What is the correct format to use for embedding a link to a content page?

Options:

A.

< a href= " ${URLUtils.url( ' Content-Show ' , ' about-us ' )} " > About Us < /a >

B.

< a href= " ${URLUtils.url( ' Page-Show ' , ' cid ' , ' about-us ' )} " > About Us < /a >

C.

< a href= " ${URLUtils.url( ' Content-Page ' , ' cid ' , ' about-us ' )} " > About Us < /a >

Question 16

Which of these situations is an appropriate 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 17

A developer is asked to implement a simple call to an authentication-protected REST web service.

Which configuration is valid?

Options:

A.

Add the authentication password to the service credentials.

B.

Configure the authentication username using a site preference.

C.

Insert the service ' s endpoint in a.propertiesfile.

Question 18

Business Manager has the configuration:

• Active Log category is " root "

• Log level of INFO

The code below executes.

varlog=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.

products

B.

custom-products

C.

custom-export

Question 19

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

Options:

A.

Bundle

B.

Set

C.

Variation Group

Question 20

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

varCustomObject=

dw.object.CustomObjectMgr.createCustomObject(

' NewsletterSubscription ' ,

newsletterForm.email.value

);

However, the NewsletterSubscription custom object is not persisted. What is a possible reason?

Options:

A.

The code shown needs 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:varCustomObject=dw.object.CustomObjectMgr.createCustomObject( ' NewsletterSubscription ' , ' email ' ,newsletterForm.email.value);

Question 21

Given a site called RefArch with the settings shown in the screenshot (ID: RefArch, Name: RefArch, Time Zone: Etc/UTC, Default Currency: US Dollar, Taxation: Net, Customer List: RefArch), what must be done for RefArch to use the same customer list as RefArchGlobal?

Options:

A.

Import the RefArchGlobal customer list into the RefArch site.

B.

Enable " Customer List Sharing " in Global Preferences.

C.

Select RefArchGlobal in the dropdown for Customer List.

Question 22

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

Which task is essential for correct site configuration prior to launch?

Options:

A.

Assign a default currency.

B.

Assign a default payment method.

C.

Assign a default payment processor.

Question 23

There is a business requirement that a custom controller in app_custom_my_cartridges invokes the calculateTax function of the dw.order.calculateTax hook that is defined in app_storefront_base. How can the developer implement this call?

Options:

A.

Use:dw.system.HookMgr.callHook( ' dw.order.calculateTax ' , ' calculateTax ' ,currentBasket);

B.

Add the location of the dw.order.calculateTax hook to hooks.json, and then usedw.system.HookMgr.callHook(...).

C.

Add the location of the dw.order.calculateTax hook to package.json, and then usedw.system.HookMgr.callHook(...).

Question 24

A client has two B2C Commerce sites in the same instance: one for the U.S. market, the other for the European market. The products they make are sold with different safety certificates based on the world location.

For example, they sell a smartphone with certificate A in the U.S. and certificate B in Europe, a hairdryer with certificate C in the U.S. and certificate D in Europe, and more.

How should a developer allow the merchant to display the appropriate certification logo in the product details page, depending on the customer ' s location?

Options:

A.

Add a Site-specific custom attribute to the Product system object type.

B.

Add a Localizable custom attribute to the Certificate system object type.

C.

Add a Localizable custom preference to the SitePreferences system object type.

Question 25

A developer is using the Script Debugger to troubleshoot an issue. They observe that the debugger is not able to resolve a specific breakpoint on one of the scripts. What is a possible reason for this issue?

Options:

A.

The cartridge containing the script is not in the site ' s cartridge path.

B.

The script debugging session is not active.

C.

The script is from a third-party cartridge and hence does not allow setting breakpoints.

Question 26

A client that sells to multiple countries in Europe needs to disable Apple Pay for Denmark.

Which Business Manager module is used to achieve this requirement?

Options:

A.

Payment Methods

B.

Payment Processors

C.

Locale Payments

Question 27

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

Which parameter is required when using npm scripts?

Options:

A.

Username

B.

CSRF Token

C.

Site ID

Question 28

Given this customer basket information:

• A customer has an existing basket that consists of multiple items.

• One of the items is identified as a gift item by an attribute at the product line item.

• The developer needs to write custom code to fetch the customer basket and then modify the basket based upon the items in the cart. If the basket contains any gift items, modify the basket and create a separate shipment for the gift item.

Four hooks are required to make the modification, beginning with modifyGETResponse and ending with validateBasket.

    dw.ocapi.shop.basket.modifyGETResponse

    -- missing hook --

    -- missing hook --

    dw.ocapi.shop.basket.validateBasket

What are the two missing hooks in the middle?

Options:

A.

dw.ocapi.shop.basket.shipment.beforePOST AND dw.ocapi.shop.basket.shipment.beforePATCH

B.

dw.ocapi.shop.basket.shipment.beforePOST AND dw.ocapi.shop.basket.shipment.beforeDELETE

C.

dw.ocapi.shop.basket.shipment.beforePATCH AND dw.ocapi.shop.basket.shipment.afterDELETE

Question 29

A new product has been added to the Storefront catalog that is assigned to a site.

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

Options:

A.

The search index is built AND the product is online and searchable.

B.

The product has a master product AND the search index is built.

C.

The product has a price AND the product is online and searchable.

Question 30

What is the expected result when extending a route without the middleware chain?

Options:

A.

The base code executes and then the custom code executes.

B.

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

C.

The custom code executes and then the base code executes.

Question 31

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 LINK cartridge in cartridge path.

C.

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

Question 32

Given the requirements:

• To show the washing instructions for a clothing product on a dedicated section of the detail page

• Washing instructions come from the product information manager (PIM)

• To have this attribute available to localize in the Storefront

Which action meets 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 33

What is the result when the code segment executes with the logger configuration?

Options:

A.

Logs will be written to the log file with a prefix custom-loggersFile.

B.

Logs will be written to the log file with a prefix custom-loggers.

C.

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

Question 34

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 ISML pages, which uses the < iscache > tag, to see if that resolves the 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 multiple tags, 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 the production issue.

Question 35

The developer created a new Storefront category in storefront-catalog-m-en, but when viewing the Storefront site, the category is not visible.

Why might the categories not be visible?

Options:

A.

The category does not contain available products.

B.

The Storefront catalog is offline.

C.

The categories are not sorted.

Question 36

A developer wants to create a Business Manager extension with the cartridge named plugin_bm_extension.

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

Options:

A.

Add custom_bm_extension to the cartridge path under business manager cartridge site path AND add the appropriate roles and permissions to the user to view the business manager extension.

B.

Add custom_bm_extension to the cartridge path under Storefront cartridge site path AND add plugin_bm_extension to the cartridge path under business manager cartridge site path.

C.

Add the appropriate roles and permissions to the user to view the business manager extension AND activate a new code version for the Business Manager site.

Question 37

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

Options:

A.

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

B.

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

C.

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

Question 38

To ensure SFRA best practices and protect against request forgery, the developer introduced CSRF token generation in the customer address form.

< form ... action= " submit " >

< input name= " ${dw.web.CSRFProtection.getTokenName()} "

value= " ${dw.web.CSRFProtection.generateToken()} " >

...

< the rest of the Form Fields >

....

< /form >

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 middleware chain of the controller post route

B.

In the controller function that displays the form

C.

In the model function that persists the form data

Question 39

A developer uses hooks for an extension point. Which is 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 single hooks.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 40

What action meets the requirement to show washing instructions for a clothing product?

Options:

A.

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

B.

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

C.

Set the product system object type as localizable.

Question 41

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

Which module can the merchant use to display the image on the Storefront?

Options:

A.

Content slots

B.

Product images

C.

Payment methods

Question 42

How might a developer resolve the issue of low-stock items appearing at the top of search results?

Options:

A.

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

B.

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

C.

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 43

Given a site called RefArch with the settings shown, what must be done for RefArch to use the same customer list as RefArchGlobal?

Options:

A.

Import the RefArchGlobal customer list into the RefArch site.

B.

Enable " Customer List Sharing " in Global Preferences.

C.

Select RefArchGlobal in the dropdown for Customer List.

Question 44

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

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

Options:

A.

< isbanner id= " category-banner " description= " Categories Banner " context= " category " context-object= " ${pdict.ProductSearchResult.category} " / >

B.

< isslot id= " category-banner " description= " Categories Banner " context= " category " context-object= " ${pdict.ProductSearchResult.category} " / >

C.

< iscontent context= " global " description= " Categories Banner " id= " category-banner " context-object= " ${pdict.ProductSearchResult.category} " / >

Question 45

A custom cartridge that seemed to be performing well in a sandbox has been installed in production. The production instance is showing increased page load times that seem to be related to the new custom code. What can a developer do to quickly track down the potential problem?

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 to Extended Development Mode and then load the suspected pages and run the suspected processes several times. Click the refresh button to see the new data.

Question 46

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 Search-Show Controller URL to perform a web crawl.

C.

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

Page: 1 / 15
Total 154 questions