Salesforce Certified B2B Commerce Developer Practice Test - Questions Answers, Page 7
List of questions
Question 61

What isthe difference between Gross Layout Overrides and Subscriber Templates?
Explanation:
The difference between Gross Layout Overrides and Subscriber Templates is that Subscriber Templates allow for modification of the header and the footer, while Gross Layout Overrides allow for modification everything inside the header and footer. Subscriber Templates are custom Visualforce pages that can replace the standard header and footer components on a page. Gross Layout Overrides are custom Visualforce pages that can replace the default layout of a page, such as the number of columns, the position of widgets, or the content of sections. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,Subscriber Templates,Gross Layout Overrides
Question 62

What is the recommended method for increasing the number of required autocomplete characters that are typed before autocomplete works?
Explanation:
The recommended method for increasing the number of required autocomplete characters that are typed before autocomplete works is to override the autoComplete.search_input.minLength value in the CCRZ.uiProperties file. This file contains various properties that control the behavior and appearance of the user interface components. The autoComplete.search_input.minLength property specifies the minimum number of characters that must be entered before the autocomplete feature is triggered. The default value is 3, but it can be changed to any desired value by overriding it in the CCRZ.uiProperties file. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,UI Properties
Question 63

What is true regarding adding more Configuration Settings to Salesforce B2B Commerce?
Explanation:
More modules and metadata can be added to Salesforce B2B Commerce by creating custom configuration settings. Configuration settings are custom settings that store various values and parameters that affect the functionality and appearance of the storefront. They are organized into modules, which group related settings together. To create a custom configuration setting, the user needs to create a custom setting record in Salesforce and specify its module, name, value, and description. The custom setting will then appear in CCAdmin under the specified module. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,Configuration Settings
Question 64

What two kinds of queries do the methods in Salesforce B2B Commerce services perform by default? (2 answers)
Explanation:
Two kinds of queries that the methods in Salesforce B2B Commerce services perform by default are SOQL and schema-less queries. SOQL is the query language that is used to retrieve data from Salesforce objects and fields. Schema-less queries are queries that do not specify the object or field names explicitly, but use placeholders instead. For example,ccrz.ccServiceDao.getQuery('SELECT Id FROM Account WHERE Name = :name')is a schema-less query that uses :name as a placeholder for the field name. The framework will transform this query to use the actual field name based on the query transformation rules. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,Query Transformation
Question 65

When a user buys 10 units of product B, the user wants 1 unit of Product A to be automatically added to the cart. How can this requirement be fulfilled?
Explanation:
To automatically add 1 unit of Product A to the cart when a user buys 10 units of Product B, the requirement can be fulfilled by overriding the prepareToAdd method in ccrz.cc_api_CartExtension. This method is responsible for preparing the cart line items before they are added to the cart. By overriding this method, the user can check the quantity and product ID of the cart line items and add an additional cart line item for Product A if the condition is met. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,API Classes,cc_api_CartExtension Class
Question 66

Where are handlebar Templates defined in the Cloudcraze managed package?
Explanation:
Handlebar Templates are defined in the uiProperties file in the cloudcraze managed package. This file contains various properties that control the behavior and appearance of the user interface components. The handlebarTemplates property defines a map of template names and template contents that are used by the handlebars.js templating engine to generate HTML from JSON data. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,UI Properties,Handlebars Templates
Question 67

Where is the API-based record creation generally handled in Salesforce B2B Commerce?
Explanation:
The API-based record creation is generally handled in the service-layer responsible for the entity in Salesforce B2B Commerce. The service-layer is a set of classes that provide methods for interacting with the data layer and performing business logic. Each entity, such as product, cart, or order, has a corresponding service class that handles the create, read, update, and delete operations for that entity. For example, ccrz.ccServiceProduct provides methods for creating and retrieving products. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,Service Classes
Question 68

Which cookie stores the effective account ID when effective account is enabled?
Explanation:
The cookie that stores the effective account ID when effective account is enabled is apex__effacc. This cookie is set by the cc_hk_EffectiveAccount hook when a user switches to another account that they have access to. The cookie value is the ID of the effective account, which is used to determine the pricing, availability, and visibility of products and categories for that account. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,Effective Account
Question 69

Which event is invoked by any CCRZ Salesforce B2B CommeceView after the view is rendered?
Explanation:
The event that is invoked by any CCRZ Salesforce B2B Commerce View after the view is rendered is view:*:rendered. This event is triggered by the render method of the CCRZ.View class, which is the base class for all views in the framework. The event can be used to perform any actions or logic that depend on the view being rendered, such as initializing widgets, binding events, or updating the user interface. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,Events,View Class
Question 70

Which event is triggered within Salesforce B2B Commerce whenever a cart's statechanges?
Explanation:
The event that is triggered within Salesforce B2B Commerce whenever a cart's state changes is cartChange. This event is triggered by the updateCart method of the CCRZ.Cart class, which is responsible for updating the cart data and performing any actions that depend on the cart state, such as applying discounts, taxes, or shipping charges. The event can be used to notify all the components that are listening to it that the cart has changed and they should refresh their data accordingly. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,Events,Cart Class
Question