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

Numerous flags when set, have a direct impact on the result set provided by the Global API's. Which conversion flag allows for sObjects to be returned from the Global API's when provided as a Boolean parameter with a value of true?
Explanation:
The conversion flag that allows for sObjects to be returned from the Global API's when provided as a Boolean parameter with a value of true is ccrz.ccAPI.SZ_SOBJECT. This flag indicates that the API should return the raw sObjects instead of the transformed objects that are usually returned by the API. For example,ccrz.ccServiceProduct.getProducts(ccrz.ccAPI.SZ_SOBJECT,true)will return the Product2 sObjects instead of the ccrz__E_Product__c objects. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,Data Sizing Conventions
Question 42

A query containing a subquery is executed. What is appended to the subquery name as part of its transformation by default in Salesforce B2B Commerce?
Explanation:
A query containing a subquery is executed. By default, in Salesforce B2B Commerce, ''__ccrz'' is appended to the subquery name as part of its transformation. This is done to avoid conflicts with the standard Salesforce fields and relationships. For example,SELECT Id, Name, (SELECT Id, Name FROM Contacts) FROM Accountwill be transformed toSELECT Id, Name, (SELECT Id, Name FROM Contacts__ccrz) FROM Account__ccrz. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,Query Transformation
Question 43

Salesforce B2B Commerce natively provides a robots.txt file, however, a customer can also create its own version.Which three scenarios are valid reasons for customer to create their own robots.txt file? (3 answers)
Explanation:
A customer can create its own robots.txt file for three valid reasons:
The customer wants to reference multiple storefront sitemap indexes in a single robots.txt file. This can be useful if the customer has multiple storefronts under the same domain and wants to provide a single entry point for search engines to crawl their sitemaps.
The customer wants to reference a custom sitemap index. This can be useful if the customer has created their own sitemap index that contains custom sitemaps or sitemaps from other sources.
The customer's store is not located at the root of their domain. This can be useful if the customer has their store under a subdirectory or a subdomain and wants to specify a different robots.txt file for their store than for their main domain. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,Robots.txt File
Question 44

Salesforce B2B leverages global API's for encapsulating business logic into blocks that can be extended and modified by subscribers. Which three statements are true regarding extending ccServiceProduct and exposing custom fields on the Product Detail
Page? (3 answers)
Explanation:
To extend ccServiceProduct and expose custom fields on the Product Detail Page, three statements are true:
Override the getFieldsMap method and add subscriber specific code. This method returns a map of field names and field types for the product entity and its related entities. By overriding this method, the subscriber can add their custom fields to the map and make them available for the API.
Create a global with sharing class that extends ccrz.ccServiceProduct. This class will inherit all the methods and properties of the ccServiceProduct class and allow overriding or extending them. The class should be global and with sharing to ensure that it can be accessed by the API framework and respect the sharing rules.
Override the fetch method and add your subscriber specific code here. This method executes the query to fetch the product data and returns a result object. By overriding this method, the subscriber can modify the query or the result object to include their custom fields or logic. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,Service Classes,ccServiceProduct Class
Question 45

The sizing keys used in the Salesforce B2B Commerce Global APIs five distinct operations. What are three of these operations? (3 answers)
Explanation:
The sizing keys used in the Salesforce B2B Commerce Global APIs perform five distinct operations. Three of these operations are:
Refetch data (used on some Logic classes): This operation indicates that the data should be refetched from the database instead of using the cached data. For example,ccrz.ccServiceCart.getCart(ccrz.ccAPI.SZ_REFETCH)will refetch the cart data and refresh the cache.
Related Query to call (sub queries or direct queries): This operation indicates that the related entities should be retrieved by using sub queries or direct queries. For example,ccrz.ccServiceProduct.getProducts(ccrz.ccAPI.SZ_SUBQUERY)will use sub queries to fetch the related entities for each product, whileccrz.ccServiceProduct.getProducts(ccrz.ccAPI.SZ_DIRECTQUERY)will use direct queries to fetch the related entities separately.
Object type casting: This operation indicates that the data should be cast to a specific object type. For example,ccrz.ccServiceProduct.getProducts(ccrz.ccAPI.SZ_SOBJECT)will cast the data to sObjects instead of transformed objects. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,Data Sizing Conventions
Question 46

A user wants the pricing to reflect the price values stored in an external ERP during the checkoutflow. In what way can this requirement be satisfied?
Explanation:
To reflect the price values stored in an external ERP during the checkout flow, the requirement can be satisfied by overriding the computePricingCart method in ccrz.cc_api_CartExtension and making the callout in this method. This method is responsible for computing the pricing for the cart and its line items. By overriding this method, the user can make a callout to the external ERP and update the pricing information accordingly. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,Logic Classes,ccLogicCart Class
Question 47

A user wants to have a Contact Us page in the storefront. This page will be a web-tolead form and it should have the header and footer, essentially the same look and feel as all the pages in the application. How can this requirement be fulfilled?
Explanation:
To have a Contact Us page in the storefront that is a web-to-lead form and has the same look and feel as all the pages in the application, the requirement can be fulfilled by creating a Subscriber Page (CC Page). This is a custom Visualforce page that can be added to the storefront and use the standard header and footer components. The page can also include a web-to-lead form that submits data to Salesforce as leads. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,Subscriber Pages
Question 48

A user wants to have a customized experience for adding items to the cart. The user also wants the mini cart module to reflect changes to the state of the cart afterwords. How should this requirement be fulfilled?
Explanation:
To have a customized experience for adding items to the cart and also update the mini cart module, the requirement can be fulfilled by triggering the global ''cartChange'' event after the Add to Cart Action on the custom button. This event will notify all the components that are listening to it that the cart has changed and they should refresh their data accordingly. The mini cart module is one of these components, so it will update its state based on the new cart data. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,Events
Question 49

A user wants to leverage a three columnlayout on a page. The user also wants to move the mini-cart widget from the right to the center column. How can this requirement be fulfilled?
Explanation:
To leverage a three column layout on a page and move the mini-cart widget from the right to the center column, the requirement can be fulfilled by creating a Gross Layout Override. This is a custom Visualforce page that overrides the default layout of a page and allows changing its structure and content. The user can create a Gross Layout Override that uses a three column layout and places the mini-cart widget in the center column. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,Gross Layout Overrides
Question 50

What are the templating, Javascript, and CSS frameworks what the cloudcraze managed package leverages?
Explanation:
The templating, JavaScript, and CSS frameworks that the cloudcraze managed package leverages are Bootstrap, Backbone.js, and Handlebars.js. Bootstrap is a CSS framework that provides responsive design and layout components. Backbone.js is a JavaScript framework that provides models, views, collections, and events for building single-page applications. Handlebars.js is a templating engine that allows generating HTML from JSON data. Salesforce
Reference:B2B Commerce and D2C Commerce Developer Guide,Front-End Development
Question