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

Free and Premium Salesforce Comm-Dev-101 Dumps Questions Answers

Page: 1 / 12
Total 154 questions

Salesforce Certified B2C Commerce Developer Questions and Answers

Question 1

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

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 categories to export specific products.

Buy Now
Question 2

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 3

What should a developer implement to enhance the functionality of an existing controller route?

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 4

Consider the following information:

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

New Arrivals > Women > Clothing

The category named Clothing 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.

Why does the merchandiser not see the Search Refinement?

Options:

A.

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

B.

The Search Refinement definition is not set up for the Root category.

C.

There are conflicting Search Refinement definitions for Clothing and one of its parent categories.

Question 5

A developer has a sandbox configured with a service and its profile and credential. Now there is a requirement to allow changes to the service URL manually from the sandbox.

Which B2C feature should the developer use to achieve the request?

Options:

A.

Use the service credential URL field.

B.

Use a Globalpreference dedicated for the service URL.

C.

Use the service status area, set the override URL checkbox, and then populate the URL field with the required one.

Question 6

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 7

A developer is working on a feature that requires the use of a third-party API. What is the best practice for handling API responses in Salesforce B2C Commerce?

Options:

A.

Ignore error responses and proceed with the default behavior.

B.

Log all responses for debugging purposes and handle errors gracefully.

C.

Always return a success response to the user, regardless of the API response.

Question 8

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.

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

Question 9

Business Manager has the configuration:

• Active Log category is " root "

• Log level of WARN

The code below is executing:

varlog=Logger.getLogger( " products " );

Using this information, what will be written to the log?

Options:

A.

log.warn( " This is a warn message " ); AND log.error( " This is an error message " );

B.

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

C.

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

Question 10

Which line of code should a developer add for custom category debug logging?

Options:

A.

Logger.customLogger( ' contact ' ).debug( " Contact service responded with OK. " );

B.

Logger.debug( ' Contact service responded with OK. ' );

C.

Logger.getLogger( " contact " ).debug( " Contact service responded with OK. " );

Question 11

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 12

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 13

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 14

A developer working on a simple web service integration is asked to add appropriate logging to allow future troubleshooting.

According to logging best practices, which code should the developer write to log when an operation succeeds, but has an unexpected outcome that may produce side effects?

Options:

A.

Logger.warn( ' Unexpected service response. ' )

B.

Logger.debug( ' Unexpected service response. ' )

C.

Logger.error( ' Unexpected service response. ' )

Question 15

What should a developer do to ensure that the gift vouchers are always available?

Options:

A.

Manually set the inventory to a high number.

B.

Set StockLevel = maxAllocation for the product.

C.

Check the perpetual flag in the product inventory record.

Question 16

A developer needs to show only car accessories when shoppers use the search term " car accessories " and exclude technology accessories and household accessories.

Given the above requirement, what is the recommended approach using the Search Dictionaries Dashboard?

Options:

A.

Create a Synonym Dictionary entry: car accessories, household, technology. Use search mode First Word.

B.

Create a Common Phrase Dictionary entry: car accessories. Use search mode Exact Match.

C.

Create a Common Phrase Dictionary entry: car accessories, NOT household, NOT technology. Use search mode Exact Match.

Question 17

A developer needs to render a Page Designer page in JSON format. What is the correct syntax?

Options:

A.

PageMgr.serializePage(pageID, {parameter1:value1});

B.

JSON.stringify(PageMgr.renderPage(pageID, {parameter1:value1}));

C.

PageMgr.renderPage(pageID, {parameter1:value1})

Question 18

What is the action needed for the content slot to work as intended?

Options:

A.

No; The content slot is rendered correctly.

B.

Yes; The content needs to be configured with a recommender to display products.

C.

Yes; The isloop should be removed because no loops are allowed in a content slot rendering template.

Question 19

A developer is given the requirement to add a step to the existing business logic of the registration process.

How should the developer modify the route that handles the customer registration?

Options:

A.

Change the controller route with new functionality.

B.

Copy the code from the original route to a new controller route, and change it.

C.

Extend the route with new functionality.

Question 20

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.

Create a new SingleBrandStore custom object configuration.

C.

Adjust the relevant Site Preference in the Stores group.

Question 21

A client has a requirement to allow users on the Storefront to filter by a newly created attribute. Which is necessary to achieve this?

Options:

A.

Add a new Search Refinement Definition.

B.

Set the attribute as Searchable.

C.

Change the productsearchrefinebar.isml template.

Question 22

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 23

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 24

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 25

Which snippet works correctly when updating the package.json file to point to the hook file for a cartridge?

Options:

A.

{ " hooks " : " ./cartridge/scripts/hooks.json " }

B.

{ " hooks " : " ./scripts/hooks.json " }

C.

{ hooks: " ./cartridge/scripts/hooks.json " }

Question 26

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 27

A developer is using logging in scripts to troubleshoot an issue. They are using the dw.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 28

Given the sandbox with:

• Service configured and assigned to its profile and credential

• A code version that uses that service

And given the requirement to limit the number of success or error calls the code can perform to a restricted number of calls per second. Which configuration should the developer perform?

Options:

A.

Set the service as limited and change the services profile site preferences with the required values.

B.

Set the rate limiter in the service profile and configure its values with the ones required.

C.

Set a new quota limit for the service profile and assign the service to it.

Question 29

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 30

In Log Center, a developer notes a number of Cross Site Request Forgery (CSRF) log entries.

After adding the token in the ISML 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 31

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 32

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 33

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 34

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 35

How should a developer achieve the task of not accepting certain asset components in a new Page Designer layout component?

Options:

A.

Addlayout_type_exclusionin the other asset components JSON configuration.

B.

Addcomponent_type_inclusionin the layout JSON configuration.

C.

Addcomponent_type_exclusionsin the layout JSON configuration.

Question 36

A developer is asked to write a log containing the ID and name of the product with a variable named myProduct.

Which snippet of code should be used?

Options:

A.

Logger.warn( ' The current product is {0} with name {1} ' ,myProduct.getID(),myProduct.getName());

B.

Logger.warn( ' The current product is ${myProduct.getID()} with name ${myProduct.getName()} ' );

C.

Logger.warn( ' The current product is {0} with name {1} ' ).context(myProduct.getID(),myProduct.getName());

Question 37

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

{

" resource_id " : " /sites/*/coupons/* " ,

" methods " :[

" put "

],

" read_attributes " : " (**) " ,

" write_attributes " : " (**) "

}

Options:

A.

Allows external applications to create coupons

B.

Allows external applications to create, update, and delete coupons

C.

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

Question 38

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 39

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

Options:

A.

server.get( ' Show ' ,cache.applyDefaultCache,function(req,res,next) {// code});

B.

< iscache type= " relative " hour= " 24 " / >

C.

server.get( ' Show ' ,function(req,res,next) {// code}).applyDefaultCache();

Question 40

A developer is implementing a new feature that requires the use of a custom object. What is the first step the developer should take?

Options:

A.

Create the custom object in Business Manager.

B.

Define the custom object in the code.

C.

Write the logic to handle the custom object.

Question 41

A developer has the following files in template/resources:

• account.properties - > weight.unit=kilos

• account_en.properties - > weight.unit=stones

• account_en_US.properties - > weight.unit=pounds

Using the default locale configuration, what is the current outcome of the page that renders the account.isml template snippet below when visiting the Storefront with the English for Canada (en_CA) locale?

Your parcel weighs 10 ${Resource.msg( ' weight.unit ' , ' account ' ,null)}.

Options:

A.

Your parcel weighs 10 pounds.

B.

Your parcel weighs 10 stones.

C.

Your parcel weighs 10 account.

Question 42

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 43

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 44

The developer has been given the following business requirement:

The shipping method, " Free Standard Ground Shipping " has an exclusion for products with ' 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.superModule and add an exception for the specified brand.

B.

Extend the CheckoutShippingServices controller using module.superModule and 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 45

A merchant asks a developer to create a Cache Partition for the home page, so that when the home page is edited, only the home page cache is cleaned.

Given the above requirement, where should the developer create that partition in Business Manager?

Options:

A.

Administration > Sites > Manage Sites > Site > Cache

B.

Operations > Site > Manage Sites > Cache

C.

Site > Site Preferences > Cache

Question 46

Given a sandbox with an active slot configuration with the following specifications:

Content type set to product

With some product configured

With the following rendering template:slots/product/product_1x2.isml

Correctly enabled and scheduled

And given the code contained in the selected rendering template:

< isif condition= " ${!empty(slotcontent)} " >

< isloop iterator= " ${slotcontent.content} " alias= " product " >

< div class= " product " >

< isprint value= " ${product.getID()} " > < br / >

< isprint value= " ${product.getName()} " > < br / >

< /div >

< /isloop >

< /isif >

Is an additional action needed for this to work as intended?

Options:

A.

No - The content slot is rendered correctly.

B.

Yes - The isloop should be removed because no loops are allowed in a content slot rendering template.

C.

Yes - The content needs to be configured with a recommender to display products.

Page: 1 / 12
Total 154 questions