A developer wants to configure multiple products that should only be sold as a group. It should not bepossible for buyers to buy these products individually. How should the developer configure the products?
-
A
-
B
-
C
Reveal answer details
Close answer details
Correct answerA
ExplanationTo configure multiple products to be sold only as a group, with no possibility for buyers to purchase these products individually, the developer should use a "Bundle." Bundling allows multiple products to be sold together as a single product package. This configuration is ideal when products are intended to be part of a combined offering, enhancing both inventory management and promotional strategies within Salesforce B2C Commerce. This approach is distinct from "Sets" (which are collections of individual products that can still be purchased separately) and "Variation Groups" (which are used for products that have different variations, such as size or color).
A client uses tax tables in Business Manager to calculate tax. They recently started shipping to a new country, Italy, and the taxi s not being calculated correctly on the Storefront What is the likely problem?
-
A
Tax Region is configured wrong.
-
B
-
C
Tax Jurisdiction is missing
-
D
Tax Locale is configured wrong
Reveal answer details
Close answer details
Correct answerC
ExplanationIf tax is not being calculated correctly on the storefront for shipments to Italy, the likely problem is that the "Tax Jurisdiction" for Italy is missing. Tax jurisdictions are critical configurations in the Business Manager that need to be set up correctly to ensure accurate tax calculations. If a jurisdiction is missing, tax calculations cannot be correctly applied to transactions within that specific area, resulting in incorrect or absent tax charges. This is consistent with Salesforce B2C Commerce Cloud's tax management features which require correct settings at the jurisdiction level to function properly.
A developer is using logging in scripts to troubleshoot an issue. They are using thedw.system.Log class to write to specific log levels and categories. Which log level is always enabled by default?
-
A
-
B
-
C
Reveal answer details
Close answer details
Correct answerA
ExplanationIn Salesforce B2C Commerce Cloud, the FATAL log level is always enabled by default. This ensures that the most critical errors that could cause the application to fail are always logged, regardless of the configuration settings. Logging at this level is minimal and focuses only on severe issues that require immediate attention. Default Log Level: The default setting for logging captures only the most critical events, thereby ensuring that essential errors are not missed and can be addressed promptly to maintain system stability and performance.
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
-
B
-
C
-
D
templates/default/resources
Reveal answer details
Close answer details
Correct answerC
ExplanationIn Salesforce B2C Commerce, resource bundles for different locales are typically stored in a resources directory under the templates directory. The correct organization of resource bundles allows the application to correctly load locale-specific resources based on the user's settings or site configuration. Placing the German (de) resource bundles in templates/resources ensures that they are correctly accessed and used when the site is viewed in the German language context.
A retailer notices that the Account Addresses page is showing the wrong shopper's address. Which toolshould the developer start with to identify the issue?
-
A
-
B
Reports and Dashboards module
-
C
Reveal answer details
Close answer details
Correct answerC
ExplanationTo identify the issue of an Account Addresses page showing the wrong shopper's address, the developer should start with the Storefront Toolkit (Option A). This tool provides access to real-time diagnostics and debugging capabilities directly on the storefront, allowing developers to inspect controller calls, caching behaviors, and other session-specific data that could contribute to the problem. The Storefront Toolkit is an effective first step for troubleshooting issues that manifest in the storefront environment, as it allows for immediate visibility into the operations of the site as experienced by end-users.
A merchant has a new requirement to accept American Express credit cards on its Storefront. A credit card payment method already exists. Which step must a developer take in Business Manager to achieve this?
-
A
In Payment Methods, enable American Express as a credit card type.
-
B
Add American Express intothe Order settings in Site Preferences.
-
C
In Payment Processor, create American Express as a payment type.
-
D
Add American Express as a Payment Preference in Site Preferences.
Reveal answer details
Close answer details
Correct answerA
ExplanationTo configure the RefArch site to use the same customer list as another site, such as RefArchGlobal, the developer should select RefArchGlobal from the dropdown for Customer List in the site settings as shown in the screenshot. This direct selection changes the customer list that the RefArch site references, enabling it to utilize the same customer data as RefArchGlobal without the need for importing customer data or enabling customer list sharing options. This setting is site-specific and directly modified in the site's general settings in Business Manager.
Given a job step configured in the steptype.json, a developer needs to add a custom status code "No_FILES_FOUND". Which code snippet will complete the requirement?
-
A
var status = {success: `OK'. Message: `NO_FILES_FOUND'};return status;
-
B
var status = require(`dw/system/status');return new Status(Status.OK, `NO_FILES_FOUND');
-
C
this.status = `NO_FILES_FOUND'return this;
-
D
Reveal answer details
Close answer details
Correct answerB
ExplanationIn Salesforce B2C Commerce, when you need to return a custom status code from a job step, you should use the dw.system.Status class to create and return a new status object with the appropriate status and custom status message. The correct code snippet is option B: var status = require('dw/system/status'); return new Status(Status.OK, 'NO_FILES_FOUND');. This snippet correctly creates a new status object indicating a successful completion (Status.OK) but also communicates the specific outcome of "NO_FILES_FOUND" by using the second parameter of the Status constructor to set a custom status message, aligning with the API's way of handling custom statuses.
Question 8
Multiple choice
The developercreated 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?
-
A
The Storefront catalog is offline
-
B
The category does not contain available products
-
C
The category is not sorted
-
D
Reveal answer details
Close answer details
Correct answersA, B
ExplanationTwo possible reasons why a newly created Storefront category in storefront-catalog-m-en is not visible on the storefront site are: A) The Storefront catalog is offline - If the catalog is not active, none of its contents, including new categories, will be displayed on the storefront. B) The category does not contain available products - A category without products will typically not appear on the storefront as there is nothing to display under that category. Categories need to have at least one available product to be visible to customers. These factors are crucial in ensuring the visibility of categories on the storefront and should be checked whenever a category does not appear as expected.
Question 9
Multiple choice
A Digital Developer is inspecting the weekly service status report for a critical internally-hosted web service used inthe 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.
Reveal answer details
Close answer details
Correct answersA, C
ExplanationTo reduce the unavailability of a critical internally-hosted web service noticed in the service status reports, two practical solutions would be: A. Modify the code to include a try/catch block around the request to the external service. This approach ensures that even if the service is unavailable, the application can handle the error gracefully and continue functioning, possibly with a fallback mechanism. C. Increase the web service timeout. This allows the service more time to respond before the request is considered failed. It can be particularly useful if the service unavailability is due to delays in response rather than outright outages. Both these strategies are recommended in handling external service interactions to ensure robustness and resilience in the application. They are supported by standard programming practices and Salesforce Commerce Cloud's guidelines on external integration.
Question 10
Multiple choice
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
-
B
-
C
Business Manager Username
-
D
-
E
Business Manager Password
Reveal answer details
Close answer details
Correct answersB, C, E
ExplanationWhen setting up a new Digital Server Connection using UX Studio in a Salesforce B2C Commerce sandbox, the developer needs to provide certain key pieces of information to establish the connection properly: Instance Hostname (B): This is the URL of the sandbox instance to which UX Studio will connect. It is crucial for UX Studio to know where to send API calls and how to access the server. Business Manager Username (C): This username is required for authentication and to ensure that the developer has the necessary permissions to carry out operations on the server. Business Manager Password (E): This password, paired with the username, authenticates the connection to the Commerce Cloud instance. These items are necessary for setting up the server connection correctly and securely, allowing the developer to perform tasks and deploy code directly through UX Studio. Other options such as Instance Version (A) and Keystore Password (D) are not directly required for setting up a typical Digital Server Connection in UX Studio.
Question 11
Single choice
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?
-
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"].
Reveal answer details
Close answer details
Correct answerD
ExplanationThe given configuration for the Open Commerce API (OCAPI) allows only GET requests to the /baskets/** resource, which permits reading basket data but does not allow modifying it, such as adding products to a basket. To successfully execute requests that modify the basket, such as adding items, the methods attribute needs to include POST. Changing the methods value to ["get", "post"] will allow both retrieving and modifying basket data. This is consistent with the typical usage of HTTP verbs where GET is used for retrieving data and POST is used for submitting data to be processed, as outlined in the Salesforce B2C Commerce documentation on configuring OCAPI.
Question 12
Single choice
A Digital Developer has created a new PaymentForm controller thatrequires 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);
Reveal answer details
Close answer details
Correct answerD
ExplanationTo ensure that a PaymentForm controller uses the HTTPS protocol in Salesforce B2C Commerce, the correct approach is to use the guard.ensure function with the 'https' argument along with 'post' and 'loggedIn'. Option D, exports.PaymentForm = guard.ensure(['https', 'post', 'loggedIn'], handlePaymentForm);, correctly specifies that the PaymentForm handler should be accessible only via HTTPS, ensuring secure communication over the network. The guard.ensure method is a part of the application security framework designed to enforce certain conditions like HTTP methods and secure protocols before a controller action is executed. This is documented in the Salesforce B2C Commerce security best practices, where specifying 'https' ensures that any data transmitted during the payment process is encrypted and secure.
Question 13
Single choice
A Digital Developer wants pass control to an ISML template from a JavaScript Controller and load product on thepipeline 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 });
Reveal answer details
Close answer details
Correct answerC
ExplanationIn Salesforce B2C Commerce, passing control to an ISML template along with data involves using ISML.renderTemplate(). This method allows passing a dictionary of data to the template. In the case where you want to load a product on the pipeline dictionary with the name myProduct, the correct way to pass this product to the ISML template is to use the product's variable name as the key in the dictionary. Thus, {product: myProduct} correctly associates the variable myProduct with the key product which the ISML template can reference. This ensures that within the ISML template, the product can be accessed using the key product.
Question 14
Single choice
The developer has been given the following business requirement: The shipping method, "Free Standard Ground Shipping" has an exclusion for products with 'category equals oris child of electronics-televisions.' The marketing department has scheduled a sale offering a "Free Standard Ground Shipping" method for brand XyzTv televisions for the next 3 months. What method accomplishes this while following best practices'
-
A
Createa new shipping method and label it "Free Standard Ground Shipping". Give it the qualifier 'brand equals XyzTv', and add it to the checkout options.
-
B
Create an allow list for the existing shipping method by adding a product exclusion for 'brand equals XyzTv' to the exclusion list fo<" "Free Standard Ground Shipping."
-
C
Extend the CheckoutShippingServices controller using module.superModule and add an exception for the specified brand.
-
D
Extend the code in cartridge/models/shipping/shippingMethod.jsusing module.superModule and add an exception for the specified brand.
Reveal answer details
Close answer details
Correct answerA
ExplanationTo handle the exclusion of a specific category while allowing a promotional exception, the best approach is to create a new shipping method. This method should specifically include an override or exception for products under the brand XyzTv. By creating a new shipping method labeled "Free Standard Ground Shipping" and setting the qualifier as 'brand equals XyzTv', it can be ensured that this shipping method applies only to the products intended for the promotion. This method does not interfere with the existing general exclusions and can be added alongside the current shipping options in the checkout process, allowing for both flexibility and specificity in promotional shipping options. This approach follows best practices by keeping promotions modular and easy to manage or remove once the promotional period is over.
Question 15
Single choice
A NewsletterSubscription custom object exists that has a key attribute named email of type String and the following script code.  However, the NewsletterSubscription custom object is not persisted. What is a possible reason?
-
A
The code shownneed to be wrapped in a transaction.
-
B
The code shown needs to be wrapped in a try/catch block.
-
C
The code shown is the wrong syntax. The correct syntax is:
Reveal answer details
Close answer details
Correct answerA
ExplanationIn Salesforce B2C Commerce, when creating or modifying data that is to be persisted, such as creating a custom object instance, the operations need to be wrapped within a transaction. This ensures that the changes are committed to the database only when all operations within the transaction are successful, providing atomicity and consistency. If the script that creates the NewsletterSubscription custom object is not executed within a transaction, the object may not be saved to the database, which could be why the custom object is not persisted. Transactions are crucial in scenarios where data integrity and consistency are important.
Question 16
Multiple choice
Which three techniques improve client-side performance in production while following documented best practices? (Choose three.)
-
A
Use one style sheet for each ISML decorator template.
-
B
Place CSS outside of templates.
-
C
-
D
-
E
Combine several images into a single image.
Reveal answer details
Close answer details
Correct answersB, C, E
ExplanationFor improving client-side performance, several techniques are considered best practices: Place CSS outside of templates (B): External CSS files can be cached by the browser, reducing the need to download them for every page load. This also separates content from style, which aids in maintaining cleaner HTML and potentially speeds up page rendering times. Compress CSS (C): Compressing CSS files reduces their size, leading to faster download times. This can be achieved through minification, which removes unnecessary characters from code without changing its functionality. Combine several images into a single image (CSS sprites) (E): Using CSS sprites combines multiple images into one larger image that is downloaded as a single file. This reduces the number of HTTP requests needed for loading multiple images, thereby decreasing load times and improving performance.
Question 17
Multiple choice
A Digital Developer adds the following line of code to a script.  The code executes without error; however, the log file on disk does NOTcontain 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 tomake 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.
Reveal answer details
Close answer details
Correct answersA, C
ExplanationFor a log message to be recorded on disk correctly, certain settings must be configured in the Business Manager: Ensure that the debug log level is enabled to write to file in the Custom Log Settings Business Manager module (A): This setting allows messages logged at the debug level to be written to the file system. If it is not enabled, debug-level messages might only be available in the console or not captured at all. Ensure that the "login" category is added to the Custom Log Filters in the Log Settings Business Manager module (C): This ensures that log messages, which belong to specific categories such as "login," are not filtered out and are written to the log files. These actions are critical for ensuring that log messages are not only generated but are also retained as intended in the log files. Options like archiving old log files (B) and adding custom log level types in Global Preferences (D) do not directly impact whether a new log message is written but are more about managing existing log data or global logging settings.
Question 18
Single choice
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 cartforms. 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
Add an <action /> node to the form definition XML with the attribute formid="addRewardPass" Add the key addRewardPass, with a processing function as a value, to the object passed to the Form.handleAction() method in the Cart.js controller
-
B
Add a <submit /> node to the form definition XML with the attribute formid="addRewardPass" Add the key addRewardPass, with a processing function as a value, to the object passed to the Form.handleAction() method in the Cart.js controller
-
C
Add the attribute action-form-action="addRewardPass" to the ISML form Add the key addRewardPass, with a processing function as a value, to the object passed to the Form.handleAction() method in the Cart.js controller
-
D
Add an <action /> node to the form definition XML with the attribute formid="addRewardPass" No change to Cart.js controller required
Reveal answer details
Close answer details
Correct answerA
ExplanationTo integrate a new form into the existing Cart.js controller, it's essential to ensure that the form definition and the controller are correctly linked via the form's action attribute and the respective handler in the controller. Option A: Add an <action /> node to the form definition XML with the attribute formid="addRewardPass": This step correctly defines the action associated with the form, specifying which form it is (addRewardPass) and links it to the corresponding handler in the controller. 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: This ensures that when the form is submitted, the specific key (addRewardPass) directs the controller to handle the form submission using the designated processing function. This option fully addresses the need to incorporate the form functionality into the existing Cart.js structure, ensuring that the form's submission triggers the appropriate processing logic.
Question 19
Multiple choice
Which two items are appropriate content of custom logs implemented atcheckout? Choose 2 answers:
-
A
Customer's password at post-checkout sign up
-
B
Order failure information
-
C
Transaction's credit card information
-
D
Payment gateway service response code
Reveal answer details
Close answer details
Correct answersB, D
ExplanationAppropriate content for custom logs implemented at checkout should focus on capturing transactional errors and response codes without violating security or privacy standards: B. Order failure information - Useful for diagnosing why an order did not successfully process, helping in troubleshooting and improving the checkout process. D. Payment gateway service response code - Helps in diagnosing the interaction with payment gateways, understanding failures, or unexpected outcomes in payment processing.
Question 20
Multiple choice
Which three object types can a developer import using the Merchant Tools > Content > Import & Export module in Business Manager? (Choose three.)
-
A
-
B
Images and other static assets
-
C
-
D
-
E
Reveal answer details
Close answer details
Correct answersA, B, E
ExplanationIn Salesforce B2C Commerce Cloud, the Import & Export module in Business Manager allows developers to manage various types of data objects related to the site. Specifically: Content slots (A): These are definable areas within a site where content can be placed and are commonly used to manage dynamic marketing content. They can be imported/exported. Images and other static assets (B): These include media files and other static resources used in the storefront. They can also be managed through the Import & Export module. Content assets (E): These are pieces of content that can be reused across different parts of a site, like headers, footers, or promotional content blocks. On the other hand: Products (C) and Folders (D) are typically managed through different modules dedicated to catalog and content management respectively, not directly through the Content section of the Import & Export module. These capabilities align with the platform's functionality to manage digital assets effectively, as detailed in the Salesforce Commerce Cloud documentation.
Question 21
Single choice
Which object type can a developer import using the Merchant Tools > Import $ Export module in Business Manager?
-
A
Images and other static assets
-
B
-
C
Reveal answer details
Close answer details
Correct answerC
ExplanationIn Salesforce B2C Commerce, using the Merchant Tools > Import & Export module, developers and site administrators can import various types of objects. Among the options listed, "Products" is the type of object that can be imported using this module. This feature allows for the bulk management of product data, including details like pricing, descriptions, and categorization. Importing products is a common task in e-commerce platforms, especially for managing large inventories or updating product information en masse. The Import & Export module provides a streamlined way to handle these operations directly within Business Manager.
Question 22
Single choice
A developer is asked to create a controller endpoint that will be used in a client-side AJAX request. Its purposes is to displayupdated information to the user when the request is completed, without otherwise modifying the appearance of the current page. According to SFRA practices, which method best supports this objective?
-
A
-
B
-
C
Reveal answer details
Close answer details
Correct answerA
ExplanationIn SFRA (Salesforce Reference Architecture), when creating controller endpoints for client-side AJAX requests where updated information needs to be displayed without refreshing or changing the current page layout, the best method to use is res.json() . This method allows the controller to send JSON-formatted response data back to the client, which can be easily handled via JavaScript on the client side. This approach is optimal for asynchronous requests where data needs to be updated dynamically on the page as it does not involve re-rendering the entire page but rather just the relevant data components. This practice is consistent with modern web development standards that focus on enhancing user experience and reducing server load.
Question 23
Single choice
A client wants to differentiate their monobrand stores with a special icon when shown in the store locator. The information is saved in a true/false custom attribute for each Store object in Merchant tools. How should the developer follow SFRA best practices to expose this data for rendering?
-
A
Extend the existing Stores_Find controller with a new middleware function that performs the query
-
B
Pass theStore system object to the template, so that custom propierties are available
-
C
Ad dan <isscript> to the template, and call StoreMgr.searchStoresByCoordinates();
-
D
Use the module.superModule functionality and the call method to add a new property to theStore Model.
Reveal answer details
Close answer details
Correct answerD
ExplanationTo best expose data for rendering in an SFRA-based architecture, especially when dealing with custom attributes such as a special icon for monobrand stores, the recommended approach is to use the module.superModule functionality along with a call method. This approach allows extending the functionality of an existing model without altering the base code directly. By using module.superModule, the developer can add new properties to the Store Model effectively and maintainably, adhering to SFRA's extension and customization best practices.
Question 24
Single choice
Which code sample is required to use a custom tag provided in SiteGenesis in an ISML template? 
-
A
<isinclude template="util/modules">
-
B
<isinclude template="util/customtags">
-
C
<isinclude url="${URLUtils.url('CustomTag-Start')}">
-
D
<isscript> dw.util.CustomTagMgr.createCustomTag("mytag"); <isscript>
Reveal answer details
Close answer details
Correct answerB
ExplanationTo use a custom tag defined in SiteGenesis within an ISML template, the correct code snippet is Option B: <isinclude template="util/customtags"> This ISML tag includes the custom tag definitions from the specified template into the current template, making the custom tags available for use within the template. This method follows the best practice in ISML template development for reusing common functionality defined in separate templates, as outlined in the Salesforce B2C Commerce ISML template documentation and guidelines.
Question 25
Single choice
Given a NewsletterSubscription custom object that has a key attribute named email of type String, what is the correct syntax to create the NewsletterSubscription custom object and persist it to the database?
-
A
Var customobject = dw.object.CustomObjectMgr.createNewsletterSubscription (`email',newsLetterForm.email.v alue);
-
B
Var customobject = dw.object.CustomObjectMgr.createCustomObject (newsletterForm.email.value,`Newsletter Subscription');
-
C
Var customobject = dw.object.CustomObjectMgr.createCustomObject(`NewsletterSubscription', newsLetterForm.email.value);
-
D
Varcustomobject = dw.object.CustomObjectMgr.createCustomObject(`NewsletterSubscription','email', newsLetterForm.email.value);
Reveal answer details
Close answer details
Correct answerC
ExplanationThe correct syntax to create a NewsletterSubscription custom object and persist it to the database using Salesforce B2C Commerce's API is option C: var customObject = dw.object.CustomObjectMgr.createCustomObject ('NewsletterSubscription', newsLetterForm.email.value);. This code uses dw.object.CustomObjectMgr.createCustomObject, which takes two parameters: the first is the type of the custom object (here 'NewsletterSubscription'), and the second is the unique key value for the custom object (in this case, derived from newsLetterForm.email.value). This method is specifically designed to handle the creation and persistence of custom objects based on a unique key.
Question 26
Single choice
A developer is writing a server side script that needs to maintain state across calls. The persistent information needed includes these items. 1. The current customer 2. Whether or not the customer is authenticated 3. 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 non-replicable Custom Object to store the information temporarily.
-
B
Use the Session class in the B2C Commerce api.
-
C
Use an SFRAcontroller, because it runs server-side, the state is automatically maintained
-
D
Use a client-side cookie to store the information for the session duration.
Reveal answer details
Close answer details
Correct answerB
ExplanationTo maintain state across server-side calls efficiently and in a scalable manner, the best practice is: B. Use the Session class in the B2C Commerce API - The Session class provides a server-side storage mechanism for storing user-specific data during a session. This is suitable for storing temporary data such as the authentication state, customer-related information, and privacy preferences securely and efficiently, without persisting sensitive information unnecessarily.
Question 27
Single choice
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 loadscripts?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerD
ExplanationTo optimize controller performance by lazy loading scripts as needed, the best approach in a Salesforce Commerce Cloud environment is to use the require() method. This method allows scripts to be loaded dynamically at the time they are needed rather than at the start of the code execution, which can significantly improve performance by reducing the initial load time and resource consumption. The require () method is part of the CommonJS module specification implemented in the Rhino JavaScript engine used by Salesforce B2C Commerce. This method provides a standard way to include modular JavaScript files as needed during runtime, as detailed in the "Managing Scripts with require()" section of the Salesforce Commerce Cloud documentation.
Question 28
Single choice
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. Whichaction should the developer take to resolve the problem?
-
A
Change the data type of the attributes.B Create an Attnbute Group with the desired attributes in it.
-
B
Set the attributes to site-specific replicable.
Reveal answer details
Close answer details
Correct answerB
ExplanationIf a developer is unable to view attributes of a custom object in the Business Manager of Salesforce B2C Commerce, a probable solution is to create an Attribute Group and include the desired attributes within this group. Attribute Groups help organize and manage attributes within Business Manager, making them more accessible and easier to handle. By grouping related attributes together, it becomes easier to manage their visibility and configuration, particularly in complex implementations with many custom attributes. This organization aids in ensuring that attributes are properly displayed and editable within the Business Manager interface.
Question 29
Single choice
Given the requirements: To integrate with an external web service using HTTP requests To create a service for this purpose with the Service framework using the LocalServiceRegistry class. To test the service before the external service provider makes the API available Which solution allows the developer to satisfy the requirements?
-
A
Create a service and implement the mockfull callback and a sitepreference to enable or disable themock response.
-
B
Create a service and implement the mockFill callback and set the service mode tomock.
-
C
Create a service and a Sitepreference that induce the service to respond witch a mock responseusing a conditional.
-
D
Create two services, one mock and the real one, and a Sitepreference that enable the mock or the real one
Reveal answer details
Close answer details
Correct answerB
ExplanationTo integrate with an external web service using HTTP requests and set up a testing mechanism using the Service Framework in Salesforce B2C Commerce, the best approach is to implement the mockFill callback and set the service mode to "mock". This configuration allows the developer to test the integration with a simulated response from the service. By using the mockFill method, developers can specify the expected response from the external service when it is not yet available. This approach is particularly useful for testing and debugging the integration in a controlled environment before the actual web service goes live. Setting the service mode to "mock" enables this simulated environment, ensuring that the service behaves as if it is interacting with the actual external service.
Question 30
Multiple choice
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 2 answers
-
A
Defines regions within the component type.
-
B
Defines the responsive layout of the rendered template.
-
C
Defines the business and rendering logic of the component required by the merchant.
-
D
Defines theattributes that a merchant enters when using the component type.
Reveal answer details
Close answer details
Correct answersA, D
ExplanationIn the context of Page Designer in Salesforce Commerce Cloud, the JSON metadata definition file serves critical roles in defining the structure and capabilities of a new component. Firstly, it defines the regions within the component type, which are areas where other components can be nested or placed, essentially outlining the structural layout of the component. Secondly, it specifies the attributes that a merchant can set when configuring the component in the Page Designer tool. These attributes can include various configurable options like colors, sizes, or text, which allow for customization of the component's appearance and behavior without hard coding these properties. This file does not directly define the rendering logic or the responsive layout, which are typically handled by the template and CSS respectively.
Question 31
Single choice
Which technical reports datapoint measures the performance of a controller's script execution if network factors and Web Adaptor processing is ignored?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerA
ExplanationThe technical report datapoint that best measures the performance of a controller's script execution, excluding network factors and Web Adaptor processing, is: Processing time (A): This measures the time taken by the server to execute the script, excluding all external factors such as network delay or client-side processing. It focuses solely on the server-side script execution time, providing a clear indication of the performance of the script itself. Other options like Cache hit ratio (B), Call count (C), and Response time (D) measure different aspects of system performance and do not exclusively focus on the execution time of scripts on the server.
Question 32
Multiple choice
A merchant is selling a new product line of televisions. In order to deliver a good customer experience, the merchandising team wants the screen size to beincorporated into the search and navigation journey. Which two things can the developer do to facilitate this for them? Choose 2 answers
-
A
Create a new search refinement for a Boolean value true or false and label it "big screen."
-
B
Define a new searchable attribute for Screen Size.
-
C
Configure catalog-level search refinement definition for Screen Size.
-
D
Configure Screen Size threshold search refinement bucket definitions.
Reveal answer details
Close answer details
Correct answersB, C
ExplanationTo enhance the customer search and navigation experience by incorporating television screen size, the developer should focus on making screen size a searchable and refinable attribute within the site's catalog. This involves: Defining a new searchable attribute for Screen Size: This allows the attribute to be used in search queries, making it possible for customers to search products based on specific screen sizes directly. Configuring catalog-level search refinement definition for Screen Size: By setting up catalog-level refinements, customers can filter search results based on different screen sizes available, thus improving the navigation and selection process. These steps ensure that screen size is effectively integrated into both search functionality and product navigation, enhancing the overall user experience.
|