Professional Documents
Culture Documents
SFRA
SFRA
2.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.
Answer: C
7.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.
Answer: D
9.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.
Answer: AC
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();
Answer: D
14.Given the file structure below, which ISML method call renders the
customLandingPage template?
A.
ISML.renderTamplate(‘cartridge/templates/default/content/custom/customLand
ingPage’);
B. ISML(‘content/custom/customLandingPage’);
C. ISML.render(‘content/custom/customLandingPage’);
D. ISML.renderTemplate(‘content/custom/customLandingPage’);
Answer: D
15.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?
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’)$
Answer: D
16.Why should a Digital Developer use ProductSearchModel.getProducts()
instead of
Category.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.
Answer: C
24.The following sample code is NOT providing the desired results. The
Digital Developer needs to add
29.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
Answer: BDE
32.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
Answer: C
36.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.
What additional steps must occur before the Digital Developer can begin
writing the processing code for
this request?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
40.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.
Answer: AC
45.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.
Answer: A
46.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.
Answer: D
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.)
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.
Answer: AC
B)
C)
D)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
59.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.
Answer: B
62.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 works correctly when added to the file?
A. {“hooks”: “./scripts/hooks.json”}
B. {hooks: ./cartridge/scripts/hooks.json}
C. {hooks: ./scripts/hooks.json}
D. {“hooks”: “./cartridge/scripts/hooks.json”}
Answer: D
63.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 ${myProduct.getID()} with name
${myProduct.getName()}’);
B. Logger.warn(‘The current product is {0} with name {1}’,
myProduct.getID(), myProduct.getName());
C. Logger.warn(‘The current product is %s with name %s’).context
(myProduct.getID(),
myProduct.getName());
D. Logger.warn(‘The current product is {0} with name {1}’}.context
(myProduct.getID(),
myProduct.getName());
Answer: B
65.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?
A. Pipeline Profiler
B. Code Profiler
C. Reports and Dashboards module
D. Storefront Toolkit
Answer: A
Why would a JavaScript debugger, that is stopped at line 06, fail to show
the viewData variable in the
inspection tool?
A. viewData is declared but not assigned
B. viewData is assigned but not declared
C. viewData is a B2C Script reserved name
D. cache.applyDefaultCache is not a valid middleware
Answer: B
70.Which three configurations does a developer need to ensure to have a
new product visible in the
Storefront? (Choose three.)
A. The Storefront catalog that contains the product is assigned to a site
B. The product has a price
C. The product has a master product
D. The product is online and searchable
E. The search index is built
Answer: ADE
71.A developer needs to share their sandbox data with a colleague working
on the same realm.
What is the best practice to share data between two environments?
A. Perform a site export and a local site import
B. Perform a data replication from one sandbox to the other
C. Perform a site export using the global export directory
D. Perform a site export using the remote archive
Answer: A
78.A client that sells to multiple countries in Europe needs to disable Apple
Pay for Denmark.
Which Business Manager module is used to achieve this requirement?
A. Locale Payments
B. Apple Pay
C. Payment Processors
D. Payment Methods
Answer: D
Considering best practices, what is the main problem with this code?
A. The code performs post-query processing in an inefficient manner. The
nested for-loops should be
changed to more efficient code.
B. The code uses ProductSearchModel, which performs a database search.
C. The code invokes dw.catalog.ProductSearchModel directly. It is more
efficient to use the following code
and then invoke the method.
var ProductSearchModel = require (dw.catalog.ProductSearchModel);
D. The code performs post-query processing, which is inefficient and should be
avoided
Answer: C
83.A developer wants to embed a link to a content page from within the
body of another content asset.
The target content asset ID is: about-us
Which option represents the correct format to use?
A. $url(‘Content-Page’, ‘cid’, ‘about-us’)$
B. $url(‘Content-Show’, ‘about-us’)$
C. $url(‘Page-Show’, ‘about-us’)$
D. $url(‘Page-Show’, ‘cid’, ‘about-us’)$
Answer: D
88.An instance has custom logging enabled. The log reaches the file size
limit.
What happens in this situation?
A. The current log file is archived and a new log file is created
B. The log file is deleted and a new log file is created
C. Logging is suspended for the day
D. The log file rolls over and the oldest log messages are overwritten
Answer: C
89.A developer is writing a server side script that needs to maintain state
across calls. The persistent
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?
A. Use a client-side cookie to store the information for the session duration
B. Use the Session class, and its additional class references and attributes, in the
B2C Commerce API
C. Use a non-replicable Custom Object to store the information temporarily
D. Use an SFRA controller. Because it runs server-side, the state is
automatically maintained
Answer: B
93.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?
A. Tax Region is configured wrong
B. Tax Country is missing
C. Tax Jurisdiction is missing
D. Tax Locale is configured wrong
Answer: C
Assuming the Custom Object metadata exists, why does this route fail to
persist the data submitted in the
form beyond the template render lifecycle?
A. Custom Objects can only be created by Job scripts
B. The Custom Object creation is not wrapped in a Transaction
C. The CustomObjectMgr variable should be declared outside of the route
D. The Subscribe route is missing the server.middleware.http middleware
Answer: B
Which line of code creates a JSON object to contain the form data?
A. server.form.getForm(‘dwfrm_newsletter’)
B. server.forms.getForm(‘newsletter’)
C. server.form.getForm(‘newsletter’)
D. server.forms.getForm(‘dwfrm_newsletter’)
Answer: B
99.Which method is efficient and scalable because it uses the product
search index rather than searching
the database?
A. ProductAvailabilityModel.isOrderable()
B. ProductVariationModel.getVariants()
C. ProductIndexModel.getOrderableProductsOnly()
D. ProductSearchModel().getProductSearchHits()
Answer: D
101.A developer needs to check for product inventory in all inventory lists
using the Open Commerce API.
An example request URL is:
http://refarch.demandware.net/dw/data/v18_3/inventory_lists/ecom-
inventory/product_inventory_records/
00883408601
Which property should the developer check in the OCAPI settings to
confirm the appropriate resource is
enabled?
A. client_id
B. resource_id
C. methods
D. ecom-inventory
Answer: B
102.A developer has custom debug statements in a script, but the messages
are not showing up in the
Storefront Toolkit Request Lo.
Which step needs to be completed to get the messages to appear in the
Request Log?
A. In Custom Log Settings, activate the logging category at DEBUG level
B. In Custom Log Settings, check the DEBUG box for Select Log Levels
Written to Files
C. In Site Preferences, check the box for Enable custom logging in Request Log
D. In Global Preferences, check the box for Enable custom logging in Request
Log
Answer: B
103.There is an existing job that captures and sends a report of all the
SFCC orders captured in a day for
North America at 12:00 AM EST. The developer is asked to also send
another report for all the orders
placed for Europe at 12:00 AM UTC.
How should a developer achieve both of these requirements?
A. Use a flow and set up execution of both job steps at the specified time
B. Create a new job specific to Europe to run at the specified time
C. Add a new job step to the existing North America job to capture and send a
report for all these Europe
orders
D. Modify the existing Job and add site-specific job run-times to the Scheduling
tab
Answer: B
apply?
What is the right place to add the fr_CA translation for the country field
label?
A. /cartridge/templates/resources/address_fr_CA.properties
B. /cartridge/templates/resources/forms_fr.properties
C. /cartridge/forms/resources/address_fr.properties
D. /cartridge/templates/resources/fr/forms.properties
Answer: B
109.A developer configures the dw.json file and needs to fill in the
necessary parameters to complete the
task.
Which three parameters are required when using npm scripts? (Choose
three.)
A. Username/Password
B. Code Version
C. Site ID
D. CSRF Token
E. Hostname
Answer: ABE
A. loopstatus.product
B. pdict.Basket.products[loopstatus]
C. product
D. pdict.product
Answer: C
113.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.warn(‘Unexpected service response.’)
C. Logger.error(‘Unexpected service response.’)
D. Logger.debug(‘Unexpected service response.’)
Answer: B
116.A client has two B2C Commerce sites in the same instance: one for the
U.S. market, the other for the
European market. They offer free gift wrapping on a selection of products.
For each order, five products
can be wrapped in the U.S., but only three products can be wrapped in the
European region.
How should a developer allow the merchant to independently adjust this
number?
A. Create a new custom preference by extending the Site Preference object type
B. Add a new Campaign using the Online Marketing section of the Business
Manager
C. Configure a new localizable content slot with a market-specific value
D. Select the corresponding option in the system preference for Orders
Answer: A
117.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 Common Phrase Dictionary entry: car accessories. Use search mode
Exact Match.
B. Create a Synonym Dictionary entry: car accessories, household, technology.
Use search mode First
Word.
C. Create a Common Phrase Dictionary entry: car accessories, NOT household,
NOT technology.
Use search mode Exact Match.
D. Create a Synonym Dictionary entry: car accessories, !household,
!technology.
Use search mode Exact Match.
Answer: D
118.To ensure SFRA best practices and protect against request forgery, the
developer introduced CSRF
token generation in the customer address form.
119.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
Answer: C
121.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:js, npm run compile:scss, npm run compile:fonts
C. npm run compile:js, npm run compile:scss, npm run compile:html
D. npm run compile:scss, npm run compile:html, npm run clean
Answer: B
124.What are two appropriate uses of the <isif> ISML tag that follow B2C
Commerce and SFRA best
practices? (Choose two.)
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.
Answer: BD
130.HOTSPOT
Given the following conditions:
- A site export file with a copy of the Storefront data for a custom site
- A sandbox with the custom site code, but no Storefront data
- A requirement for a working copy of SFRA for development reference
A developer is assigned three tasks to perform in Business Manager.
In what sequence should the developer perform the tasks, so that the
custom site displays the products
as intended?
ANSWER:
132.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
Answer: ACD
133.A client has two B2C Commerce sites in the same instance: one for the
U.S. market, the other for the
European market. The product they make are sold with different safety
certificates based on the world
location.
For example, they sell a smartphone with certificate A in the U.S. and
certificate B in Europe, a hairdryer
with certificate C in the U.S. and certificate D in Europe, and more.
How should a developer allow the merchant to display the appropriate
certification logo in the product
details page, depending on the customer's location?
A. Add a Localizable custom preference to the SitePreference system object
type.
B. Add a Site-specific custom attribute to the Product system object type.
C. Add a Localizable custom attribute to the Certificate system object type.
D. Add an Image custom preference to the SitePreference system object type.
Answer: B
136.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.
Answer: BC
137.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.
Answer: AB
138.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 times.
How can a developer use Business Manager to ensure that the gift vouchers
are always available?
A. Manually set the inventory to a high number.
B. Check the Available to Sell (ATS) flag for the product set.
C. Check the perpetual flag in the product inventory record.
D. Set StockLevel = maxAllocation for the product.
Answer: C
139.Which two of these situations are appropriate cases for using the B2C
Commerce OCAPIs? (Choose
two.)
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.
Answer: BD
142.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.
Answer: D
144.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?
A. dw.svc.webref.getDefaultService()
B. dw.svc.LocalServiceRegistry.getDefaultService()
C. dw.svc.LocalServiceRegistry.createService()
D. dw.svc.LocalServiceInstance.createService()
Answer: C
145.Given the code snippet above, what should be added after this code so
it can be used for page
component display?
A. module.exports = render;
B. module.exports = server.exports();
C. module.exports.render = render;
D. base.render = render;
Answer: C
149. 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 status area, set the override URL checkbox, and then populate the URL field with the
required one.
Ans--: D
150.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. Site > Site Preferences > Cache
C. Administration > Sites > Manage Sites > Site > Cache
Ans--: C