SALESFORCE CERTIFICATIONS B2C-COMMERCE-DEVELOPERB2C Commerce Developer with SFRA - Practice Questions - Post 77

SALESFORCE CERTIFICATIONS B2C-COMMERCE-DEVELOPERB2C Commerce Developer with SFRA - Practice Questions - Post 77

1. Business Manager has the configuration: Active log category is “root” Log level of INFO The code below execites: 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?

Page: Page 16

Option A: custom-export

Option B: custom-products

Option C: products

Option D: info-export

Answer(s): 2

Explanation: Not available

SEO Keywords: SEO keywords not available


2. 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?

Page: Page 16

Option A: Create a service and implement the mockfull callback and a sitepreference to enable or disable the mock response.

Option B: Create a service and implement the mockFill callback and set the service mode to mock.

Option C: Create a service and a Sitepreference that induce the service to respond witch a mock response using a conditional.

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

Answer(s): 2

Explanation: Not available

SEO Keywords: SEO keywords not available


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

Page: Page 16

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

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

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

Option D: { hooks: ./scripts/hooks.json }

Answer(s): 1

Explanation: Not available

SEO Keywords: SEO keywords not available


4. Given the following snippet: Server.append( ‘Show’ , function (req, res, next) ) According to SFRA, which two options shows a correct way to complete the code above in order to provide data to the response using a controller? Choose 2 answers

Page: Page 16

Option A: res.viewData = { data: myDataObject }; res.render(‘/content/myPage’); next(); });

Option B: res.setViewData ({ data: myDataObject }); res.render(‘/content/myPage’); next(); });

Option C: res.render(‘/content/myPage’,{ data: myDataObject }); next(); });

Option D: res.render(‘/content/myPage’); next(); }).append{( Data:myDataObject });

Answer(s): 3

Explanation: Not available

SEO Keywords: SEO keywords not available


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

Page: Page 17

Option A: Base.render = render;

Option B: Module.exports.render = render;

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


6.

Page: Page 17

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


7.

Page: Page 17

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


8.

Page: Page 17

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


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

Page: Page 18

Option A: product

Option B: pdict.Basket.products{loopstatus}

Option C: loopstatus.product

Option D: pdict.product

Answer(s): 1

Explanation:

SEO Keywords: SEO keywords not available


10. 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?

Page: Page 18

Option A: Locale Payments

Option B: Payment Methods

Option C: Payment Processors

Option D: Apple Pay

Answer(s): 1

Explanation: Not available

SEO Keywords: SEO keywords not available


11. 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?

Page: Page 18

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

Option B: Unlock the site preferences and then change the Taxation setting to Gross

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

Option D: Create a new site with Taxation set to Gross, then delete the old site.

Answer(s): 4

Explanation: Not available

SEO Keywords: SEO keywords not available


12. 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 line 6 and correct the problem?

Page: Page 18

Option A: next();

Option B: return res;

Option C: res.next();

Option D: req.next();

Answer(s): 1

Explanation: Not available

SEO Keywords: SEO keywords not available


13. 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 list with the correct two-letter abbreviation for the provinces. The U.S. requirements are to: Have an 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?

Page: Page 19

Option A: Create a copy of existing address.xml file in the default folder. Rename that file to adres_US.xml

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

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

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

Answer(s): 3

Explanation: Not available

SEO Keywords: SEO keywords not available


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

Page: Page 19

Option A: Delete the existing content slot and create a new one.

Option B: Change the rendering template in the slot configuration

Option C: Change the default setting in the slot configuration

Option D: Change the content type for the slot configuration

Answer(s): 2,4

Explanation: Not available

SEO Keywords: SEO keywords not available


15. 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?

Page: Page 19

Option A: A controller

Option B: A middleware script

Option C: A decorator

Option D: A model

Answer(s): 1

Explanation: Not available

SEO Keywords: SEO keywords not available


16. 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?

Page: Page 19

Option A: In Global preferences, check the box for Enable custom logging in Request Log.

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

Option C: In Custom Log Settings, check the DEBUG box for Select Log Levels Written to Files.

Option D: In custom Log Settings, activate the loggin category at DEBUG level.

Answer(s): 3

Explanation: Not available

SEO Keywords: SEO keywords not available


17. Below is a form definition snippet from the newsletter.xml file:
Which line of code creates a JSON object to contain the form data?

Page: Page 20

Image for Option D: Option D Image

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


18.

Page: Page 20

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


19.

Page: Page 20

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


20.

Page: Page 20

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


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

Page: Page 21

Option A: There are conflicting Search Refinement definitions for Clothing and one of its parent categories

Option B: The Search Refinement definition is not set up for the Women category

Option C: The Search Refinement definition is not set up for the New Arrivals Category.

Option D: The Search Refinement definitions is not set up for the Root Category

Answer(s): 3

Explanation: Not available

SEO Keywords: SEO keywords not available


22. 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 item 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?

Page: Page 21

Option A: dw.ocapi.shop.basket.shipment.afterDELETE

Option B: dw.ocapi.shop.basket.shipment.beforePATCH

Option C: dw.ocapi.shop.basket.shipment.beforeDELETE

Option D: dw.ocapi.shop.baskep.shopment.beforePOST Estos indican antes de actualizar y antes de introducir

Answer(s): 2,4

Explanation: Not available

SEO Keywords: SEO keywords not available


23. 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:

Page: Page 21

Option A: VIP Customer Group

Option B: Page Template

Option C: Slot Configuration

Option D: Rendering Template

Answer(s): 3,4

Explanation: Not available

SEO Keywords: SEO keywords not available


24. 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?

Page: Page 21

Option A: Task A, then C, then B

Option B: Task B, then C, then A

Option C: Task A, then B, then C

Option D: Task B, then A, then C

Answer(s): 4

Explanation: Not available

SEO Keywords: SEO keywords not available


25. 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?

Page: Page 22

Option A: Add component_type_inclusion in the layout json configuration

Option B: Add component_type_Exclusions in the layout json configuration

Option C: Add layout_type_inclusion in the target components json configurations.

Option D: Add layout_type_exclusion in the other asset components json configuration.

Answer(s): 1

Explanation: Not available

SEO Keywords: SEO keywords not available


26. 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?

Page: Page 22

Option A: The Storefront catalog is offline

Option B: The category does not contain available products

Option C: The category is not sorted

Option D: The category is offline.

Answer(s): 1,2

Explanation: Not available

SEO Keywords: SEO keywords not available


27. 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?

Page: Page 22

Option A: Add a Boolean custom attribute to the Store system object

Option B: Configure the existing Store custom object type definition

Option C: Create a new SingleBrandStore custom object configuration.

Option D: Adjust the relevant Site Preference in the Stores group

Answer(s): 3

Explanation: Not available

SEO Keywords: SEO keywords not available


28. A developer wants to add a link to the My Account Page. What is the correct code to accomplish this?

Page: Page 22

Option A: ${Resource.msg(‘myaccount’,’account’,request.locale())}

Option B: ${Resource.message(‘myaccount’)}

Option C: ${Resource.msg(‘myaccount’,’account’,null)}

Option D: ${ResourceMgr.getPropierties(‘myaccount’,’account’,null)}

Answer(s): 3

Explanation: Not available

SEO Keywords: SEO keywords not available


29. Given a NewsletterSubscription custom object that has a key attribute named email of type String, what is the correct syntax to create the NewsletterSubscription custom object and persist it to the database?

Page: Page 23

Option A: Var customobject = dw.object.CustomObjectMgr.createNewsletterSubscription(‘email’, newsLetterForm.email.value);

Option B: Var customobject = dw.object.CustomObjectMgr.createCustomObject(newsletterForm.email.value, ‘NewsletterSubscription’);

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


30.

Page: Page 23

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


0/Post a Comment/Comments

#Advertisement

Top Post Ad