wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

B2C Commerce Developer

Total questions: 206

Worksheet time: 7hrs 45mins

Name
Class
Date
1.

A digital instance has one site, with one master product catalog separate from the site catalog. Some, but NOT all, products in the master catalog are assigned to categories of the site catalog. Using Business Manager, how can a Digital Developer create a catalog export file that contains only the products assigned to the site catalog? (GOT IT)

a)

Use the Catalog Export module to export the site catalog.

b)

Use the Catalog Export module to export the master catalog, with a category-assignment search to export specific products.

c)

Use the Site Import & Export module to export both the site catalog and the master catalog in a single archive.

d)

Use the Site Import & Export module to export the master catalog, filtered by site catalog categories to export specific products.

2.

A developer needs to update the package.json file so that it points to the hook file for a cartridge, using the hooks keyword. Which snippets work correctly when added to the file? (GOT IT)

a)

{ “hooks”: “./cartridge/scripts/hooks.json” }

b)

{ “hooks”: “./scripts/hooks.json” }

c)

{ hooks: “./cartridge/scripts/hooks.json” }

d)

{ hooks: ./scripts/hooks.json }

3.

The developer created 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? (GOT IT)

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

4.

Which statement logs the HTTP status code to a debug-level custom log file? (GOT IT)

a)

logger.getLogger(‘profile’).debug("Error retrieving profile email, Status Code: ", http.statusCode);

b)

logger.debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode);

c)

Logger.getLogger().debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode);

d)

Logger.getLogger(‘profile’).debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode);

5.

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, instead of the Administration section import modules? Choose 2 answers. (GOT IT)

a)

System type extensions (sites only)

b)

Site Jobs (sites)

c)

Search Settings (Search and Sites)

d)

Promotions ( sites and online marketing)

6.

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? (GOT IT)

a)

Add component_type_inclusion in the layout json configuration

b)

Add component_type_exclusions in the layout json configuration

c)

Add layout_type_inclusion in the target components json configurations

d)

Add layout_type_exclusion in the other asset components json configuration

7.

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? (GOT IT)

a)

HTML Form

b)

SOAP Form

c)

POST Form

d)

HTTP Form

8.

A merchant has a requirement to render personalized content to n 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: (GOT IT)

a)

VIP Customer Group

b)

Page Template

c)

Slot Configuration

d)

Rendering Template

9.

A developer is writing a server side script that needs to maintain state across calls. The persistente 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? (GOT IT)

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

10.

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.) (GOT IT)

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

11.

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? (GOT IT)

a)

Custom Objects can only be created by Job scripts

b)

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

c)

The Custom Object creation is not wrapped in a Transaction

d)

The CustomObjectMgr variable should be declare outside of the route

12.

Given a file in a plug-in cartridge with the following code:

‘use strict’:

Var base = module.superModule;

Function applyCustomCache (req,res,next){

res.CachePeriod = 6; //eslint-disable-line no-param-reassign

res.cachePeriodUnit = ‘hours’) //eslint-disable-line no-param-reassign

next();

}

Module.exports = base;

Module.exports.applyCustomCache = applyCustomCache;

What does this code extend? (GOT IT)

a)

A controller

b)

A middleware script

c)

A decorator

d)

A model

13.

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

<?xml versión=”1.0”?>

<form xmlns=http://www.demandware.com/xml/form/2008-04-15>

<field formid=”email” lavel=”Email” type=”String” mandatory=”True” max-length=”50” />

</form>

Which line of code creates a JSON object to contain the form data? (GOT IT)

a)

Server.form.getForm(‘dwfrm_newsletter’)

b)

Server.form.getForm(‘newsletter’)

c)

Server.forms.getForm(‘newsletter’)

d)

Server.forms.getForm(‘dwfrm_newsletter’)

14.

A business user wants to add a link to a content page from within the body of another content asset. The target content asset ID is: terms-and-conditions. Which link function generates the correct link? (GOT IT)

a)

$include(‘Page-Include’, ‘cid’, ‘terms-and-conditions’)$

b)

$http(‘Content-Page’, ‘cid’, ‘terms-and-conditions’)$

c)

$httpUrl(‘Content-Show’, ‘cid’, ‘terms-and-conditions’)$

d)

$url(‘Page-Show’, ‘cid’, ‘terms-and-conditions’)$

15.

A Digital Developer is implementing an Open Commerce API call to add products to a basket. Given the following resource configuration:

Which modification allows the requests to successfully execute? (GOT IT)

a)

Change the "resource_id" value to: "/baskets/*/items"

b)

Change the "write_attributes" value to: "(+items)"

c)

Change the "read_attributes" value to: "(items)"

d)

Change the "methods" value to: ["get", "post"]

16.

Business Manager has the configuration:

            • Active log category is “root”

                • Log level of INFO

The code below executes:

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? (GOT IT)

a)

custom-export

b)

custom-products

c)

products

d)

info-export

17.

Which three operations should be done in a controller? Choose 3 answers (GOT IT)

a)

Generate the response as JSON or HTML

b)

Use the Script API to generate data for the view

c)

Use middleware functions when applicable

d)

Create a plain JavaScript object representing a system object

e)

Use the model needed for the view

18.

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 meets these requirements? (GOT IT)

a)

Set the product system object type as localizable

b)

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

c)

Add a custom attribute and set the custom attribute as localizable

d)

Add a custom attribute for each locale

19.

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? (GOT IT)

a)

In the controller function that displays the form

b)

In the middleware chain of the controller post route

c)

In the controller function that handles the submitted form

d)

In the model function that persists the form data

20.

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? (GOT IT)

a)

Locale Payments

b)

Payment Methods

c)

Payment Processors

d)

Apple Pay

21.

A developer is asked to improve the maintainability of a page by reducing its code repetition. What are two techniques the developer should implement to achieve this? Choose 2 answers. (GOT IT)

a)

Require and render templates with <isscript> tags

b)

Use local template includes

c)

Implement template decorators paired with replace tags

d)

Embed partial files using ISML expressions

22.

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 produce to details page, depending on the customer’s location? (GOT IT)

a)

Add a Localizable custom attribute to the Certificate system object type

b)

Add and Image custom preference to the Sitepreference system object type

c)

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

d)

Add a Localizable custom preference to the SitePreference system object type

23.

A developer is working on a new site for the U.S based on an existing Canadian site. One of the requirements is a change to the address form. The current Canadian form has an <options> list with the correct two-letter abbreviation for the provinces.

The U.S. requirements are to:

• Have an <options> list with the correct two-letter abbreviation for the states in place of the province field.

• Set the U.S site locale.

• Add the options list field definition to the XML file.

How should the developer set up the files before making the required edits? (GOT IT)

a)

Create a copy of existing address.xml file in the default folder. Rename that file to address_US.xml

b)

Create a new sub-folder in the forms folder. Name it US. Copy existing address.xml file in the new folder

c)

Create a copy of existing address.xml file in the default folder. Rename that file to address_en_US.xml

d)

Create a new sub-folder in the forms folder. Name it en_US. Copy existing address.xml file in the new folder

24.

A developer wants to add a link to the My Account Page. What is the correct code to accomplish this? (GOT IT)

a)

A.      <a href=”${URLUtils.get(‘Account-Show’)}>${Resource.msg(‘myaccount’,’account’,request.locale())}</a>

b)

<a href=”${url.get(‘Account-Show’)}>${Resource.message(‘myaccount’)}</a>

c)

<a href=”${URLUtils.url(‘Account-Show’)}>${Resource.msg(‘myaccount’,’account’,null)}</a>

d)

<a href=”${URLUtils (‘Account-Show’)}>${ResourceMgr.getPropierties(‘myaccount’,’account’,null)}</a>

25.

A Digital Developer is working on a multi-site realm. A new site requires a different layout for the account landing page. The business logic and data model remain the same. The existing code is in AccountControl.js and accountlanding.isml in the app_storefront cartridge. The app_storefront cartridge contains code for all other business functions. The cartridge path for the new site is currently int_cybersource:int_paypal:app_storefront. The Developer creates a new cartridge named app_newsite that contains only the accountlanding.isml template for the new site. Which modification should be made to the new cartridge path? (GOT IT)

a)

Set the cartridge path so that app_newsite is before app_storefront

b)

Set the cartridge path so that app_storefront is before int_cybersource

c)

Set the cartridge path to include only app_newsite

d)

Set the cartridge path so that app_newsite is after app_storefront

26.

Universal Containers needs to have Apple Pay disabled for the country of Spain. Which Business Manager module should the Developer use to meet this requirement? (GOT IT)

a)

Merchant Tools > Ordering > Payment Methods

b)

Merchant Tools > Site Preferences > Apple Pay

c)

Merchant Tools > Ordering > Payment Processors

d)

Merchant Tools > Site Preferences > Payment Types

27.

A Digital Developer selects “Show Orderable Products Only” in the Search > Search Preferences Business Manager module. Which business goal does this accomplish? (GOT IT)

a)

Exclude products from search results if Available to Sell (ATS) = 0

b)

Exclude back-ordered products from showing on the website

c)

Block displaying the product detail page if Available to Sell (ATS) = 0

d)

Exclude pre-order products from search results

28.

A Digital Developer is tasked with setting up a new Digital Server Connection using UX Studio in their sandbox. Which three items are required to accomplish this task? (Choose three.) (GOT IT)

a)

Instance Version

b)

Instance Hostname

c)

Business Manager Username

d)

Keystore Password

e)

Business Manager Password

29.

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 (GOT IT)

a)

Resource_id

b)

Read_attributes

c)

Client_id

d)

Version_range

30.

A developer has custom debug statements in a script, but the messages are not showing up in the Storefront Toolkit Request Log. Which step needs to be completed to get the messages to appear in the Request Log? (GOT IT)

a)

In Global preferences, check the box for Enable custom logging in Request Log

b)

In Site Preferences, check the box for Enable custom Logging in Request Log

c)

In Custom Log Settings, check the DEBUG box for Select Log Levels Written to Files

d)

In custom Log Settings, activate the loggin category at DEBUG level

31.

A retailer notices that the Account Addresses page is showing the wrong shopper’s address. Which tool should the developer start with to identify the issue? (GOT IT)

a)

Pipeline profiler

b)

Code Profiler

c)

Storefront Toolkit

d)

Reports and Dashboards Module

32.

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? (GOT IT)

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

33.

A Digital Developer added a file named MyBusinessController.js in the cartridge named app_project. The project design calls for this new file to override MyBusinessController.js in client_project. The client_project cartridge contains other necessary functionality. Additional functionality is also included in the storefront_core and storefront_controllers cartridges. Which cartridge path meets the project requirements? (GOT IT)

a)

client_project:app_project:storefront_controllers:storefront_core

b)

app_project:storefront_controllers:storefront_core

c)

app_project:client_project:storefront_controllers:storefront_core

d)

storefront_core:storefront_controllers:client_project:app_project

34.

A Storefront is designed so that multiple pages share a common header and footer layout.  Which ISML tag should a developer use on the templates for these pages to avoid code repetition in the most effective way? (GOT IT)

a)

<isdecorate> … </isdecorate>

b)

<iscontent> … </iscontent>

c)

<isreplace> … </isreplace>

d)

<isinclude> … </isinclude>

35.

A Digital Developer has been given a specification to integrate with a REST API for retrieving Weather conditions. The service expects parameters to be form encoded. Which service type should the Developer register? (GOT IT)

a)

FTP

b)

SOAP

c)

HTTP Form

d)

WebDAV

36.

Given the customer basket described below:

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

• One of the items is identified as a gift ítem 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 modifyGETRespone 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? (GOT IT)

a)

dw.ocapi.shop.basket.shipment.afterDELETE

b)

dw.ocapi.shop.basket.shipment.beforePATCH

c)

dw.ocapi.shop.basket.shipment.beforeDELETE

d)

dw.ocapi.shop.baskep.shopment.beforePOST

37.

A developer set up a new site with Taxation: Net. However, the business requirements changed and the site now needs to be Taxation:Gross. The Business Manager interface does not give this option. Which sequence of steps is necessary to change the site to gross taxation? (GOT IT)

a)

Make sure that the developer has “Administrator” Access, then change the Taxation setting to Gross

b)

Unlock the site preferences and then change the Taxation setting to Gross

c)

Change the global setting,”Enable Taxation Methods” to true, then change the Taxation setting to Gross

d)

Create a new site with Taxation set to Gross, then delete the old site

38.

A Digital Developer has a new requirement to disable the "Discover" credit card type for all checkouts. What does the Developer need to change in Business Manager to fulfill this requirement? (GOT IT)

a)

Checkout exclusion rules in the Merchant Tools > Site Preferences > Checkout Preferences module

b)

Credit card exclusion rules in the Merchant Tools > Site Preferences > Payment Preferences module

c)

Credit cards in the Merchant Tools > Ordering > Payment Methods module

d)

Credit card exclusion rules in the CreditCardType.json configuration file

39.

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? (GOT IT)

a)

Add a Boolean custom attribute to the Store system object

b)

Configure the existing Store custom object type definition

c)

Create a new SingleBrandStore custom object configuration

d)

Adjust the relevant Site Preference in the Stores group

40.

A client uses tax tables in Business Manager to calculate tax. They recently started shipping to a new country, Italy, and the tax is not being calculated correctly on the Storefront. What is the likely problem? (GOT IT)

a)

Tax Region is configured wrong

b)

Tax Country is missing

c)

Tax Jurisdiction is missing

d)

Tax Locale is configured wrong

41.

A Digital Developer adds the following line of code to a script. The code executes without error; however, the log file on disk does NOT contain the log message. Which two actions should be completed to write the log message to disk? (Choose two.) (GOT IT)

a)

Ensure that the debug log level is enabled to write to file in the Custom Log Settings Business Manager module

b)

Archive old log files to make room in the log directory

c)

Ensure that the “login” category is added to the Custom Log Filters in the Log Settings Business Manager module

d)

Ensure that the debug log level has been added to the custom log level types in the Global Preferences business manager module

42.

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 Sofrefront with the English for Canada(en_CA) locale= Your parcel weighs 10 ${Resource.msg(‘weight.unit’,’account’)} (GOT IT)

a)

Your parcel weighs 10 stones

b)

Your parcel weighs 10 pounds

c)

Your parcel weighs 10 undefined

d)

Your parcel weighs 10 kilos

43.

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

var Logger = require(‘dw/system/Logger’);

Logger.info(message);

After the code executes, the developer does not see any log file with the message in the WebDAV folder. Which task does the developer need to perform to correct this issue? (GOT IT)

a)

Set the logging global preference to true

b)

Set the log retention to a value higher than 0

c)

Request that the developer’s account be given permission to the Log Centerof the current realm

d)

Set the root log level to debug

44.

Developer is tasked with the development of a new Page Designer Page Type, as requested by the merchant. How should they define the rendering logic of the page? (GOT IT)

a)

Implement an XML file with a <render> node

b)

Implement a JavaScript file with a render() function

c)

Implement a Controller file with a “render” route

d)

Implement a metadata JSON file with a “render” property

45.

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? (GOT IT)

a)

Change the data type of the attributes

b)

Set the attributes to site-specific replicable

c)

Create an Attribute Group with the desired attributes in it

d)

Sort the attributes in the custom object type

46.

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 segment below executes

var logger = Logger.getLogger(“loggerFile”, “category1.eu” );

logger.warn(“This is a log message”);

What is the result? (GOT IT)

a)

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

b)

Logs will not be written

c)

Logs will be written to the log file with a prefix customwarn

d)

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

47.

What are two appropriate uses of the <isif> ISML tag that follow B2C Commerce and SFRA best practices? (Choose two.) (GOT IT)

a)

Display a section of the page to logged users only

b)

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

c)

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

d)

Implement involved business logic through conditional statements

48.

Multiple customers report slow performance on the Product Details Page. Which tool can a developer use to view average response times for the ProductDetail controller route? (GOT IT)

a)

URL Request Analyzer

b)

Request Logs

c)

Pipeline Debugger

d)

Pipeline Profiler

49.

Which two of these situations are appropriate cases for using the B2C Commerce OCAPIs? (Choose two.) (GOT IT)

a)

Extending System Object Type definitions with new attributes

b)

Displaying a list of B2C Commerce products in a mobile app

c)

Showing the customer's information in their B2C Commerce “My Account” page

d)

Updating Inventory information from a management software

50.

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? (GOT IT)

a)

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

b)

Add specific custom messages in Page Designer for a customer that is a registered, versus unregistered, user

c)

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

d)

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

51.

A developer is asked to create a new service instance that will call a remote web service. Which method should the developer use to create the service instance? (GOT IT)

a)

dw.svc.webref.getDefaultService()

b)

dw.svc.LocalServiceRegistry.getDefaultService()

c)

dw.svc.LocalServiceRegistry.createService()

d)

dw.svc.LocalServiceInstance.createService()

52.

Recent code changes to an existing cartridge do not appear correctly on a Storefront. The developer confirms that the code is uploaded in the IDE and ensures that the cartridge is associated with the sandbox. Which two additional steps should the developer take to troubleshoot this problem? (Choose two.) (GOT IT)

a)

Check that the search index was recently rebuilt

b)

Check the Business Manager site cartridge path

c)

Check that the correct code version is selected

d)

Check the Storefront site cartridge path

53.

What is accomplished by the code below? <isinclude url=”${URLUtils.url(‘Account-Header’, ‘mobile’, true)}” /> (GOT IT)

a)

Performs a local include from the Account-Header endpoint

b)

Performs a remote include from the Account-Header endpoint

c)

Creates a link to the Account-Header endpoint that allows mobile navigation

d)

Performs a call to the Account-Header endpoint to allow mobile navigation

54.

A developer is implementing new Page Designer content on a merchant’s Storefront and adds the line below to the setupContentSearch function in the searchHelpers.js file. apiContentSearchModel.setFilteredByFolder(false); What does this achieve? (GOT IT)

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)

Extends the ContentSearchModel to allow the folder filter

d)

Filters Page Designer search results into separate page and componente folders

55.

The Home-Show route uses this middleware chain:

 

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

(req, res, next) {...});

 

and another cartridge extends this route without a middleware chain:

 

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

 

Assuming the code is correct on both functions, does this work? (GOT IT)

a)

True

b)

False

56.

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 implement the mockfull callback and a sitepreference to enable or disable the mock response

b)

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

c)

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

d)

Create two services, one mock and the real one, and a Sitepreference that enable the mock or the real one

57.

What happens if the log file size limit is reached in custom logging?

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

58.

A Digital Developer noticed that cartridges in their workspace are NOT executing. The Developer confirms that the cartridges are uploaded to the B2C Commerce server connection’s target version directory. Which action potentially solves this problem?

a)

Set the active code version to use the latest compatibility mode

b)

Remove invalid characters from the code version’s name

c)

Remove invalid characters from cartridge file and folder names

d)

Set the server connection’s target version directory to the active code version

59.

A Digital Developer is working in a sandbox on a site named test-site using the domain test.demandware.net. The Developer needs to compile a url to make an Open Commerce API (OCAPI) request that returns product information. By default, which URL format is a proper Open Commerce API for Sandbox?

a)

https://test.demandware.com/dw/shop/products/M1355?client_id=aaa...

b)

https://www.test.com/s/test-site/sfc/shop/products/M1355?client_id=aaa...

c)

https://test.demandware.net/s/test-site/dw/shop/v18_3/products/M1355?client_id=aaa...

d)

https://www.test.com/dw/shop/v18_3/products/M1355?client_id=aaa...

60.

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

Storefront?Choose 3 answers

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

61.

Universal Containers calls the following 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 step in Business Manager to create “The Basics” as a combination?

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”

62.

A Digital Developer needs to add a new form to the shopping cart page to allow customers to enter their rewards pass ID. There is already an existing Cart.js controller that handles processing of the other cart forms. In addition, a form field node is in the form XML and the necessary form input is present in the ISML template.

The code below is the submit button for the ISML markup

a)

A.      Add an <action/> node to the form defition XML with the attribute formid=”addRewardPass”

Add the key addRewardPass, with a processing function as a value, to the object passed to the Form.handleAction() method in the Cart.js controller

b)

Add an <submit/> node to the form defition XML with the attribute formid=”addRewardPass”

Add the key addRewardPass, with a processing function as a value, to the object passed to the Form.handleAction() method in the Cart.js controller

c)

Add the attribute addtl-form-action=”addRewardPass” to the ISML form

Add the key addRewardPass, with a processing function as a value, to the object passed to the Form.handleAction() method in the Cart.js controller

d)

Add an <action/> node to the form defition XML with the attribute formid=”addRewardPass”

No change to Cart.js controller

63.

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?

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

64.

Given the code snippet above, what should be added after this code so it can be used for page component display?

a)

Base.render = render

b)

Module.exports.render = render

c)

Module.exports = render

d)

Module.exports = server.exports()

65.

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?

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

66.

Universal Containers sells physical gift cards for the holidays. What needs to occur to guarantee the cards will always be available?

a)

Create an inventory record with an unlimited Allocation value

b)

Create an inventory record with an extremely high Allocation value (i.e., 1 billion certificates)

c)

Create a perpetual inventory record

d)

Create an inventory record with Backorder Handling enabled

67.

Which three techniques improve client-side performance in production while following documented best practices? (Choose three.)

a)

Use one style sheet for each ISML decorator template

b)

Place CSS outside of templates

c)

Compress CSS

d)

Use inline Javascript

e)

Combine several images into a single image

68.

Once the Cache Information tool of the storefront toolkit is enabled, how can a Digital Developer view caching information for a particular component of the page?

a)

Hover over the caching icons now present on the storefront

b)

Open the Request Logs to view the caching information

c)

Start a pipeline debugging session and view the caching information provided

d)

Right-click on the component in UX Studio and view the caching properties of the file

69.

A developer wants to create in 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? Choose 2 answers

a)

Add plugin_bm_extension to the cartridge path under business manager cartridge site

b)

Add the appropiate roles and permission to the user to view the business manager extension

c)

Add plugin_bm_extension to the cartridge path under Storefront cartridge site path

d)

Activate a new code version for the Business Manager Site

70.

A Digital Developer is working on a project to convert a pipeline to a JavaScript controller. UX Studio has a functioning pipeline debugger configured for the site. Assume the Developer will add a breakpoint to the controller when it is written. What must be done in order to use the debugger with the new controller when it is written?

a)

Create and use a new script debug configuration

b)

Use the existing pipeline debugger

c)

Modify the debugger configuration and use the existing pipeline debugger

d)

Create and use a new controller debug configuration

71.

A Digital Developer needs to add logging to the following code

Which statement logs the HTTP status code to a debug-level custom log file?

a)

logger.getLogger(‘profile’).debug("Error retrieving profile email, Status Code: ", http.statusCode);

b)

logger.debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode);

c)

Logger.getLogger().debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode)

d)

Logger.getLogger(‘profile’).debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode)

72.

Assume the code below is executing:

Business Manager has the configuration:

- Active Log category is “root” with log level of “info.”

Given this information, what is the beginning of the filename in which the log will be written?

a)

xyz

b)

custominfo-blade

c)

custom-export

d)

custom-xyz

73.

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.

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/catch block

c)

Increase the web service time out

d)

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

74.

The SFRA Function:

 

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 on “Missing Code here” and correct the problem?

a)

next()

b)

req.next()

c)

return res

d)

res.next()

75.

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?

a)

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

b)

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

c)

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

d)

Logger.warn(‘The current product is %s with name %s’), context(myProduct.getID(), myProduct.getName())

76.

An instance has custom logging enabled. The log reaches the file size limit. What happens in this situation?

a)

The log file is deleted and a new log file is created

b)

Logging is suspended for the day

c)

The current log file is archived and a new log file is created

d)

The log file Rolls over and the oldest log messages are overwritten

77.

A Digital Developer has identified that the code segment below is causing performance problems.

What should the Developer do to improve the code?

a)

Use a system attribute instead of the isOnSaleFlag custom attribute

b)

Avoid post-processing and use the isOnSaleFlag attribute as a search refinement

c)

Breaks the process into separate loops

d)

Avoid using an Iterator and use a Collection instead

78.

A Digital Developer wants pass control to an ISML template from a JavaScript Controller and load product on the pipeline dictionary with the name myProduct. Which code sample will achieve this?

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

79.

A merchant has a content slot on a page that currently displays products based on the top Sellers for the current week. They wish to change this functionality and, instead, 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 this change? Choose 2 answers

a)

Delete the existing content slot and create a new one

b)

Change the rendering template in the slot configuration

c)

Change the default setting in the slot configuration

d)

Change the content type for the slot configuration

80.

Which two methods are efficient and scalable? (Choose two.)

a)

ProductMgr.queryAllSiteProducts()

b)

ProductSearchHit.getRepresentedProducts()

c)

ProductSearchModel.getProductSearchHits()

d)

Category.getProducts()

81.

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 based on 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?

a)

Create a unique product 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

82.

A client 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?

a)

Create two copies of the custom 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

83.

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

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

84.

In order 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:scss, npm run compile:html, npm run clean

c)

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

d)

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

85.

Universal Containers has expanded its implementation to support German with a locale code of de. The current resource bundle is checkout.properties. To which file should the developer add German string values?

a)

checkout_de.properties in resources folder

b)

checkout.properties in the de locale folder

c)

checkout.properties in the default locale folder

d)

de_checkout.properties in resources folder

86.

A job executes a pipeline that makes calls to an external system. Which two actions prevent performance issues in this situation? (Choose two.)

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

87.

Which two items are appropriate content of custom logs implemented at checkout? Choose 2 answers:

a)

Customer’s password at post-checkout sign up

b)

Order failure information

c)

Transaction’s credit card information

d)

Payment gateway service response code

88.

Which technical reports datapoint measures the performance of a controller’s script execution if network factors and Web Adaptor processing is ignored?

a)

Processing time

b)

Cache hit ratio

c)

Call count

d)

Response time

89.

Universal Containers wants to add a model field to each product. Products will have locale-specific model values. How should the Digital Developer implement the requirement?

a)

Utilize resource bundles for translatable values

b)

Set the model field as a localizable attribute

c)

Store translated model values in different fields; one field for each locale

d)

Add model to a new custom object with localizable attributes

90.

A Digital Developer is adding support for an additional language other than the default. The locale code for the new language is de. In which folder should the developer place resource bundles?

a)

templates/de

b)

templates/default

c)

templates/resources

d)

templates/default/resources

91.

Universal Containers wants to give customers the ability to refine product search results by a product custom attribute, weightCapacity. Which series of steps should a Digital Developer take to show this refinement on the storefront?

a)

Define a sorting rule for weightCapacity, then rebuild the product search index

b)

Define a search refinement for weightCapacity, then rebuild the product search index

c)

Define search-suggestion buckets for weightCapacity, then rebuild the product search index

d)

Define a search refinement for weightCapacity, then clear the page cache segment for Search-Show

92.

A Digital Developer needs to store information temporarily and decides to create a custom object. Which code creates a custom object?

a)

CustomObject.createCustomObject(CustomObjectType,primaryKey);

b)

CustomObject.createCustomObject(primaryKey,CustomObjectType);

c)

CustomObjectMgr.createCustomObject(primaryKey);

d)

CustomObjectMgr.createCustomObject(CustomObjectType,primaryKey)

93.

A Digital Developer has been given a requirement to add fault tolerance to an existing web service integration that uses Service Framework. Administrators at Universal Containers need to be able to configure the timeout and rate limiting. Which approach should the Developer use to implement the requirement?

a)

Implement a ServiceUnavailableException exception handler to execute fallback code

b)

Implement a condition that checks to see if the response was empty and execute fallback code if true

c)

Create a site preference to store timeout settings and implement an IOException handler to execute fallback code

d)

Use the setTimeout method to execute fallback code if the request has NOT completed

94.

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?

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)

Var customobject = dw.object.CustomObjectMgr. createCustomObject  (‘NewsletterSubscription’,’email’, newsLetterForm.email.value);

95.

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.Basket.products{loopstatus}

c)

loopstatus.product

d)

pdict.product

96.

Why should a Digital Developer use ProductSearchModel.getProducts() instead ofCategory.getOnlineProducts() to access products?

a)

It is more readable code

b)

It has fewer lines of code

c)

It uses the search index

d)

It reduces accesses to the application server

97.

A Digital Developer extends a system object, Product, and adds a Boolean attribute, “sellable,” to it. Assuming “prod” is the variable name handling the product, what code can the Developer use to access it?

a)

prod.extended.sellable

b)

prod.sellable

c)

prod.persistable.sellable

d)

prod.custom.sellable

98.

The following sample code is NOT providing the desired results. The Digital Developer needs to add an entry to the logs to debug the problem.

Which statement correctly adds a log entry?

a)

Logger.exception(‘Unable to find Apple Pay payment instrument for order.‘+paymentInstruments);

b)

Logger.getErrorLog().log(‘Unable to find Apple Pay payment instrument for order.‘+paymentInstruments);

c)

Logger.fault(‘Unable to find Apple Pay payment instrument for order.‘+paymentInstruments);

d)

Logger.error(‘Unable to find Apple Pay payment instrument for order.‘+paymentInstruments);

99.

A Digital Developer wants to selectively retrieve products and process them from an iPhone. Which action should the Developer take, given that JavaScript controllers CANNOT be used?

a)

Use import/export in Business Manager

b)

Create a webservice to retrieve products

c)

Use OCAPI and invoke it in native language

d)

Use WebDAV Client to retrieve products

100.

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. What is the Reason?

a)

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

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

101.

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?

a)

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

b)

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

c)

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

d)

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

102.

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?

a)

dw.ocapi.shop.order.validateOrder

b)

dw.ocapi.shop.basket.calculate

c)

dw.ocapi.shop.basket.afterPostShipment

d)

dw.ocapi.shop.order.afterPOST

103.

Universal Containers specifies a new category hierarchy for navigating the digital commerce storefront. A Digital Developer uses Business Manager to manually create a catalog with the specified category hierarchy, then uses the Products & Catalogs > Import & Export module to export the catalog as a file. How can other Developers with sandboxes on the same realm create the same catalog in their own sandboxes?

a)

Use Business Manager to upload and import a copy of the export file obtained from the original Developer

b)

Use the remote upload capability of the Site Import & Export module of Business Manager

c)

Use the import capability of the Site Import & Export module of Business Manager

d)

Use the Business Manager Data Replication module to replicate the catalog from the original Developer’s sandbox

104.

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?

a)

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

b)

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

c)

Add an <isscript> to the template, and call StoreMgr.searchStoresByCoordinates()

d)

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

105.

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

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

106.

Given the following snippet:

Server.append(“Show”), function (req, res, next)

According to SFRA, wich options shows a correct way to complete the code above in order to provide data to the response using a controller?

a)

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

b)

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

c)

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

d)

res.render('/content/myPage'); next();

107.

Universal Containers wants to associate a region code value with an order to indicate the general area of its destination. This region code must be accessible whenever the order history is displayed. What is required to accomplish this?

a)

Store the region code value in a session variable

b)

Define a custom attribute on the Order system object type to store the region code value

c)

Define a custom object type to store the username with the region code

d)

Store the region code value in the geolocation system attribute of the Order

108.

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

a)

Enable cache information in the storefront toolkit and view the cache information for the product 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

109.

A Digital Developer must give users the ability to choose an occasion (holiday, birthday, anniversary, etc.) for which gifts are currently being selected. The data needs to be persistent throughout the current shopping experience. Which data store variable is appropriate, assuming there is no need to store the selection in any system or custom objects?

a)

Request scope variable

b)

Page scope variable

c)

Session scope variable

d)

Content slot variable

110.

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.info(‘Unexpected service response’)

b)

Logger.debug(‘Unexpected service response’)

c)

Logger.error(‘Unexpected service response’)

d)

Logger.warn(‘Unexpected service response’)

111.

Given a job step configured in the steptype.json, a developer needs to add a custom status code “No_FILES_FOUND”. Which code snippet will complete the requirement?

a)

var status = {success: ‘OK’. Message: ‘NO_FILES_FOUND’}; return status;

b)

var status = require(‘dw/system/status’); return new Status(Status.OK, ‘NO_FILES_FOUND’);

c)

this.status = ‘NO_FILES_FOUND’ return this;

d)

return ‘NO_FILES_FOUND

112.

A merchant wants customers to be able to order gift vouchers via their site. Since they can issue an unlimited number of these digital vouchers, this item should be available to sell at all items. How can a developer use Business Manager to ensure that the gift vouchers are always available?

a)

Check the perpetual flag in the product inventory record

b)

Check the Available to Sell (ATS) flag dor the producto set

c)

Set StockLevel = maxAllocation for the product

d)

Manually set the inventory to a high number

113.

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?

a)

addressForm.invalidateFormElement("addressid");

b)

addressForm.addresssid.invalidateFormElement = true;

c)

addressForm.invalidateFormElement(addressForm.addressid);

d)

addressForm.addresssid.invalidateFormElement();

114.

A Digital Developer suspects a logical error in a script. Which action will help locate the error?

a)

Submit a support ticket to B2C Commerce

b)

Check request logs for evidence of the logical error

c)

Put breakpoints in the code, debug, and examine variable values

d)

Print all values in the script node called before the current script

115.

A Digital Developer is requesting product information for an external integration. The following Open Commerce API (OCAPI) request is NOT functioning correctly:

How should the Developer change the request?

a)

Change the URI to /dw/shop/v18_3/products/creative-zen-v.

b)

Change the HTTP method to PUT

c)

Change the HTTP method to GET

d)

Include an authentication token in the request

116.

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

a)

Content slots

b)

Images and other static assets

c)

Products

d)

Folders

e)

Content assets

117.

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?

a)

Use the service credential URL field

b)

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

c)

Use a Sitepreference dedicated for the service URL

d)

Use a Globalpreference dedicated for the service URL

118.

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 is cleaned. Given the above requirement, where should the developer create that partition in Business Manager?

a)

Administration > Sites > Manage Sites > Site > Cache

b)

Operations > Site > Manage Sites > Cache

c)

Operations > Cache > Site

d)

Site > Site Preferences > Cache

119.

A Digital Developer creates a B2C Commerce server connection in their UX Studio workspace. The Developer adds new cartridges to the workspace, but the cartridges do NOT execute as the Developer expects.  Which three things should the Digital Developer verify to ensure the cartridges are uploaded? (Choose three.)

a)

The Auto-Upload setting is enabled for the server connection

b)

The Active Server setting is enabled for the server connection

c)

The credentials for the server connection are correctly entered

d)

The cartridge is for the current version of B2C Commerce

e)

The server is configured to accept incoming connections

120.

A Digital Developer needs to check for product inventory in a specific inventory list using the Open Commerce API. An example request URL is:

Which resource_id value enables the appropriate resource?

a)

/inventory_lists/*

b)

/inventory_lists/**

c)

/inventory_list_search

d)

/products/*

121.

Which line of code creates a content slot that can be included on homepage.isml to display on the home page?

a)

<isslot id="my_banner " description="for home page" type="global" context="content" context-object="${pdict.ContentSearchResult.content}"/>

b)

<isslot id="my_banner " description="for home page" type="global" context="homepage"/>

c)

<isslot id="my_banner " description="for home page" context="global">

d)

<isslot id="my_banner " description="for home page" context="global" context-object="${pdict.CurrentHomePage}"/>

122.

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?

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

123.

Universal Containers created a site export file from staging in the global export directory. How should the Digital Developer update their sandbox using this staging site export file?

a)

Perform a data replication from staging

b)

Use the Site Development > Site Import & Export Business Manager module

c)

Download the site export file and use UX Studio to transfer the data to the sandbox

d)

Use the Site Development > Import & Export Business Manager module

124.

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?

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

125.

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?

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

126.

A Digital Developer is asked to optimize controller performance by lazy loading scripts as needed instead of loading all scripts at the start of the code execution. Which statement should the Developer use to lazy load scripts?

a)

importPackage () method

b)

$.ajax () jQuery method

c)

local include

d)

require () method

127.

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?

a)

Replace the existing routes by creating a controller in separate new cartridge

b)

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

c)

Append a new function to all the existing routes with the server module

d)

Define a new middleware function and use it in the existing routes

128.

A developer is asked to write a job that is responsible for updating the customer order based upon a trigger from the Order Management System (OMS). While all the information for the order remains the same, the Order number provided by the OMS needs to replace the existing Order Number. The developer chooses to use the B2C OCAPI hooks to update the order to achieve the above requirement. According to best practices which OCAPI call should the developer use along with which OCAPI hook?

a)

PATCH /orders/{order_no} with dw.ocapi.shop.order.beforePATCH

b)

DELETE /orders/{old_order_no} with dw.ocapi.shop.order.afterDELETE

c)

PATCH /orders/{order_no} with dw.ocapi.shop.order.afterPATCH

d)

POST /orders/{order_no} with dw.ocapi.shop.order.afterPOST

129.

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?

a)

Add the creation date to the attributes of the Custom Object

b)

Mark the existing creation date attribute as visible

c)

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

d)

Assign the current date/time to a new custom attribute, creationDate, via code

130.

Refer to this example snippet of an ISML template:

<h2>Welcome back, ${pdict.username}.</h2>

The “pdict.username” variable does not print correctly when used in a similar template. Assuming that the variable is correct in the Controller's “viewData”, how should a developer temporarily modify their code to use a debugger and troubleshoot the issue in the template?

a)

Add an <isbreak> tag to have the debugger stop at the desired line

b)

Add an <isscript> tag and JavaScript with a breakpoint set

c)

Add a local <isinclude> tag to inspect the topLevel function in the call stack

d)

Add an <isdebug> tag to allow the inspection of global variables

131.

A developer receives a product image that needs to be uploaded to the catalog. What should the developer use to upload this image?

a)

Products & Catalogs module of Business Manager

b)

Sites/Impex WebDAV Directory

c)

Content Image Import module of Business Manager

d)

Site Development Import & Export module of Business Manager

132.

A developer is asked to create a controller endpoint that will be used in a client-side AJAX request. Its purpose is to display updated information to the user when the request is completed, without otherwise modifying the appearance of the current page. According to SFRA practices, which method best supports this objective?

a)

res.json()

b)

res.render()

c)

res.print()

d)

res.log()

133.

A merchant uploads an image using the Content Image Upload module of Business Manager. Which three modules can the merchant or developer use to display the image on the Storefront? (Choose three.)

a)

Content assets

b)

Storefront catalogs

c)

ISML templates

d)

Content slots

e)

Payment types

134.

A developer is tasked with implementing the necessary code for a new Page Designer component. What are the two purposes of the JSON metadata definition file that the developer creates? (Choose two.)

a)

Defines the responsive layout of the rendered template

b)

Defines regions within the component type

c)

Defines the attributes that a merchant enters when using the component type

d)

Defines the business and rendering logic of the component required by the merchant

135.

A developer created a basic SFRA form to capture the customer’s first name, last name, and email address and render it on the next page. The developer is able to see all form elements and is able to enter information and submit. However, the developer notices that the submitted information is not getting rendered on the Storefront. Which two mistakes might cause this issue? (Choose two.)

a)

The actionUrl does not have any form action set

b)

The form object is not passed to the rendering template

c)

The form definition is incorrect

d)

The form does not pass all validations

136.

A developer has a B2C site and a merchant requirement to add a new locale to it. What are the steps to enable the locale in the Storefront?

a)

Update the language under the Organization Profile section

b)

Create, configure, and activate the locale under Global Preferences section

c)

Add an alias for the new locale and then create and configure the locale itself under Global Preferences section

d)

Create and configure the locale under Global Preferences section and activate it in Site Preferences

137.

Which windows should a developer have open when developing a storefront application?

a)

Integrated Development Environment, Business Manager, and the storefront application

b)

Salesforce, Business Manager, and the ecommerce website

c)

Google, GitHub, and the storefront application

d)

Commerce Cloud overview page, Trailhead, and Business Manager

138.

What are three things you can customize in the Business Manager user interface?

a)

Language preferences, your avatar, your background theme

b)

Permission sets, profiles, and time zones

c)

Page cache settings, site taxation, and code versions

d)

Menu items, menu actions, and forms

139.

What does MVC stand for in the MVC architecture?

a)

Model-View-Commerce

b)

Model-View-Controller

c)

Most Valuable Commerce

d)

Moody Velociraptors Cry

140.

What are the three key B2C Commerce software development tools?

a)

Business Manager, templates, and form definitions

b)

Java, JavaScript, and controllers

c)

Business Manager, Visual Studio Code, and the Commerce Cloud Storefront Reference Architecture

d)

Controllers, OCAPI, and form definitions

141.

What does the B2C Commerce LINK Technology Partner Program provide?

a)

Links to helpful websites, knowledge articles, and coupon codes

b)

A world-class ecosystem of capabilities for merchants to deliver ecommerce solutions

c)

Links to partners who develop AppExchange apps

d)

Fan club for the starring character in a popular video game

142.

What is mobile-first design?

a)

Starting with the desktop and sizing down

b)

Starting with the smallest screen and working up

c)

Writing the code for your website on your smartphone

d)

Using a LINK cartridge

143.

What are four system objects that are used in Commerce Cloud Storefront Reference Architecture?

a)

Basket, Campaign, Category, Content

b)

Leads, Opportunities, Accounts, Contacts

c)

Chatter, Store, Home, Leads

d)

Reports, Dashboards, Store, Campaign

144.

What's a best practice for using objects in B2C Commerce?

a)

Use custom attributes as often as possible throughout your deployment

b)

Make a duplicate custom object for each existing system object

c)

Use system objects instead of custom objects whenever possible

d)

Use custom objects instead of system objects whenever possible

145.

The best way to deal with any schedule impact is to identify the gaps, document them, and then create a plan for their completion.

a)

True

b)

False

146.

Which of these is part of checkout? Choose 2

a)

Billing

b)

Shipping

c)

gift Registry

147.

Which of these are key functional areas that you must check prior to launch?

a)

Products, catalogs, search, and competition

b)

Search, online marketing, and orderings

c)

Ordering, customer recommendations, and site URLs

d)

Site preferences, search statistics, and customer group

148.

Which of these ensures that prices appear in the storefront? Choose 2

a)

At least one price book is configured in Business Manager.

b)

The price book is assigned to a promotion

c)

The price book is activated

149.

Why is customizing a storefront application is a common, if not expected, practice?

a)

By design, the standard functionality doesn't often meet a merchant's full requirement set

b)

A B2C Commerce storefront is simple to update

c)

It makes merchants and developers happy to add cool features

d)

Many IT organizations like the challenge

150.

How can overriding or extending a controller impact performance?

a)

Extending can result in duplicate iterations of the same external third-party interaction

b)

The application might execute the original middleware before the extension

c)

Overriding can wipe out important processes

151.

Why are third-party integrations essential? Choose 2

a)

B2C Commerce was built that way

b)

Everyone wants to develop tax applications

c)

Third-party providers bring their special expertise to the storefront table

152.

Which of these gaps might occur when integrating a third party? Choose 2

a)

Integration tasks take too long

b)

Certain prerequisites are unavailable

c)

Displaying products takes a lot of resources

153.

Why is it important to separate business functions from code

a)

It increases update complications

b)

It reduces update complications

c)

It lets you copy code and data in separate batches

154.

Which of these are content slot planning considerations? Choose 2

a)

How frequently does a content asset change

b)

The max number of promotions per content slot

c)

The max number of content slots per page

d)

When should content slots be replicated

155.

Why is it important to mirror page and catalog navigation? Choose 2

a)

It ensures that merchants can control the categories that appear in the storefront navigation and the order in which they appear

b)

It lets merchants take a good look at both

c)

The page flow matches the storefront catalog structure, simplifying navigation for both the merchant and the shopper

156.

Why are quotas important?

a)

They ensure the efficiency and stability of the applications that use them

b)

They are critical for online sales

c)

They significantly reduce update complications

d)

They ensure user-friendly code

157.

Why is it important to understand mobile best practices?

a)

You can give more informed advice to the merchant and your team

b)

It's critical for good job references

c)

It makes you sound smart

d)

It improves shopper site adoption

158.

Which of these are responsive design best practices? Choose 2

a)

Include breakpoints in the design

b)

Minimize page weight

c)

Use a separate URL per device

159.

These are the international strategy approaches: One site, group sites, and one site for each country

a)

Yes

b)

No

160.

Why is it important to have a real understanding of a language when localizing? Choose 2

a)

It ensures a truly localized website experience for the shoppers

b)

You'll be able to communicate better when you visit

c)

Using common expressions, appropriate language, and proper spelling protects SEO

161.

The SFRA modules directory is a cartridge

a)

True

b)

False

162.

The cartridge path controls the behavior of your site

a)

True

b)

False

163.

Cartridges can only be uploaded using VSCode

a)

True

b)

False

164.

Which one of these is considered a best practice?

a)

Copy app_storefront_base with a new name, make all modifications there, add copy to cartridge path

b)

Create your custom code in a cartridge, and put that cartridge in front of app_storefront_base in the cartridge path

c)

Make changes in app_storefront_base directly

165.

If there are 2 code versions in your sandbox, which one is a true statement?

a)

Cartridge path and versions are totally unrelated

b)

The cartridge path contains all cartridges from the active version

c)

Cartridges uploaded to one version automatically get copied to other versions

d)

During execution, the cartridge path looks for cartridges in the active version

166.

What file does this code refer to: require('server')?

a)

server.js in the modules folder

b)

server.js in app_storefront_base

c)

The first server.js found in the cartridge path

d)

server.js in the modules/server folder

167.

Which of the following statements is not correct?

a)

A controller can invoke another controller

b)

Controllers are commonJS modules

c)

Controllers are the main entry point into the storefront application

d)

Controllers gather the data from the model, and pass the data to the ISML template

168.

Which is not a method for extending a specific controller route (i.e. Home-Show)

a)

Extend

b)

Append

c)

Preppend

d)

Replace

169.

If you extend a controller route, can you prepend as well as append to the same route?

a)

False

b)

True

170.

If you remove next(); on a route, what is the effect?

a)

It goes to the next iteration on a loop

b)

The next middleware function in the chain is not executed

c)

It is the same as using a replace on the route

d)

It does not break anything, just exits the route

171.

Where can you find the methods of the response (res) attribute used in routes? For example, res.render()

a)

Under SFRA / Server-side JS / Class: Response documentation

b)

It is part of the server middleware functions, not literaly documented

c)

Under dw.system.Response documentation

d)

Under the commonJS documentation

172.

What is a model?

a)

The representation of the data in an MVC architecture

b)

The person wearing the clothes on the storefront

c)

he module for the View

d)

It is a template in Business Manager

173.

What are two traits of a model? Pick 2

a)

It is a function that only the controller calls

b)

It is the object that represents the data the controller sends to the view

c)

It is a serializable JSON object

d)

It is a model in the modules folder

174.

What is a decorator?

a)

It is an object that decorates the ISML page

b)

It is a subset of the model that makes it easier to extend the model

c)

It is a hardcoded JSON file that decorates the model

d)

It is a person that decorates homes

175.

How do you extend a model? Pick 2

a)

Use module.superModule to identify the model to extend

b)

Copy/paste the model code into your cartridge

c)

Use base.call() passing the same parameters that the base model needs

d)

Use yourmodel.extends(basemodel)

176.

Some of the core models are extendable and configurable through decorator pattern.

a)

True

b)

False

177.

What does ISML stand for?

a)

Nothing

b)

Index Store Material Language

c)

Internet Store Markup Language

d)

Individual Store Markup Language

178.

What is a characteristic of a template?

a)

They are rendered by controllers

b)

They render data by using a mixture of HTML and ISML tags

c)

They receive a JSON model from the controller

d)

All of the above

179.

Pdict stands for pipeline dictionary

a)

False

b)

True

180.

What tag would you use to manage conditional logic?

a)

isloop

b)

isbreak

c)

iselse

d)

isactivedatahead

181.

What tag would you use to manage collect active data?

a)

isloop

b)

isnext

c)

isactivedatacontext

d)

isif

182.

A decorator template is the same as a model decorator

a)

True

b)

False

183.

What are the two decorator templates used in SFRA?

a)

decorator.isml

b)

storefront.isml

c)

checkout.isml

d)

page.isml

184.

Remote include allows you to call another controller route and include its rendered HTML on the current page.

a)

True

b)

False

185.

Form metadata is an ____ file located in the cartidge/forms folder

a)

XML

b)

JPG

c)

PNG

d)

HTML

186.

The actionURL must be one of the following:

a)

Action-Login

b)

Account-Handler

c)

Newsletter-Handler

d)

Login-Handler

187.

Labels use the _____ defined in the form metadata

a)

pdict.form.field.label

b)

pdict.field

c)

pdict.label

d)

metadata.label.field

188.

What path defined in package.json do you use to find utility scripts?

a)

End

b)

Field

c)

Bottom

d)

Base

189.

The handler route uses ____ to send a JSON object containing status and a redirectURL to the client side.

a)

Redirect.json()

b)

Respond.json()

c)

Response.json()

d)

Resply.json()

190.

success:function (data) {

TAB $form.spinner().stop();

TAB if(!data.success) {

TAB TAB formValidation($form, data);

TAB ) else{

TAB TAB href=data.redirectURL;

TAB }

}

In the code above the formValidation scripts display what kind of errors?

a)

Server-side validation errors

b)

Object errors

c)

All of the above

d)

No errors will display

191.

What does CSRF Protection stand for?

a)

Cross-site Request Forgery

b)

Client-side Request Forgery

c)

Cross-site Request Form

d)

Client-side Reminder Form

192.

_____ allow you to extend the data model to store custom data.

a)

Client-Side Objects

b)

Custom Objects

c)

Metadata

d)

Transactions

193.

What are two ways to create a custom object definition in Business Manager?

a)

Manually define all fields

b)

Import a custom object definition metadata file

c)

Export all data files

d)

Map all custom fields

e)

Import folder from Business Manager

194.

What do you need to save any persistent system or custom object?

a)

Transactions

b)

Custom objects

c)

Middleware

d)

All of the above

195.

It’s the best practice to log informational messages and warnings that could happen during the normal execution of your code.

a)

True

b)

False

196.

The Log Center allows you to filter logs by what two filters?

a)

Severity

b)

Product

c)

Category

d)

Line

e)

Custom Object

197.

To make sure your transaction is the last thing that gets handled by the Handler route, use the ______ event.

a)

route.afterComplete

b)

route.beforeComplete

c)

Complete.Route

d)

pdict.beforeRoute

198.

What kind of hook is a newer REST API offered by Salesforce?

a)

OCAPI Hook

b)

Captain Hook

c)

Custom Hook

d)

Standard Hook

199.

What is another name for a Custom Hook?

a)

OCAPI Hook

b)

Out-of-the-box Hook

c)

SFRA Hook

d)

Transaction Hook

200.

What do you use to configure functionality to be called at a specific point in your application flow or at a specific event?

a)

Multiple payment providers

b)

Hooks

c)

Business Manager

d)

Classes

201.

What is an example of extension_point_name?

a)

Calculate

b)

dw.order.calculate

c)

Basket.purchase

d)

json.hooks

202.

Given a B2C Commerce client with these specifics:

Sells in two different countries: US and IN

Uses only the English language

A developer has a requirement to add a new field to the IN registration form that must not appear

in the US one.

Which path should be created to accomplish this requirement? (GOT IT)

a)

cartridge/forms/profile_en_IN.xml

b)

cartridge/forms/profile_in.xml

c)

cartridge/forms/in/profile.xml

d)

cartridge/forms/en_IN/profile.xml

203.

When exporting a site catalog from an external system, which file format or formats should a

developer use so it can be imported into a B2C Commerce site? (GOT IT)

a)

XML only

b)

CSV only

c)

XML and JSON

d)

JSON only

204.

A developer uses the call() instance method of dw.svc.Service to invoke a web service and

implemented the callback methods defined by the dw.svc.ServiceCallback class.

Which callback method is required only when invoking a SOAP service? (GOT IT)

a)

initServiceClient

b)

parseResponse

c)

mockCall

d)

createRequest

205.

Given the requirement to add caching to an existing page while adhering to SFRA best practices,

which code snippet should be used? (GOT IT)

a)

server.get(‘Show’, cache.applyDefaultCache, function (req, res, next) {

// code

});

b)

<iscache varyby=”price_promotion” type=”relative” status=”on”/>

c)

server.get(‘Show’, function (req, res, next) {

//code

}).applyDefaultCache();

d)

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

206.

A developer is implementing new Page Designer content on a merchant’s Storefront and adds the

line below to the setupContentSearch function in the searchHelpers.js file.

apiContentSearchModel.setFilteredByFolder(false);

What does this achieve? (GOT IT)

a)

Filters Page Designer search results into folders

b)

Prevents Page Designer pages from being searchable

c)

Allows Page Designer pages and components to be searchable

d)

Allows filtering Page Designer pages by folder