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

Comm-Dev-101 Questions and Answers

Question # 6

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?

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 " );

Full Access
Question # 7

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?

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.

Full Access
Question # 8

A developer is asked to periodically create a CSV file in a WebDAV folder to hold the orders information of the last 30 days. What should the developer do to implement such a requirement?

A.

Develop and configure a scheduled job and corresponding Job step script.

B.

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

C.

Configure a new custom Open Commerce API (OCAPI) endpoint and use the Custom resource type.

Full Access
Question # 9

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?

A.

HTTP Form

B.

POST Form

C.

HTML Form

Full Access
Question # 10

Given the following ISML example, how should a developer reference the product object in the current iteration of the basket?

< isloop items= " ${pdict.Basket.products} " var= " product " status= " loopstatus " >

...

< /isloop >

A.

product

B.

pdict.product

C.

pdict.Basket.products[loopstatus]

Full Access
Question # 11

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?

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.

Full Access
Question # 12

Given a job step configured in the steptype.json that calls a script module, a developer needs to add a custom status code " NO_FILES_FOUND " in the script. The status does not represent an error condition.

Which code snippet completes this requirement?

A.

this.status= ' NO_FILES_FOUND ' ;returnthis;

B.

varStatus=require( ' dw/system/Status ' );returnnewStatus(Status.OK, ' NO_FILES_FOUND ' );

C.

varstatus={success: ' OK ' ,message: ' NO_FILES_FOUND ' };returnstatus;

Full Access
Question # 13

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

An example request URL is:

http://refarch.demandware.net/dw/data/v18_3/inventory_lists/ecom-inventory/product_inventory_records/00883408601

Which property should the developer check in the OCAPI settings to confirm the appropriate resource is enabled?

A.

client_id

B.

ecom-inventory

C.

inventory_lists

Full Access
Question # 14

A controller route in the SFRA base looks as follows:

server.get( ' Show ' ,consentTracking.consent,cache.applyDefaultCache,

function(req,res,next) {

...base code omitted on purpose...

next();

},

pageMetaData.computedPageMetaData

);

In order to extend this route usingprepend(), what should the developer consider?

A.

Specify any 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.

Removenext();on the new route so only the route ' s middleware functions execute.

Full Access
Question # 15

A developer is tasked with creating a new payment method in Business Manager. What is the first step the developer should take?

A.

Create a new payment processor.

B.

Create a new payment method.

C.

Configure the payment method settings.

Full Access
Question # 16

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

What should a developer implement to achieve this requirement?

A.

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

B.

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

C.

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

Full Access
Question # 17

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

Which configuration is valid?

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.

Full Access
Question # 18

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?

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.

Full Access
Question # 19

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

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();

Full Access
Question # 20

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

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.

Full Access
Question # 21

Which object type can a developer import using the Merchant Tools > Content > Import & Export module in Business Manager?

A.

Content assets

B.

Content slots

C.

Products

Full Access
Question # 22

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

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.

Full Access
Question # 23

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?

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.

Full Access
Question # 24

Which operation should be done in a controller?

A.

Generate the response as JSON.

B.

Use the Script API to generate data for the view.

C.

Create a plain JavaScript object representing a system object.

Full Access
Question # 25

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?

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.

Full Access
Question # 26

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?

A.

Content slots

B.

Product images

C.

Payment methods

Full Access
Question # 27

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?

A.

Pipeline Profiler

B.

Request Logs

C.

URL Request Analyzer

Full Access
Question # 28

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?

A.

Payment Methods

B.

Payment Processors

C.

Locale Payments

Full Access
Question # 29

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?

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

Full Access
Question # 30

Given the requirements:

• To integrate with an external web service using HTTP requests.

• To create a service for this purpose with the Service framework using the LocalServiceRegistry class.

• To test the service before the external service provider makes the API available.

Which solution allows the developer to satisfy the requirements?

A.

Create a service and a Sitepreference that induce the service to respond with a mock response using a conditional.

B.

Create a service and implement the mockFull callback and a sitepreference to enable or disable the mock response.

C.

Create a service and implement the mockFull callback and set the service mode to mock.

Full Access
Question # 31

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

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.

Full Access
Question # 32

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

A.

Show a different < div > tag depending on a pdict Boolean variable.

B.

Implement involved business logic through conditional statements.

C.

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

Full Access
Question # 33

A developer is asked to periodically create a CSV 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?

A.

Develop and configure a steptype and corresponding CommonJS 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.

Full Access
Question # 34

A developer is given a task to implement a new Page Designer layout component that doesn ' t accept certain asset components.

How should the developer achieve the above task?

A.

Add component_type_exclusions in the layout json configuration.

B.

Add component_type_inclusion in the layout json configuration.

C.

Add layout_type_exclusion in the other asset components json configuration.

Full Access
Question # 35

Given the following snippet:

server.append( ' Show ' ,function(req,res,next) {

According to SFRA, which option can a Developer use to complete the code above and provide data to the response using a controller?

A.

res.setViewData({data:myDataObject});res.render( ' /content/myPage ' );next();});

B.

res.viewData={data:myDataObject};res.render( ' /content/myPage ' );next();});

C.

res.render( ' /content/myPage ' );next();}).append({data:myDataObject});

Full Access
Question # 36

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

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. " );

Full Access
Question # 37

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

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 >

Full Access
Question # 38

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?

A.

Search settings and Promotions

B.

Search settings and System type extensions

C.

Promotions and System type extensions

Full Access
Question # 39

To build the SFRA code to a developer sandbox for the first time, which build steps should the developer perform for the site to appear and function as designed?

A.

npm run compile:js, npm run compile:html, npm run clean

B.

npm run compile:js, npm run compile:scss, npm run compile:html

C.

npm run compile:js, npm run compile:scss, npm run compile:fonts

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

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.

Full Access
Question # 41

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?

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.

Full Access
Question # 42

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?

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} " / >

Full Access
Question # 43

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?

A.

Logger.warn( ' Unexpected service response. ' )

B.

Logger.debug( ' Unexpected service response. ' )

C.

Logger.error( ' Unexpected service response. ' )

Full Access
Question # 44

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

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.

Full Access
Question # 45

A developer wants to configure the following products so that same search results are returned regardless of the search term used. The search term can be bag, purse, pocketbook, and tote. How should the developer configure this?

A.

Synonyms

B.

Hypernyms

C.

Hyponyms

Full Access
Question # 46

A developer uses hooks for an extension point. Which is true for running multiple hooks for an extension point?

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.

Full Access