ExamGecko
Home Home / Salesforce / Certified B2B Commerce Developer

Salesforce Certified B2B Commerce Developer Practice Test - Questions Answers, Page 10

Question list
Search
Search

Which two different types of services do Salesforce B2B Commerce APIs leverage? (2 answers)

A.
Logic services which are responsible for implementing business logic associated with entities.
A.
Logic services which are responsible for implementing business logic associated with entities.
Answers
B.
Global services which are responsible for querying and transforming data from entities
B.
Global services which are responsible for querying and transforming data from entities
Answers
C.
Data services which are responsible for querying and transforming data from entities
C.
Data services which are responsible for querying and transforming data from entities
Answers
D.
Hook services which are extension points for subscribers to tie into.
D.
Hook services which are extension points for subscribers to tie into.
Answers
Suggested answer: A, C

Explanation:

Two different types of services that Salesforce B2B Commerce APIs leverage are:

Logic services which are responsible for implementing business logic associated with entities. These services are defined in the logic classes, such as ccrz.ccLogicCart, ccrz.ccLogicOrder, or ccrz.ccLogicProduct. These classes provide methods for validating inputs, performing calculations, applying rules, or updating data for each entity.

Data services which are responsible for querying and transforming data from entities. These services are defined in the service classes, such as ccrz.ccServiceCart, ccrz.ccServiceOrder, or ccrz.ccServiceProduct. These classes provide methods for creating, reading, updating, and deleting data for each entity. Salesforce

Reference:B2B Commerce and D2C Commerce Developer Guide,Service Classes,Logic Classes

Which two Salesforce B2B Commerce visualforce pages must be enabled at a Salesforce Community level to make the out of the box SEO functionality available? (2 answers)

A.
CCSizeIndex
A.
CCSizeIndex
Answers
B.
SizeMap
B.
SizeMap
Answers
C.
CCCatSiteMap
C.
CCCatSiteMap
Answers
D.
ProductMap
D.
ProductMap
Answers
Suggested answer: A, C

Explanation:

Two Salesforce B2B Commerce Visualforce pages that must be enabled at a Salesforce Community level to make the out of the box SEO functionality available are:

CCSizeIndex: This page generates a sitemap.xml file, which is a file that lists all the pages and resources on a site that can be crawled by web crawlers. The page uses the configuration settings CO.SiteMapIncludeProducts and CO.SiteMapIncludeCategories to specify which products and categories should be included in the sitemap.

CCCatSiteMap: This page generates a category sitemap file, which is a file that lists all the categories on a site that can be crawled by web crawlers. The page uses the configuration setting CO.SiteMapCategoryDepth to specify how many levels of subcategories should be included in the category sitemap. Salesforce

Reference:B2B Commerce and D2C Commerce Developer Guide,Sitemap Files

Which two statement are true for Mass Order (2 answers)

A.
Mass Order pricing is done via a batch job.
A.
Mass Order pricing is done via a batch job.
Answers
B.
Mass order works with thedefault wishlists
B.
Mass order works with thedefault wishlists
Answers
C.
The variation product is leveraged for SKUs.
C.
The variation product is leveraged for SKUs.
Answers
D.
Mass Order is mobile ready with the ccrz templates.
D.
Mass Order is mobile ready with the ccrz templates.
Answers
Suggested answer: A, C

Explanation:

Mass Order pricing is done via a batch job, which means that the prices are not calculated in real time, but rather at a scheduled time. Mass order works with the variation product, which is a product that has multiple SKUs with different attributes, such as size or color. Mass order does not work with the default wishlists, which are used to store products that the customer wants to buy later. Mass order is not mobile ready with the ccrz templates, which are the default templates for the storefront pages. Salesforce

Reference:B2B Commerce Developer Guide: Mass Order,B2B Commerce Developer Guide: Variation Products

Which two statements are true about Global API's in Salesforce B2B Commerce? (2 answers)

A.
Each globalAPI method takes in a Map<String, Object> as a single parameter and returns a Map<String, Object>
A.
Each globalAPI method takes in a Map<String, Object> as a single parameter and returns a Map<String, Object>
Answers
B.
Global APIs are versioned.
B.
Global APIs are versioned.
Answers
C.
Global APIs will catch any Exceptions that are thrown as part of missing parameters.
C.
Global APIs will catch any Exceptions that are thrown as part of missing parameters.
Answers
D.
Global APIs will handle Transaction scope, and the Subscriber calling it does not need to handle scope.
D.
Global APIs will handle Transaction scope, and the Subscriber calling it does not need to handle scope.
Answers
Suggested answer: A, B

Explanation:

Global APIs are methods that can be called from any Apex class or Visualforce page within the B2B Commerce managed package or subscriber code. Each global API method takes in a Map<String, Object> as a single parameter and returns a Map<String, Object>. This allows for flexibility and extensibility of the API. Global APIs are versioned, which means that they have a version number in their name, such as ccApi_1_0. This ensures backward compatibility and allows for new features and enhancements to be added without breaking existing functionality. Global APIs do not catch any Exceptions that are thrown as part of missing parameters, which means that the caller is responsible for handling any errors or validations. Global APIs do not handle Transaction scope, and the Subscriber calling it does not need to handle scope. This means that the caller can decide whether to use transactions or not, depending on the business logic and performance requirements. Salesforce

Reference:B2B Commerce Developer Guide: Global APIs,B2B Commerce Developer Guide: Global API Versioning

Which two statements are true regarding the cc_CallContext class in Salesforce B2B Commerce? (2 answers)

A.
The Salesforce session is accessible via the getSession method
A.
The Salesforce session is accessible via the getSession method
Answers
B.
The class can be used internally within Salesforce B2B Commerce and in subscriber code to access context level parameters
B.
The class can be used internally within Salesforce B2B Commerce and in subscriber code to access context level parameters
Answers
C.
The userLocale variable returns the current Locale for storefront.
C.
The userLocale variable returns the current Locale for storefront.
Answers
D.
The current storefront is accessible via thisclass
D.
The current storefront is accessible via thisclass
Answers
Suggested answer: B, D

Explanation:

The cc_CallContext class is a utility class that provides access to various context level parameters, such as the current storefront, user, cart, price list, currency, locale, and session. The class can be used internally within Salesforce B2B Commerce and in subscriber code to access these parameters. The current storefront is accessible via this class by using the getStorefront method, which returns a cc_Storefront__c object. The userLocale variable returns the current Locale for storefront, but it is not part of the cc_CallContext class. It is a global variable that can be accessed from any Visualforce page or component by using {!userLocale}. The Salesforce session is accessible via the getSession method, but it is not part of the cc_CallContext class either. It is a method of the cc_SessionUtil class, which is another utility class that provides methods for managing sessions. Salesforce

Reference: [B2B Commerce Developer Guide: cc_CallContext Class], [B2B Commerce Developer Guide: cc_SessionUtil Class]

Which two steps are necessary to enable Salesforce B2B Commerce logging in the managed package?

A.
Ensure you save a value in the Logging Token input field in the Global Settings section of CC Admin.
A.
Ensure you save a value in the Logging Token input field in the Global Settings section of CC Admin.
Answers
B.
Turn On theCheckbox 'Cloudcraze Logging' in CC Admin.
B.
Turn On theCheckbox 'Cloudcraze Logging' in CC Admin.
Answers
C.
Ensure the value saved in the Logging token field is appended to the ccLog query parameter.
C.
Ensure the value saved in the Logging token field is appended to the ccLog query parameter.
Answers
D.
Set a cookie with the Id of the user accessing the storefront in CC Admin
D.
Set a cookie with the Id of the user accessing the storefront in CC Admin
Answers
Suggested answer: A, C

Explanation:

To enable Salesforce B2B Commerce logging in the managed package, you need to do two steps. First, you need to save a value in the Logging Token input field in the Global Settings section of CC Admin. This value can be any string that you choose, such as ''debug''. Second, you need to ensure that the value saved in the Logging token field is appended to the ccLog query parameter in the URL of the storefront page that you want to debug. For example, if your logging token is ''debug'', then your URL should look like this: https://my-storefront.com/?ccLog=debug. This will enable logging for that page only. You do not need to turn on the checkbox ''Cloudcraze Logging'' in CC Admin, as this is an old setting that is no longer used. You also do not need to set a cookie with the Id of the user accessing the storefront in CC Admin, as this is not required for logging. Salesforce

Reference: [B2B Commerce Developer Guide: Logging]

Which two usages of ccLog should be avoided in Salesforce B2B Commerce? (2 answers)

A.
ccrz.ccLog.log(System.LoggingLevel.ERROR, 'D:something', myCallToGetMessage(pl) ), where myCallToGetMessage(pl) is a method invocation
A.
ccrz.ccLog.log(System.LoggingLevel.ERROR, 'D:something', myCallToGetMessage(pl) ), where myCallToGetMessage(pl) is a method invocation
Answers
B.
crz.ccLog.log(System.LoggingLevel.WARN, 'D:something', 'Something unexpected occurred: The data we were expecting for pl was not there,')
B.
crz.ccLog.log(System.LoggingLevel.WARN, 'D:something', 'Something unexpected occurred: The data we were expecting for pl was not there,')
Answers
C.
crz.ccLog.log(System.LoggingLevel.DEBUG, 'D:myOrderList', myOrderList), where myOrderList is a list of orders
C.
crz.ccLog.log(System.LoggingLevel.DEBUG, 'D:myOrderList', myOrderList), where myOrderList is a list of orders
Answers
D.
crz.ccLog.log(System.LoggingLevel.DEBUG, 'D:myOrder', myOrder), where myOrder is an order object
D.
crz.ccLog.log(System.LoggingLevel.DEBUG, 'D:myOrder', myOrder), where myOrder is an order object
Answers
Suggested answer: A, C

Explanation:

You should avoid using ccLog in two scenarios. First, you should avoid using ccLog with System.LoggingLevel.ERROR when passing in a method invocation as the third parameter, such as ccrz.ccLog.log(System.LoggingLevel.ERROR, 'D:something', myCallToGetMessage(pl) ). This is because if an exception occurs within the method invocation, it will not be caught by ccLog and will cause an unhandled exception on the page. Instead, you should use a try-catch block around the method invocation and log the exception separately. Second, you should avoid using ccLog with System.LoggingLevel.DEBUG when passing in a large collection or object as the third parameter, such as ccrz.ccLog.log(System.LoggingLevel.DEBUG, 'D:myOrderList', myOrderList), where myOrderList is a list of orders. This is because logging large objects can cause performance issues and consume a lot of heap space. Instead, you should use a loop to log only the relevant fields or properties of the object or collection. You can use ccLog with System.LoggingLevel.WARN when passing in a string as the third parameter, such as ccrz.ccLog.log(System.LoggingLevel.WARN, 'D:something', 'Something unexpected occurred: The data we were expecting for pl was not there,'). This is a valid use case for logging a warning message. You can also use ccLog with System.LoggingLevel.DEBUG when passing in a small object as the third parameter, such as ccrz.ccLog.log(System.LoggingLevel.DEBUG, 'D:myOrder', myOrder), where myOrder is an order object. This is acceptable as long as the object is not too large or complex. Salesforce

Reference: [B2B Commerce Developer Guide: Logging]

Why is the use of a standard Visualforce control such as apex:form discouraged in Salesforce B2B Commerce page includes and subscriber pages?

A.
Visualforce 'scopes' controls that are present on a page and scope of the control will be set to 'ccrz'
A.
Visualforce 'scopes' controls that are present on a page and scope of the control will be set to 'ccrz'
Answers
B.
Apex:form render DOM components slowly
B.
Apex:form render DOM components slowly
Answers
C.
The CCRZ Javascript object is not accessible within an apex:form control.
C.
The CCRZ Javascript object is not accessible within an apex:form control.
Answers
D.
Javascript events are not supported within an apex:form control
D.
Javascript events are not supported within an apex:form control
Answers
Suggested answer: C

Explanation:

The use of a standard Visualforce control such as apex:form is discouraged in Salesforce B2B Commerce page includes and subscriber pages because the CCRZ JavaScript object is not accessible within an apex:form control. The CCRZ JavaScript object is a global object that provides access to various B2B Commerce functions and properties, such as logging, utilities, events, and configuration. Using an apex:form control would prevent the developer from using the CCRZ JavaScript object and its features. Visualforce does not ''scope'' controls that are present on a page and scope of the control will be set to ''ccrz'', as this is not a valid statement. Apex:form does not render DOM components slowly, as this is not a performance issue. JavaScript events are supported within an apex:form control, as this is not a limitation. Salesforce

Reference: B2B Commerce Developer Guide: CCRZ JavaScript Object, B2B Commerce Developer Guide: Page Includes

Witch static method invocation is used to initialize ccrz.cc_CallContext with information from ccrz.cc_RemoteActionContext and return an instance of ccrz.cc_RemoteActionResult in an apex @RemoteAction methos?

A.
ccrz.cc_CallContext.init(ccrz.cc_RemoteActionContext)
A.
ccrz.cc_CallContext.init(ccrz.cc_RemoteActionContext)
Answers
B.
ccrz.cc_CallContext.initCallContext(ccrz.cc_RemoteActionContext)
B.
ccrz.cc_CallContext.initCallContext(ccrz.cc_RemoteActionContext)
Answers
C.
ccrz.cc_CallContext.initRemoteActionContext(ccrz.cc_RemoteActionContext)
C.
ccrz.cc_CallContext.initRemoteActionContext(ccrz.cc_RemoteActionContext)
Answers
D.
ccrz.cc_CallContext.initializeCallContext(ccrz.cc_RemoteActionContext)
D.
ccrz.cc_CallContext.initializeCallContext(ccrz.cc_RemoteActionContext)
Answers
Suggested answer: B

Explanation:

The static method invocation that is used to initialize ccrz.cc_CallContext with information from ccrz.cc_RemoteActionContext and return an instance of ccrz.cc_RemoteActionResult in an Apex @RemoteAction method is ccrz.cc_CallContext.initCallContext(ccrz.cc_RemoteActionContext). This method takes in a ccrz.cc_RemoteActionContext object as a parameter and returns a ccrz.cc_RemoteActionResult object. The ccrz.cc_RemoteActionContext object contains information about the current storefront, user, cart, price list, currency, locale, and session. The ccrz.cc_RemoteActionResult object contains information about the status, result, and errors of the remote action. The other methods are not valid or do not exist. Salesforce

Reference: B2B Commerce Developer Guide: cc_CallContext Class, B2B Commerce Developer Guide: cc_RemoteActionContext Class, B2B Commerce Developer Guide: cc_RemoteActionResult Class

Which two scoped modules should a developer import in Lightning web components to check user permissions?

A.
@salesforce/permission
A.
@salesforce/permission
Answers
B.
@salesforce/customPermission
B.
@salesforce/customPermission
Answers
C.
@salesforce/hasPermission
C.
@salesforce/hasPermission
Answers
D.
@salesforce/userPermission
D.
@salesforce/userPermission
Answers
Suggested answer: A, B

Explanation:

To check user permissions in Lightning web components, a developer should import two scoped modules: @salesforce/permission and @salesforce/customPermission. The @salesforce/permission module allows the developer to check if the user has access to a standard permission, such as View Setup or Modify All Data. The @salesforce/customPermission module allows the developer to check if the user has access to a custom permission, such as Enable Debug Mode or Manage Orders. The other modules do not exist or are not related to user permissions. Salesforce

Reference: Lightning Web Components Developer Guide: Check User Permissions, Lightning Web Components Developer Guide: Import Salesforce Modules

Total 221 questions
Go to page: of 23