Font size
WorksheetsB2C Commerce Developer
Total questions: 206
Worksheet time: 7hrs 45mins
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)
Use the Catalog Export module to export the site catalog.
Use the Catalog Export module to export the master catalog, with a category-assignment search to export specific products.
Use the Site Import & Export module to export both the site catalog and the master catalog in a single archive.
Use the Site Import & Export module to export the master catalog, filtered by site catalog categories to export specific products.
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)
{ “hooks”: “./cartridge/scripts/hooks.json” }
{ “hooks”: “./scripts/hooks.json” }
{ hooks: “./cartridge/scripts/hooks.json” }
{ hooks: ./scripts/hooks.json }
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)
The Storefront catalog is offline
The category does not contain available products
The category is not sorted
The category is offline
Which statement logs the HTTP status code to a debug-level custom log file? (GOT IT)
logger.getLogger(‘profile’).debug("Error retrieving profile email, Status Code: ", http.statusCode);
logger.debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode);
Logger.getLogger().debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode);
Logger.getLogger(‘profile’).debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode);
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)
System type extensions (sites only)
Site Jobs (sites)
Search Settings (Search and Sites)
Promotions ( sites and online marketing)
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)
Add component_type_inclusion in the layout json configuration
Add component_type_exclusions in the layout json configuration
Add layout_type_inclusion in the target components json configurations
Add layout_type_exclusion in the other asset components json configuration
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)
HTML Form
SOAP Form
POST Form
HTTP Form
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)
VIP Customer Group
Page Template
Slot Configuration
Rendering Template
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)
Use a non-replicable Custom Object to store the information temporarily
Use the Session class in the B2C Commerce API
Use an SFRA controller, because it runs server-side, the state is automatically maintained
Use a client-side cookie to store the information for the session duration
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)
Change the slot’s configuration content type to “products.”
Change the slot’s configuration content type to “recommendations.”
Change the slot’s configuration template to the appropriate rendering template
Delete the existing content asset
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)
Custom Objects can only be created by Job scripts
The Subscribe route is missing the server.middleware.httpt middleware
The Custom Object creation is not wrapped in a Transaction
The CustomObjectMgr variable should be declare outside of the route
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 controller
A middleware script
A decorator
A model
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)
Server.form.getForm(‘dwfrm_newsletter’)
Server.form.getForm(‘newsletter’)
Server.forms.getForm(‘newsletter’)
Server.forms.getForm(‘dwfrm_newsletter’)
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)
$include(‘Page-Include’, ‘cid’, ‘terms-and-conditions’)$
$http(‘Content-Page’, ‘cid’, ‘terms-and-conditions’)$
$httpUrl(‘Content-Show’, ‘cid’, ‘terms-and-conditions’)$
$url(‘Page-Show’, ‘cid’, ‘terms-and-conditions’)$
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)
Change the "resource_id" value to: "/baskets/*/items"
Change the "write_attributes" value to: "(+items)"
Change the "read_attributes" value to: "(items)"
Change the "methods" value to: ["get", "post"]
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)
custom-export
custom-products
products
info-export
Which three operations should be done in a controller? Choose 3 answers (GOT IT)
Generate the response as JSON or HTML
Use the Script API to generate data for the view
Use middleware functions when applicable
Create a plain JavaScript object representing a system object
Use the model needed for the view
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)
Set the product system object type as localizable
Add a resource file for every locale for which the attribute needs to be translated
Add a custom attribute and set the custom attribute as localizable
Add a custom attribute for each locale
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)
In the controller function that displays the form
In the middleware chain of the controller post route
In the controller function that handles the submitted form
In the model function that persists the form data
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)
Locale Payments
Payment Methods
Payment Processors
Apple Pay
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)
Require and render templates with <isscript> tags
Use local template includes
Implement template decorators paired with replace tags
Embed partial files using ISML expressions
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)
Add a Localizable custom attribute to the Certificate system object type
Add and Image custom preference to the Sitepreference system object type
Add a Site-specific custom attribute to the Product system object type
Add a Localizable custom preference to the SitePreference system object type
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)
Create a copy of existing address.xml file in the default folder. Rename that file to address_US.xml
Create a new sub-folder in the forms folder. Name it US. Copy existing address.xml file in the new folder
Create a copy of existing address.xml file in the default folder. Rename that file to address_en_US.xml
Create a new sub-folder in the forms folder. Name it en_US. Copy existing address.xml file in the new folder
A developer wants to add a link to the My Account Page. What is the correct code to accomplish this? (GOT IT)
A. <a href=”${URLUtils.get(‘Account-Show’)}>${Resource.msg(‘myaccount’,’account’,request.locale())}</a>
<a href=”${url.get(‘Account-Show’)}>${Resource.message(‘myaccount’)}</a>
<a href=”${URLUtils.url(‘Account-Show’)}>${Resource.msg(‘myaccount’,’account’,null)}</a>
<a href=”${URLUtils (‘Account-Show’)}>${ResourceMgr.getPropierties(‘myaccount’,’account’,null)}</a>
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)
Set the cartridge path so that app_newsite is before app_storefront
Set the cartridge path so that app_storefront is before int_cybersource
Set the cartridge path to include only app_newsite
Set the cartridge path so that app_newsite is after app_storefront
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)
Merchant Tools > Ordering > Payment Methods
Merchant Tools > Site Preferences > Apple Pay
Merchant Tools > Ordering > Payment Processors
Merchant Tools > Site Preferences > Payment Types
A Digital Developer selects “Show Orderable Products Only” in the Search > Search Preferences Business Manager module. Which business goal does this accomplish? (GOT IT)
Exclude products from search results if Available to Sell (ATS) = 0
Exclude back-ordered products from showing on the website
Block displaying the product detail page if Available to Sell (ATS) = 0
Exclude pre-order products from search results
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)
Instance Version
Instance Hostname
Business Manager Username
Keystore Password
Business Manager Password
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)
Resource_id
Read_attributes
Client_id
Version_range
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)
In Global preferences, check the box for Enable custom logging in Request Log
In Site Preferences, check the box for Enable custom Logging in Request Log
In Custom Log Settings, check the DEBUG box for Select Log Levels Written to Files
In custom Log Settings, activate the loggin category at DEBUG level
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)
Pipeline profiler
Code Profiler
Storefront Toolkit
Reports and Dashboards Module
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)
Task A, then C, then B
Task B, then C, then A
Task A, then B, then C
Task B, then A, then C
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)
client_project:app_project:storefront_controllers:storefront_core
app_project:storefront_controllers:storefront_core
app_project:client_project:storefront_controllers:storefront_core
storefront_core:storefront_controllers:client_project:app_project
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)
<isdecorate> … </isdecorate>
<iscontent> … </iscontent>
<isreplace> … </isreplace>
<isinclude> … </isinclude>
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)
FTP
SOAP
HTTP Form
WebDAV
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)
dw.ocapi.shop.basket.shipment.afterDELETE
dw.ocapi.shop.basket.shipment.beforePATCH
dw.ocapi.shop.basket.shipment.beforeDELETE
dw.ocapi.shop.baskep.shopment.beforePOST
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)
Make sure that the developer has “Administrator” Access, then change the Taxation setting to Gross
Unlock the site preferences and then change the Taxation setting to Gross
Change the global setting,”Enable Taxation Methods” to true, then change the Taxation setting to Gross
Create a new site with Taxation set to Gross, then delete the old site
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)
Checkout exclusion rules in the Merchant Tools > Site Preferences > Checkout Preferences module
Credit card exclusion rules in the Merchant Tools > Site Preferences > Payment Preferences module
Credit cards in the Merchant Tools > Ordering > Payment Methods module
Credit card exclusion rules in the CreditCardType.json configuration file
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)
Add a Boolean custom attribute to the Store system object
Configure the existing Store custom object type definition
Create a new SingleBrandStore custom object configuration
Adjust the relevant Site Preference in the Stores group
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)
Tax Region is configured wrong
Tax Country is missing
Tax Jurisdiction is missing
Tax Locale is configured wrong
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)
Ensure that the debug log level is enabled to write to file in the Custom Log Settings Business Manager module
Archive old log files to make room in the log directory
Ensure that the “login” category is added to the Custom Log Filters in the Log Settings Business Manager module
Ensure that the debug log level has been added to the custom log level types in the Global Preferences business manager module
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)
Your parcel weighs 10 stones
Your parcel weighs 10 pounds
Your parcel weighs 10 undefined
Your parcel weighs 10 kilos
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)
Set the logging global preference to true
Set the log retention to a value higher than 0
Request that the developer’s account be given permission to the Log Centerof the current realm
Set the root log level to debug
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)
Implement an XML file with a <render> node
Implement a JavaScript file with a render() function
Implement a Controller file with a “render” route
Implement a metadata JSON file with a “render” property
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)
Change the data type of the attributes
Set the attributes to site-specific replicable
Create an Attribute Group with the desired attributes in it
Sort the attributes in the custom object type
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)
Logs will be written to the log file with a prefix loggerFile
Logs will not be written
Logs will be written to the log file with a prefix customwarn
Logs will be written to the log file with a prefix custom-loggerFile
What are two appropriate uses of the <isif> ISML tag that follow B2C Commerce and SFRA best practices? (Choose two.) (GOT IT)
Display a section of the page to logged users only
Show a different <div> tag depending on a pdict Boolean variable
Redirect users to the registration page if they are not logged in
Implement involved business logic through conditional statements
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)
URL Request Analyzer
Request Logs
Pipeline Debugger
Pipeline Profiler
Which two of these situations are appropriate cases for using the B2C Commerce OCAPIs? (Choose two.) (GOT IT)
Extending System Object Type definitions with new attributes
Displaying a list of B2C Commerce products in a mobile app
Showing the customer's information in their B2C Commerce “My Account” page
Updating Inventory information from a management software
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)
Write specific custom code in the Content Asset for a customer that is a registered, versus unregistered, user
Add specific custom messages in Page Designer for a customer that is a registered, versus unregistered, user
Set the Content Slot configuration so it is based on the system customer group registered, versus unregistered
Set the Content Asset configuration for a customer that is a registered, versus unregistered, user
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)
dw.svc.webref.getDefaultService()
dw.svc.LocalServiceRegistry.getDefaultService()
dw.svc.LocalServiceRegistry.createService()
dw.svc.LocalServiceInstance.createService()
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)
Check that the search index was recently rebuilt
Check the Business Manager site cartridge path
Check that the correct code version is selected
Check the Storefront site cartridge path
What is accomplished by the code below? <isinclude url=”${URLUtils.url(‘Account-Header’, ‘mobile’, true)}” /> (GOT IT)
Performs a local include from the Account-Header endpoint
Performs a remote include from the Account-Header endpoint
Creates a link to the Account-Header endpoint that allows mobile navigation
Performs a call to the Account-Header endpoint to allow mobile navigation
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)
Enables searching to find Page Designer content assets that are not in folders
Prevents Page Designer pages and components from being searchable
Extends the ContentSearchModel to allow the folder filter
Filters Page Designer search results into separate page and componente folders
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)
True
False
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?
Create a service and implement the mockfull callback and a sitepreference to enable or disable the mock response
Create a service and implement the mockFull callback and set the service mode to mock
Create a service and a Sitepreference that induce the service to respond witch a mock response using a conditional
Create two services, one mock and the real one, and a Sitepreference that enable the mock or the real one
What happens if the log file size limit is reached in custom logging?
Logging is suspended for the day
Logging is suspended for two hours
The log file is deleted and recreated from scratch
The log file rolls over and the last used log is overwritten
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?
Set the active code version to use the latest compatibility mode
Remove invalid characters from the code version’s name
Remove invalid characters from cartridge file and folder names
Set the server connection’s target version directory to the active code version
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?
https://test.demandware.com/dw/shop/products/M1355?client_id=aaa...
https://www.test.com/s/test-site/sfc/shop/products/M1355?client_id=aaa...
https://test.demandware.net/s/test-site/dw/shop/v18_3/products/M1355?client_id=aaa...
https://www.test.com/dw/shop/v18_3/products/M1355?client_id=aaa...
Which three configuration does a developer need to ensure to have a new product visible in the
Storefront?Choose 3 answers
The product has a Price
The Storefront catalog that contains the product is assigned to a site
The product has a master product
The product is online and searchable
The search index is built
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?
In the Product Bundles module, create a bundle named “The Basics”
In the Products module, create a product named “The Basics” and add the products to the Product Bundles tab
In the Products module, create a product named “The Basics” and add the products to the Product Sets tab
In the Product Sets module, create a product set named “The Basics”
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. 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
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
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
Add an <action/> node to the form defition XML with the attribute formid=”addRewardPass”
No change to Cart.js controller
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?
Only Page Designer Components can be localized for different languages
Only content slot configurations can be tied to campaigns
Only page Designer components can ve tied to campaigns
Only content slot configurations can ve localized for different languages
Given the code snippet above, what should be added after this code so it can be used for page component display?
Base.render = render
Module.exports.render = render
Module.exports = render
Module.exports = server.exports()
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?
Rewrite the code that is causing the overage
Change the Business Manager configuration for the quota settings
Take no action, the overage will be resolved when concurrent visitors are reduced
Ask support to remove the quota limit
Universal Containers sells physical gift cards for the holidays. What needs to occur to guarantee the cards will always be available?
Create an inventory record with an unlimited Allocation value
Create an inventory record with an extremely high Allocation value (i.e., 1 billion certificates)
Create a perpetual inventory record
Create an inventory record with Backorder Handling enabled
Which three techniques improve client-side performance in production while following documented best practices? (Choose three.)
Use one style sheet for each ISML decorator template
Place CSS outside of templates
Compress CSS
Use inline Javascript
Combine several images into a single image
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?
Hover over the caching icons now present on the storefront
Open the Request Logs to view the caching information
Start a pipeline debugging session and view the caching information provided
Right-click on the component in UX Studio and view the caching properties of the file
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
Add plugin_bm_extension to the cartridge path under business manager cartridge site
Add the appropiate roles and permission to the user to view the business manager extension
Add plugin_bm_extension to the cartridge path under Storefront cartridge site path
Activate a new code version for the Business Manager Site
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?
Create and use a new script debug configuration
Use the existing pipeline debugger
Modify the debugger configuration and use the existing pipeline debugger
Create and use a new controller debug configuration
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?
logger.getLogger(‘profile’).debug("Error retrieving profile email, Status Code: ", http.statusCode);
logger.debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode);
Logger.getLogger().debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode)
Logger.getLogger(‘profile’).debug("Error retrieving profile email, Status Code: {0} was returned.", http.statusCode)
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?
xyz
custominfo-blade
custom-export
custom-xyz
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.
Update the service to have a faster response time
Modify the code that makes the request to the external service to be wrapped in a try/catch block
Increase the web service time out
Change the code that sets the throwOnError attribute of the service to be true
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?
next()
req.next()
return res
res.next()
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?
Logger.warn(‘The current product is {0} with name {1}’, myProduct.getID(), myProduct.getName())
Logger.warn(‘The current product is {0} with name {1}’), context(myProduct.getID(), myProduct.getName())
Logger.warn(‘The current product is ${myProduct.getID()} with name ${myProduct.getName()}’)
Logger.warn(‘The current product is %s with name %s’), context(myProduct.getID(), myProduct.getName())
An instance has custom logging enabled. The log reaches the file size limit. What happens in this situation?
The log file is deleted and a new log file is created
Logging is suspended for the day
The current log file is archived and a new log file is created
The log file Rolls over and the oldest log messages are overwritten
A Digital Developer has identified that the code segment below is causing performance problems.
What should the Developer do to improve the code?
Use a system attribute instead of the isOnSaleFlag custom attribute
Avoid post-processing and use the isOnSaleFlag attribute as a search refinement
Breaks the process into separate loops
Avoid using an Iterator and use a Collection instead
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?
ISML.renderTemlpate ( "helloworld.isml", { "myProduct": "product" });
ISML.renderTemlpate ( "helloworld.isml", { "product": myProduct });
ISML.renderTemlpate ( "helloworld.isml", { product: myProduct });
ISML.renderTemlpate ( "helloworld.isml", { myProduct: product });
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
Delete the existing content slot and create a new one
Change the rendering template in the slot configuration
Change the default setting in the slot configuration
Change the content type for the slot configuration
Which two methods are efficient and scalable? (Choose two.)
ProductMgr.queryAllSiteProducts()
ProductSearchHit.getRepresentedProducts()
ProductSearchModel.getProductSearchHits()
Category.getProducts()
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?
Create a unique product called ‘Our Top Combo’ and add the four products into the Product Bundles tab
Create a Content Slot with Content Type = Product and add the four component products into that slot
Create a Product Set called ‘Our Top Combo’ and add the products into the set
Create a recommendation rule associating the four products as a recommendation group
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?
Create two copies of the custom object in staging and set Sharing = True
Create the custom object definition in staging as Shared
Create the custom object definition in production as Replicable
Create the custom object definition in staging as Replicable
Given the file structure below, which ISML method call renders the customLandingPage template?
ISML.renderTamplate(‘cartridge/templates/default/content/custom/customLandingPage’);
ISML(‘content/custom/customLandingPage’);
ISML.render(‘content/custom/customLandingPage’);
ISML.renderTemplate(‘content/custom/customLandingPage’);
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?
npm run compile:js, npm run compile:html, npm run clean
npm run compile:scss, npm run compile:html, npm run clean
npm run compile:js, npm run compile: scss, npm run compile:html
npm run compile:js, npm run compile:scss, npm run compile:fonts
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?
checkout_de.properties in resources folder
checkout.properties in the de locale folder
checkout.properties in the default locale folder
de_checkout.properties in resources folder
A job executes a pipeline that makes calls to an external system. Which two actions prevent performance issues in this situation? (Choose two.)
Use synchronous import or export jobs
Configure a timeout for the script pipelet
Disable multi-threading
Use asynchronous import or export jobs
Which two items are appropriate content of custom logs implemented at checkout? Choose 2 answers:
Customer’s password at post-checkout sign up
Order failure information
Transaction’s credit card information
Payment gateway service response code
Which technical reports datapoint measures the performance of a controller’s script execution if network factors and Web Adaptor processing is ignored?
Processing time
Cache hit ratio
Call count
Response time
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?
Utilize resource bundles for translatable values
Set the model field as a localizable attribute
Store translated model values in different fields; one field for each locale
Add model to a new custom object with localizable attributes
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?
templates/de
templates/default
templates/resources
templates/default/resources
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?
Define a sorting rule for weightCapacity, then rebuild the product search index
Define a search refinement for weightCapacity, then rebuild the product search index
Define search-suggestion buckets for weightCapacity, then rebuild the product search index
Define a search refinement for weightCapacity, then clear the page cache segment for Search-Show
A Digital Developer needs to store information temporarily and decides to create a custom object. Which code creates a custom object?
CustomObject.createCustomObject(CustomObjectType,primaryKey);
CustomObject.createCustomObject(primaryKey,CustomObjectType);
CustomObjectMgr.createCustomObject(primaryKey);
CustomObjectMgr.createCustomObject(CustomObjectType,primaryKey)
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?
Implement a ServiceUnavailableException exception handler to execute fallback code
Implement a condition that checks to see if the response was empty and execute fallback code if true
Create a site preference to store timeout settings and implement an IOException handler to execute fallback code
Use the setTimeout method to execute fallback code if the request has NOT completed
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?
Var customobject = dw.object.CustomObjectMgr.createNewsletterSubscription(‘email’, newsLetterForm.email.value);
Var customobject = dw.object.CustomObjectMgr.createCustomObject(newsletterForm.email.value, ‘NewsletterSubscription’);
Var customobject = dw.object.CustomObjectMgr. createCustomObject (‘NewsletterSubscription’, newsLetterForm.email.value);
Var customobject = dw.object.CustomObjectMgr. createCustomObject (‘NewsletterSubscription’,’email’, newsLetterForm.email.value);
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>
product
pdict.Basket.products{loopstatus}
loopstatus.product
pdict.product
Why should a Digital Developer use ProductSearchModel.getProducts() instead ofCategory.getOnlineProducts() to access products?
It is more readable code
It has fewer lines of code
It uses the search index
It reduces accesses to the application server
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?
prod.extended.sellable
prod.sellable
prod.persistable.sellable
prod.custom.sellable
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?
Logger.exception(‘Unable to find Apple Pay payment instrument for order.‘+paymentInstruments);
Logger.getErrorLog().log(‘Unable to find Apple Pay payment instrument for order.‘+paymentInstruments);
Logger.fault(‘Unable to find Apple Pay payment instrument for order.‘+paymentInstruments);
Logger.error(‘Unable to find Apple Pay payment instrument for order.‘+paymentInstruments);
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?
Use import/export in Business Manager
Create a webservice to retrieve products
Use OCAPI and invoke it in native language
Use WebDAV Client to retrieve products
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?
There are conflicting Search Refinement definitions for Clothing and one of its parents categories
The Search Refinement definition is not set up for the Women category
The Search Refinement definition is not set up for the New Arrivals Category
The Search Refinement definitions is not set up for the Root Category
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?
Create a Synonym Dictionary entry: car accessories, household, technology. Use search mode Exact Match
Create a Common Phrase Dictionary entry: car accessories, NOT household, NOT technology. Use search mode Exact Match
Create a Synonym Dictionary entry: car accessories, household, technology. Use search mode First Word
Create a Common Phrase Dictionary entry: car accessories. Use search mode Exact Match
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?
dw.ocapi.shop.order.validateOrder
dw.ocapi.shop.basket.calculate
dw.ocapi.shop.basket.afterPostShipment
dw.ocapi.shop.order.afterPOST
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?
Use Business Manager to upload and import a copy of the export file obtained from the original Developer
Use the remote upload capability of the Site Import & Export module of Business Manager
Use the import capability of the Site Import & Export module of Business Manager
Use the Business Manager Data Replication module to replicate the catalog from the original Developer’s sandbox
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?
Extend the existing Stores_Find controller with a new middleware function that performs the query
Pass the Store system object to the template, so that custom propierties are available
Add an <isscript> to the template, and call StoreMgr.searchStoresByCoordinates()
Use the module.superModule functionality and the call method to add a new property to the Store Model
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.)
Modify the code that makes the request to the external service to be wrapped in a try / catch block
Change the code that makes the request to set the throwOnError attribute, of the service, to be true
Increase the web service time out
Update the external service to have a faster response time
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?
res.viewData = { data: myDataObject }; res.render('/content/myPage'); next();
res.setViewData({ data: myDataObject}); res.render('/content/myPage'); next();
res.render('/content/myPage', {data: myDataObject }); next();
res.render('/content/myPage'); next();
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?
Store the region code value in a session variable
Define a custom attribute on the Order system object type to store the region code value
Define a custom object type to store the username with the region code
Store the region code value in the geolocation system attribute of the Order
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.)
Enable cache information in the storefront toolkit and view the cache information for the product tile
View the cache information provided by the Merchant Tools > Technical Reports Business Manager module
View the product list page cache settings provided in the Administration > Manage Sites Business Manager module
Enable the template debugger to verify the cache times for the producttile.isml template
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?
Request scope variable
Page scope variable
Session scope variable
Content slot variable
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?
Logger.info(‘Unexpected service response’)
Logger.debug(‘Unexpected service response’)
Logger.error(‘Unexpected service response’)
Logger.warn(‘Unexpected service response’)
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?
var status = {success: ‘OK’. Message: ‘NO_FILES_FOUND’}; return status;
var status = require(‘dw/system/status’); return new Status(Status.OK, ‘NO_FILES_FOUND’);
this.status = ‘NO_FILES_FOUND’ return this;
return ‘NO_FILES_FOUND
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?
Check the perpetual flag in the product inventory record
Check the Available to Sell (ATS) flag dor the producto set
Set StockLevel = maxAllocation for the product
Manually set the inventory to a high number
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?
addressForm.invalidateFormElement("addressid");
addressForm.addresssid.invalidateFormElement = true;
addressForm.invalidateFormElement(addressForm.addressid);
addressForm.addresssid.invalidateFormElement();
A Digital Developer suspects a logical error in a script. Which action will help locate the error?
Submit a support ticket to B2C Commerce
Check request logs for evidence of the logical error
Put breakpoints in the code, debug, and examine variable values
Print all values in the script node called before the current script
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?
Change the URI to /dw/shop/v18_3/products/creative-zen-v.
Change the HTTP method to PUT
Change the HTTP method to GET
Include an authentication token in the request
Which three object types can a developer import using the Merchant Tools > Content > Import & Export module in Business Manager? (Choose three.)
Content slots
Images and other static assets
Products
Folders
Content assets
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?
Use the service credential URL field
Use the service status area, set the override URL checkbox, and then populate the URL field with the required one
Use a Sitepreference dedicated for the service URL
Use a Globalpreference dedicated for the service URL
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?
Administration > Sites > Manage Sites > Site > Cache
Operations > Site > Manage Sites > Cache
Operations > Cache > Site
Site > Site Preferences > Cache
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.)
The Auto-Upload setting is enabled for the server connection
The Active Server setting is enabled for the server connection
The credentials for the server connection are correctly entered
The cartridge is for the current version of B2C Commerce
The server is configured to accept incoming connections
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?
/inventory_lists/*
/inventory_lists/**
/inventory_list_search
/products/*
Which line of code creates a content slot that can be included on homepage.isml to display on the home page?
<isslot id="my_banner " description="for home page" type="global" context="content" context-object="${pdict.ContentSearchResult.content}"/>
<isslot id="my_banner " description="for home page" type="global" context="homepage"/>
<isslot id="my_banner " description="for home page" context="global">
<isslot id="my_banner " description="for home page" context="global" context-object="${pdict.CurrentHomePage}"/>
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 POST request to the Stores Data OCAPI
A PUT request to the Stores Data OCAPI
A PATCH request to the Stores Data OCAPI
An UPDATE request to the Stores Data OCAPI
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?
Perform a data replication from staging
Use the Site Development > Site Import & Export Business Manager module
Download the site export file and use UX Studio to transfer the data to the sandbox
Use the Site Development > Import & Export Business Manager module
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?
The CSRF cartridge is included in the site’s cartridge path
The form group has the secure attribute set to true
The CSRF token is present in the form and is being submitted in the request
The CSRF settings in Business Manager are properly configured
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?
Connect and import the file using the remote option within the Site Import & Export Business Manager module
Upload and import the file using the local option within the Site Import & Export Business Manager module
Upload the file to the Impex WebDAV directory and import using the Site Import tool within UX Studio
Upload the file to the Static WebDAV directory and import using the Import & Export Business Manager module
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?
importPackage () method
$.ajax () jQuery method
local include
require () method
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?
Replace the existing routes by creating a controller in separate new cartridge
Use the superModule property in the existing routes to extend their functionality
Append a new function to all the existing routes with the server module
Define a new middleware function and use it in the existing routes
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?
PATCH /orders/{order_no} with dw.ocapi.shop.order.beforePATCH
DELETE /orders/{old_order_no} with dw.ocapi.shop.order.afterDELETE
PATCH /orders/{order_no} with dw.ocapi.shop.order.afterPATCH
POST /orders/{order_no} with dw.ocapi.shop.order.afterPOST
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?
Add the creation date to the attributes of the Custom Object
Mark the existing creation date attribute as visible
Add the creation date to the attribute group for the Custom Object
Assign the current date/time to a new custom attribute, creationDate, via code
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?
Add an <isbreak> tag to have the debugger stop at the desired line
Add an <isscript> tag and JavaScript with a breakpoint set
Add a local <isinclude> tag to inspect the topLevel function in the call stack
Add an <isdebug> tag to allow the inspection of global variables
A developer receives a product image that needs to be uploaded to the catalog. What should the developer use to upload this image?
Products & Catalogs module of Business Manager
Sites/Impex WebDAV Directory
Content Image Import module of Business Manager
Site Development Import & Export module of Business Manager
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?
res.json()
res.render()
res.print()
res.log()
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.)
Content assets
Storefront catalogs
ISML templates
Content slots
Payment types
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.)
Defines the responsive layout of the rendered template
Defines regions within the component type
Defines the attributes that a merchant enters when using the component type
Defines the business and rendering logic of the component required by the merchant
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.)
The actionUrl does not have any form action set
The form object is not passed to the rendering template
The form definition is incorrect
The form does not pass all validations
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?
Update the language under the Organization Profile section
Create, configure, and activate the locale under Global Preferences section
Add an alias for the new locale and then create and configure the locale itself under Global Preferences section
Create and configure the locale under Global Preferences section and activate it in Site Preferences
Which windows should a developer have open when developing a storefront application?
Integrated Development Environment, Business Manager, and the storefront application
Salesforce, Business Manager, and the ecommerce website
Google, GitHub, and the storefront application
Commerce Cloud overview page, Trailhead, and Business Manager
What are three things you can customize in the Business Manager user interface?
Language preferences, your avatar, your background theme
Permission sets, profiles, and time zones
Page cache settings, site taxation, and code versions
Menu items, menu actions, and forms
What does MVC stand for in the MVC architecture?
Model-View-Commerce
Model-View-Controller
Most Valuable Commerce
Moody Velociraptors Cry
What are the three key B2C Commerce software development tools?
Business Manager, templates, and form definitions
Java, JavaScript, and controllers
Business Manager, Visual Studio Code, and the Commerce Cloud Storefront Reference Architecture
Controllers, OCAPI, and form definitions
What does the B2C Commerce LINK Technology Partner Program provide?
Links to helpful websites, knowledge articles, and coupon codes
A world-class ecosystem of capabilities for merchants to deliver ecommerce solutions
Links to partners who develop AppExchange apps
Fan club for the starring character in a popular video game
What is mobile-first design?
Starting with the desktop and sizing down
Starting with the smallest screen and working up
Writing the code for your website on your smartphone
Using a LINK cartridge
What are four system objects that are used in Commerce Cloud Storefront Reference Architecture?
Basket, Campaign, Category, Content
Leads, Opportunities, Accounts, Contacts
Chatter, Store, Home, Leads
Reports, Dashboards, Store, Campaign
What's a best practice for using objects in B2C Commerce?
Use custom attributes as often as possible throughout your deployment
Make a duplicate custom object for each existing system object
Use system objects instead of custom objects whenever possible
Use custom objects instead of system objects whenever possible
The best way to deal with any schedule impact is to identify the gaps, document them, and then create a plan for their completion.
True
False
Which of these is part of checkout? Choose 2
Billing
Shipping
gift Registry
Which of these are key functional areas that you must check prior to launch?
Products, catalogs, search, and competition
Search, online marketing, and orderings
Ordering, customer recommendations, and site URLs
Site preferences, search statistics, and customer group
Which of these ensures that prices appear in the storefront? Choose 2
At least one price book is configured in Business Manager.
The price book is assigned to a promotion
The price book is activated
Why is customizing a storefront application is a common, if not expected, practice?
By design, the standard functionality doesn't often meet a merchant's full requirement set
A B2C Commerce storefront is simple to update
It makes merchants and developers happy to add cool features
Many IT organizations like the challenge
How can overriding or extending a controller impact performance?
Extending can result in duplicate iterations of the same external third-party interaction
The application might execute the original middleware before the extension
Overriding can wipe out important processes
Why are third-party integrations essential? Choose 2
B2C Commerce was built that way
Everyone wants to develop tax applications
Third-party providers bring their special expertise to the storefront table
Which of these gaps might occur when integrating a third party? Choose 2
Integration tasks take too long
Certain prerequisites are unavailable
Displaying products takes a lot of resources
Why is it important to separate business functions from code
It increases update complications
It reduces update complications
It lets you copy code and data in separate batches
Which of these are content slot planning considerations? Choose 2
How frequently does a content asset change
The max number of promotions per content slot
The max number of content slots per page
When should content slots be replicated
Why is it important to mirror page and catalog navigation? Choose 2
It ensures that merchants can control the categories that appear in the storefront navigation and the order in which they appear
It lets merchants take a good look at both
The page flow matches the storefront catalog structure, simplifying navigation for both the merchant and the shopper
Why are quotas important?
They ensure the efficiency and stability of the applications that use them
They are critical for online sales
They significantly reduce update complications
They ensure user-friendly code
Why is it important to understand mobile best practices?
You can give more informed advice to the merchant and your team
It's critical for good job references
It makes you sound smart
It improves shopper site adoption
Which of these are responsive design best practices? Choose 2
Include breakpoints in the design
Minimize page weight
Use a separate URL per device
These are the international strategy approaches: One site, group sites, and one site for each country
Yes
No
Why is it important to have a real understanding of a language when localizing? Choose 2
It ensures a truly localized website experience for the shoppers
You'll be able to communicate better when you visit
Using common expressions, appropriate language, and proper spelling protects SEO
The SFRA modules directory is a cartridge
True
False
The cartridge path controls the behavior of your site
True
False
Cartridges can only be uploaded using VSCode
True
False
Which one of these is considered a best practice?
Copy app_storefront_base with a new name, make all modifications there, add copy to cartridge path
Create your custom code in a cartridge, and put that cartridge in front of app_storefront_base in the cartridge path
Make changes in app_storefront_base directly
If there are 2 code versions in your sandbox, which one is a true statement?
Cartridge path and versions are totally unrelated
The cartridge path contains all cartridges from the active version
Cartridges uploaded to one version automatically get copied to other versions
During execution, the cartridge path looks for cartridges in the active version
What file does this code refer to: require('server')?
server.js in the modules folder
server.js in app_storefront_base
The first server.js found in the cartridge path
server.js in the modules/server folder
Which of the following statements is not correct?
A controller can invoke another controller
Controllers are commonJS modules
Controllers are the main entry point into the storefront application
Controllers gather the data from the model, and pass the data to the ISML template
Which is not a method for extending a specific controller route (i.e. Home-Show)
Extend
Append
Preppend
Replace
If you extend a controller route, can you prepend as well as append to the same route?
False
True
If you remove next(); on a route, what is the effect?
It goes to the next iteration on a loop
The next middleware function in the chain is not executed
It is the same as using a replace on the route
It does not break anything, just exits the route
Where can you find the methods of the response (res) attribute used in routes? For example, res.render()
Under SFRA / Server-side JS / Class: Response documentation
It is part of the server middleware functions, not literaly documented
Under dw.system.Response documentation
Under the commonJS documentation
What is a model?
The representation of the data in an MVC architecture
The person wearing the clothes on the storefront
he module for the View
It is a template in Business Manager
What are two traits of a model? Pick 2
It is a function that only the controller calls
It is the object that represents the data the controller sends to the view
It is a serializable JSON object
It is a model in the modules folder
What is a decorator?
It is an object that decorates the ISML page
It is a subset of the model that makes it easier to extend the model
It is a hardcoded JSON file that decorates the model
It is a person that decorates homes
How do you extend a model? Pick 2
Use module.superModule to identify the model to extend
Copy/paste the model code into your cartridge
Use base.call() passing the same parameters that the base model needs
Use yourmodel.extends(basemodel)
Some of the core models are extendable and configurable through decorator pattern.
True
False
What does ISML stand for?
Nothing
Index Store Material Language
Internet Store Markup Language
Individual Store Markup Language
What is a characteristic of a template?
They are rendered by controllers
They render data by using a mixture of HTML and ISML tags
They receive a JSON model from the controller
All of the above
Pdict stands for pipeline dictionary
False
True
What tag would you use to manage conditional logic?
isloop
isbreak
iselse
isactivedatahead
What tag would you use to manage collect active data?
isloop
isnext
isactivedatacontext
isif
A decorator template is the same as a model decorator
True
False
What are the two decorator templates used in SFRA?
decorator.isml
storefront.isml
checkout.isml
page.isml
Remote include allows you to call another controller route and include its rendered HTML on the current page.
True
False
Form metadata is an ____ file located in the cartidge/forms folder
XML
JPG
PNG
HTML
The actionURL must be one of the following:
Action-Login
Account-Handler
Newsletter-Handler
Login-Handler
Labels use the _____ defined in the form metadata
pdict.form.field.label
pdict.field
pdict.label
metadata.label.field
What path defined in package.json do you use to find utility scripts?
End
Field
Bottom
Base
The handler route uses ____ to send a JSON object containing status and a redirectURL to the client side.
Redirect.json()
Respond.json()
Response.json()
Resply.json()
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?
Server-side validation errors
Object errors
All of the above
No errors will display
What does CSRF Protection stand for?
Cross-site Request Forgery
Client-side Request Forgery
Cross-site Request Form
Client-side Reminder Form
_____ allow you to extend the data model to store custom data.
Client-Side Objects
Custom Objects
Metadata
Transactions
What are two ways to create a custom object definition in Business Manager?
Manually define all fields
Import a custom object definition metadata file
Export all data files
Map all custom fields
Import folder from Business Manager
What do you need to save any persistent system or custom object?
Transactions
Custom objects
Middleware
All of the above
It’s the best practice to log informational messages and warnings that could happen during the normal execution of your code.
True
False
The Log Center allows you to filter logs by what two filters?
Severity
Product
Category
Line
Custom Object
To make sure your transaction is the last thing that gets handled by the Handler route, use the ______ event.
route.afterComplete
route.beforeComplete
Complete.Route
pdict.beforeRoute
What kind of hook is a newer REST API offered by Salesforce?
OCAPI Hook
Captain Hook
Custom Hook
Standard Hook
What is another name for a Custom Hook?
OCAPI Hook
Out-of-the-box Hook
SFRA Hook
Transaction Hook
What do you use to configure functionality to be called at a specific point in your application flow or at a specific event?
Multiple payment providers
Hooks
Business Manager
Classes
What is an example of extension_point_name?
Calculate
dw.order.calculate
Basket.purchase
json.hooks
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)
cartridge/forms/profile_en_IN.xml
cartridge/forms/profile_in.xml
cartridge/forms/in/profile.xml
cartridge/forms/en_IN/profile.xml
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)
XML only
CSV only
XML and JSON
JSON only
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)
initServiceClient
parseResponse
mockCall
createRequest
Given the requirement to add caching to an existing page while adhering to SFRA best practices,
which code snippet should be used? (GOT IT)
server.get(‘Show’, cache.applyDefaultCache, function (req, res, next) {
// code
});
<iscache varyby=”price_promotion” type=”relative” status=”on”/>
server.get(‘Show’, function (req, res, next) {
//code
}).applyDefaultCache();
<iscache type=”relative” hour=”24”/>
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)
Filters Page Designer search results into folders
Prevents Page Designer pages from being searchable
Allows Page Designer pages and components to be searchable
Allows filtering Page Designer pages by folder
