Salesforce PracticeTest Certified-B2C-Commerce-Developer v2020-02-05 by Julie 29q

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Certified B2C Commerce Developer.

29q

Passing Score: 800


Time Limit: 120 min

Salesforce Certified B2C Commerce Developer

https://www.gratisexam.com/

https://www.gratisexam.com/
Exam A

QUESTION 1
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.

https://www.gratisexam.com/

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.

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:
Reference: https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2FDWAPI%2Fquota%2Fhtml%
2Findex.html

QUESTION 2
Universal Containers wants to add a model field to each product. Products will have locale-specific model values.

How should the Digital Developer implement the requirement?

A. Utilize resource bundles for translatable values.


B. Set the model field as a localizable attribute.
C. Store translated model values in different fields; one field for each locale.
D. Add model to a new custom object with localizable attributes.

Correct Answer: C

https://www.gratisexam.com/
Section: (none)
Explanation

Explanation/Reference:

QUESTION 3
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.

Correct Answer: AC
Section: (none)
Explanation

Explanation/Reference:

QUESTION 4
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?

A. Set the cartridge path so that app_newsite is before app_storefront.


B. Set the cartridge path so that app_storefront is before int_cybersource.
C. Set the cartridge path to include only app_newsite.
D. Set the cartridge path so that app_newsite is after app_storefront.

Correct Answer: B
Section: (none)

https://www.gratisexam.com/
Explanation

Explanation/Reference:

QUESTION 5
A Digital Developer creates a B2C Commerce server connection in their UX Studio workspace. The Developer adds new cartridges to the workspace, but the
cartridges do NOT execute as the Developer expects.

Which three things should the Digital Developer verify to ensure the cartridges are uploaded? (Choose three.)

A. The Auto-Upload setting is enabled for the server connection.


B. The Active Server setting is enabled for the server connection.
C. The credentials for the server connection are correctly entered.
D. The cartridge is for the current version of B2C Commerce.
E. The server is configured to accept incoming connections.

Correct Answer: ADE


Section: (none)
Explanation

Explanation/Reference:
Reference: https://documentation.b2c.commercecloud.salesforce.com/DOC4/index.jsp?topic=%2Fcom.demandware.dochelp%2FSiteDevelopment%
2FTroubleshootingStudio.html

QUESTION 6
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.

https://www.gratisexam.com/
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();

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:

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

https://www.gratisexam.com/
A. ISML.renderTamplate(‘cartridge/templates/default/content/custom/customLandingPage’);
B. ISML(‘content/custom/customLandingPage’);
C. ISML.render(‘content/custom/customLandingPage’);
D. ISML.renderTemplate(‘content/custom/customLandingPage’);

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:
Reference: https://documentation.b2c.commercecloud.salesforce.com/DOC4/index.jsp?topic=%2Fcom.demandware.dochelp%2FDWAPI%2Fscriptapi%2Fhtml%
2Fapi%2Fclass_dw_template_ISML.html

QUESTION 8
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’)$

Correct Answer: C
Section: (none)
Explanation

https://www.gratisexam.com/
Explanation/Reference:
Reference: https://documentation.b2c.commercecloud.salesforce.com/DOC3/index.jsp?topic=%2Fcom.demandware.dochelp%2FContent%
2FContentassetlinkexamples.html

QUESTION 9
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.

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:

QUESTION 10
A Digital Developer is adding support for an additional language other than the default. The locale code for the new language is de.

In which folder should the developer place resource bundles?

A. templates/de
B. templates/default
C. templates/resources
D. templates/default/resources

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:
Reference: https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2FLocalization%
2FLocalizingTemplateResourceBundles.html

QUESTION 11

https://www.gratisexam.com/
Assume the code below is executing:

Business Manager has the configuration:


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

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

A. xyz
B. custominfo-blade
C. custom-export
D. custom-xyz

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:

QUESTION 12
A Digital Developer wants pass control to an ISML template from a JavaScript Controller and load product on the pipeline dictionary with the name myProduct.

Which code sample will achieve this?

A. ISML.renderTemlpate ( "helloworld.isml", { "myProduct": "product" });


B. ISML.renderTemlpate ( "helloworld.isml", { "product": myProduct });
C. ISML.renderTemlpate ( "helloworld.isml", { product: myProduct });
D. ISML.renderTemlpate ( "helloworld.isml", { myProduct: product });

Correct Answer: A
Section: (none)
Explanation

https://www.gratisexam.com/
Explanation/Reference:
Reference: https://documentation.b2c.commercecloud.salesforce.com/DOC2/index.jsp?topic=%2Fcom.demandware.dochelp%2FSGJC%
2FPipelinetoControllerConversion.html

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

What should the Developer do to improve the code?

A. Use a system attribute instead of the isOnSaleFlag custom attribute.


B. Avoid post-processing and use the isOnSaleFlag attribute as a search refinement.
C. Breaks the process into separate loops.
D. Avoid using an Iterator and use a Collection instead.

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:

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

https://www.gratisexam.com/
A. Use one style sheet for each ISML decorator template.
B. Place CSS outside of templates.
C. Compress CSS.
D. Use inline Javascript.
E. Combine several images into a single image.

Correct Answer: ACD


Section: (none)
Explanation

Explanation/Reference:

QUESTION 15
A Digital Developer needs to add logging to the following code:

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

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


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

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

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:

QUESTION 16
A Digital Developer wants to selectively retrieve products and process them from an iPhone.

Which action should the Developer take, given that JavaScript controllers CANNOT be used?

A. Use import/export in Business Manager.


B. Create a webservice to retrieve products.
C. Use OCAPI and invoke it in native language.
D. Use WebDAV Client to retrieve products.

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:

QUESTION 17
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

https://www.gratisexam.com/
https://www.gratisexam.com/

D. Content slot variable

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:

QUESTION 18
A Digital Developer suspects a logical error in a script.

Which action will help locate the error?

A. Submit a support ticket to B2C Commerce.


B. Check request logs for evidence of the logical error.
C. Put breakpoints in the code, debug, and examine variable values.
D. Print all values in the script node called before the current script.

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:

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

A. Hover over the caching icons now present on the storefront.


B. Open the Request Logs to view the caching information.
C. Start a pipeline debugging session and view the caching information provided.

https://www.gratisexam.com/
D. Right-click on the component in UX Studio and view the caching properties of the file.

Correct Answer: B
Section: (none)
Explanation

Explanation/Reference:

QUESTION 20
A Digital Developer is working in a sandbox on a site named test-site using the domain test.demandware.net. The Developer needs to compile a url to
make an Open Commerce API (OCAPI) request that returns product information.

By default, which URL format is a proper Open Commerce API for Sandbox?

A. https://test.demandware.com/dw/shop/products/M1355?client_id=aaa...
B. https://www.test.com/s/test-site/sfc/shop/products/M1355?client_id=aaa...
C. https://test.demandware.net/s/test-site/dw/shop/v18_3/products/M1355?client_id=aaa...
D. https://www.test.com/dw/shop/v18_3/products/M1355?client_id=aaa...

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:
Reference: https://documentation.b2c.commercecloud.salesforce.com/DOC3/index.jsp?topic=%2Fcom.demandware.dochelp%2FOCAPI%2Fcurrent%2Fusage%
2FAPIExplorer.html

QUESTION 21
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?

https://www.gratisexam.com/
A. Change the URI to /dw/shop/v18_3/products/creative-zen-v.
B. Change the HTTP method to PUT.
C. Change the HTTP method to GET.
D. Include an authentication token in the request.

Correct Answer: C
Section: (none)
Explanation

Explanation/Reference:

QUESTION 22
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.

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:
Reference: https://documentation.b2c.commercecloud.salesforce.com/DOC3/index.jsp?topic=%2Fcom.demandware.dochelp%2FSiteDevelopment%
2FCodeDeployment.html

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

https://www.gratisexam.com/
Which modification allows the requests to successfully execute?

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


B. Change the "write_attributes" value to: "(+items)".
C. Change the "read_attributes" value to: "(items)".
D. Change the "methods" value to: ["get", "post"].

Correct Answer: A
Section: (none)
Explanation

Explanation/Reference:
Reference: https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2FOCAPI%2F15.6%2Fusage%
2FOCAPISettings.html

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

A. ProductMgr.queryAllSiteProducts()
B. ProductSearchHit.getRepresentedProducts()
C. ProductSearchModel.getProductSearchHits()
D. Category.getProducts()

Correct Answer: CD
Section: (none)
Explanation

https://www.gratisexam.com/
Explanation/Reference:

QUESTION 25
A Digital Developer extends a system object, Product, and adds a Boolean attribute, “sellable,” to it.

Assuming “prod” is the variable name handling the product, what code can the Developer use to access it?

A. prod.extended.sellable
B. prod.sellable
C. prod.persistable.sellable
D. prod.custom.sellable

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:

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

A. Instance Version
B. Instance Hostname
C. Business Manager Username
D. Keystore Password
E. Business Manager Password

Correct Answer: BDE


Section: (none)
Explanation

Explanation/Reference:
Reference: https://medium.com/@fsjohnny/lets-develop-with-salesforce-commerce-cloud-part-1-setting-up-your-development-environment-b16044708d09

https://www.gratisexam.com/
QUESTION 27
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.)

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.

Correct Answer: BD
Section: (none)
Explanation

Explanation/Reference:

QUESTION 28
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?

A. Merchant Tools > Ordering > Payment Methods


B. Merchant Tools > Site Preferences > Apple Pay
C. Merchant Tools > Ordering > Payment Processors
D. Merchant Tools > Site Preferences > Payment Types

Correct Answer: A
Section: (none)
Explanation

Explanation/Reference:

https://www.gratisexam.com/
Reference: https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2FApplePay%
2FEnableAPWUsingALinkCartridge.html

QUESTION 29
A Digital Developer has created a new PaymentForm controller that requires communication with the server and must be made using the HTTPS protocol.

Which code sample should the Developer use to make sure that HTTPS is used?

A. exports.PaymentForm = guard.ensure([‘http’, ‘post’, ‘loggedIn’], handlePaymentForm);


B. exports.PaymentForm = guard.expose([‘post’, ‘loggedIn’], handlePaymentForm);
C. exports.PaymentForm = guard.httpsPost(handlePaymentForm);
D. exports.PaymentForm = guard.ensure([‘https’, ‘post’, ‘loggedIn’], handlePaymentForm);

Correct Answer: D
Section: (none)
Explanation

Explanation/Reference:
Reference: https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2Fjsdoc%2Fdist%2Fjs%2Fserver%
2Fapp_storefront_controllers_cartridge_controllers_PaymentInstruments.js.html

https://www.gratisexam.com/

https://www.gratisexam.com/

You might also like