B2B-Commerce-Developer Exam Questions

Total 213 Questions


Last Updated On : 16-Jan-2025

What are two common and maintainable ways the content layout of a Lightning Web Component can be implemented?


A. Spreading layout styles across several separate components


B. Styling the :host pseudo-element (or other elements) via the CSS file


C. Using inline styles


D. Applying SLDS classes to internal elements





B.
  Styling the :host pseudo-element (or other elements) via the CSS file

D.
  Applying SLDS classes to internal elements

Explanation:

For maintainable and scalable Lightning Web Component development, it's recommended to style components by targeting the :host pseudo-element in the component's CSS file and by applying Salesforce Lightning Design System (SLDS) classes to internal elements. These practices ensure consistent styling that aligns with Salesforce's design standards and provides a clear separation of concerns between component structure and styling.

Which two log levels does a developer need to include to debug platform events?


A. Apex Code


B. Database


C. Callout


D. Workflow





A.
  Apex Code

D.
  Workflow

Explanation:

According to the Platform Events Developer Guide, to debug platform events, a developer needs to include the Apex Code and Workflow log levels in the trace flag entry for the Automated Process entity or the overridden user. The Apex Code log level captures the execution of the Apex trigger that subscribes to the platform event. The Workflow log level captures the execution of the event process or the resumed flow interview that subscribes to the platform event. The other log levels are not relevant for debugging platform events. The Database log level captures database operations, such as DML statements and SOQL queries. The Callout log level captures the details of HTTP requests andresponses, such as web service callouts.

References: Platform Events Developer Guide, Set Up Debug Logs for Event Subscriptions, Set Up Debug Logging

Which handlebars helper expression is used in Salesforce B2B Commerce pages and components to toggle the display of a block of markup?


A. {{#ifStoreSetting 'Field__c'}} ... {{/ifStoreSetting}}


B. {{#ifSetting 'Page.cfg}} ... {{/ifSetting}}


C. {{#ifConfig 'Field__c'}} ... {{/ifConfig}}


D. {{#ifDisplay 'Page.cfg'}} ... {{/ifDisplay}}





C.
  {{#ifConfig 'Field__c'}} ... {{/ifConfig}}

Explanation:

The handlebars helper expression that is used in Salesforce B2B Commerce pages and components to toggle the display of a block of markup is {{#ifConfig ‘Field__c’}} … {{/ifConfig}}. This expression will evaluate the value of the configuration setting with the API name Field__c and render the block of markup if the value is true, or skip it if the value is false. For example, {{#ifConfig 'CO.showMiniCart'}} {{/ifConfig}} will render the mini-cart div only if the configuration setting CO.showMiniCart is true.

Salesforce References: B2B Commerce and D2C Commerce Developer Guide, Handlebars Helpers

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?


A. ccrz.ccAPISizing.SKIPTRZ


B. ccrz.ccAPISizing.SOBJECT


C. ccrz.ccAPI.SZ_SKIPTRZ


D. ccrz.ccAPI.SZ_SOBJECT





D.
  ccrz.ccAPI.SZ_SOBJECT

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

Which three statements are true about Global API versioning? (3 answers)


A. Calling in with an API version set to lower than 1 will result in an exceptional case where the exception classccrz.BelowMinAPIVersionException will be returned tocallers.


B. There is no need to pass API_VERSION to the Global APIs, and based on the Salesforce B2B Commerce Managed Package version, Global APIs are able to figure out what version of the API to use.


C. The API version is scoped at the Class API level and NOT at the method level.


D. Minimum API_VERSION is 1 and the Maximum API version follows the releases. E.g. The maximum was 4 as of Salesforce B2B Commerce Release-4.5, 5 as of Salesforce B2B CommerceRelease 4.6, etc.


E. Calling in with an API version set to more than current maximum will result in exception case where the exception class ccrz.ExceedsMaxAPIVersionException will be returned to callers.





A.
  Calling in with an API version set to lower than 1 will result in an exceptional case where the exception classccrz.BelowMinAPIVersionException will be returned tocallers.

D.
  Minimum API_VERSION is 1 and the Maximum API version follows the releases. E.g. The maximum was 4 as of Salesforce B2B Commerce Release-4.5, 5 as of Salesforce B2B CommerceRelease 4.6, etc.

E.
  Calling in with an API version set to more than current maximum will result in exception case where the exception class ccrz.ExceedsMaxAPIVersionException will be returned to callers.

Explanation:

Three statements that are true about Global API versioning are: Calling in with an API version set to lower than 1 will result in an exceptional case where the exception class ccrz.BelowMinAPIVersionException will be returned to callers. This exception indicates that the API version is not supported by the framework and the caller should use a higher API version. The API version is scoped at the Class API level and NOT at the method level. This means that all the methods in a class will use the same API version that is specified by the caller. For example, if the caller passes an API version of 4 to ccrz.ccServiceProduct.getProducts(), then all the other methods in ccrz.ccServiceProduct will also use API version 4. Calling in with an API version set to more than current maximum will result in exception case where the exception class ccrz.ExceedsMaxAPIVersionException will be returned to callers. This exception indicates that the API version is not supported by the framework and the caller should use a lower API version. Salesforce References: B2B Commerce and D2C Commerce Developer Guide, API Versioning

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?


A. A subscriber-supplied token


B. "__ccrz"


C. The "*" symbol


D. The letter "S"





B.
  "__ccrz"

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 FROMContacts) FROM Account will be transformed to SELECT Id, Name, (SELECT Id, Name FROM Contacts__ccrz) FROM Account__ccrz. Salesforce References: B2B Commerce and D2C Commerce Developer Guide, Query Transformation

Which category can receive signaling from a Lightning Message Channel?


A. only descendents (i.e. children)


B. only direct siblings


C. page (anywhere on it)


D. only ancestors (i.e. parents)





C.
  page (anywhere on it)

Explanation:

A Lightning Message Channel can receive signaling from any component on a page (anywhere on it). A Lightning Message Channel is a service that allows components to communicate with each other across different Salesforce UI technologies, such as Aura, LWC, Visualforce, and Lightning web apps. A component can subscribe to a message channel and receive events that are published by another component on the same or different page. The message channel acts as a mediator that delivers the events to the subscribers. A Lightning Message Channel does not receive signaling only from descendants (i.e., children), only from direct siblings, or only from ancestors (i.e., parents), as these are limitations of event-based communication.

Salesforce References: [Lightning Web Components Developer Guide: Communicate Across Salesforce UI Technologies], [Lightning Web Components Developer Guide: Communicate with Events]

In a B2B Commerce store, which three tasks must a developer complete to implement the use of a third-party service for either tax, shipping, or pricing calculation?


A. Register an Apex class as the integration in the store administration


B. Create a flow to call the external service directly


C. Create an Apex class implementing the appropriate interface.


D. Create a named credential for authentication with an external service


E. Create an Apex class with an invocable method





A.
  Register an Apex class as the integration in the store administration

C.
  Create an Apex class implementing the appropriate interface.

D.
  Create a named credential for authentication with an external service

Explanation:

To implement the use of a third-party service for either tax, shipping, or pricing calculation in a B2B Commerce store, a developer must complete these three tasks: Create an Apex class that implements the appropriate interface for the calculation type. For example, for tax calculation, the developer must implement the sfdc_checkout.CartTax interface and define the getTax method. This method takes a Cart object as an input parameter and returns a list of CartTax objects with the calculated tax amounts.

Create a named credential for authentication with the external service. A named credential specifies the URL of a callout endpoint and its required authentication parameters. The developer can use the named credential in the Apex class to make the callout to the external service and handle the response. Register the Apex class as the integration in the store administration. The developer must specify the Apex class name in the corresponding field for the calculation type. For example, for tax calculation, the developer must enter the Apex class name in the Tax Calculation Integration field. This way, the store can invoke the Apex class to perform the calculation for each cart.

The other options are not valid tasks for implementing the use of a third-party service. Creating a flow to call the external service directly is not supported for B2B Commerce, and creating an Apex class with an invocable method is not required for the calculation integration.

References:

Integrate with External Services

CartTax Interface

Named Credentials

[Store Administration]

The ccUtil apex class in Salesforce B2B Commerce provides numerous utility functions that can be leveraged in subscriber classes. What are two ways to check the input or return data of the Global API's? (2 answers)


A. ccrz.ccUtil.isNotEmpty(Map) andccrz.ccUtil.isNotEmpty(List)


B. ccrz.ccUtil.isNotValid(Map) andccrz.ccUtil.isNotValid(List)


C. ccrz.ccUtil.isValid(Map) and ccrz.ccUtil.isValid(List)


D. ccrz.ccUtil.isEmpty(Map) and ccrz.ccUtil.isEmpty(List)





A.
  ccrz.ccUtil.isNotEmpty(Map) andccrz.ccUtil.isNotEmpty(List)

D.
  ccrz.ccUtil.isEmpty(Map) and ccrz.ccUtil.isEmpty(List)

Explanation:

The ccUtil apex class provides two methods to check the input or return data of the Global API’s: ccrz.ccUtil.isNotEmpty(Map) and ccrz.ccUtil.isEmpty(Map). These methods return true if the map is not null and contains at least one entry, or if the map is null or empty, respectively. Similarly, ccrz.ccUtil.isNotEmpty(List) and ccrz.ccUtil.isEmpty(List) return true if the list is not null and contains at least one element, or if the list is null or empty, respectively. These methods are useful for validating the input parameters or the output results of the Global API’s.

Which three files are required for a deployable Lightning Web Component called displayMyData that will fetch and display data?


A. displayMyData.css


B. displayMyData.js-meta.xml


C. displayMyData.js


D. displayMyDataController.cls


E. displayMyData.html





A.
  displayMyData.css

B.
  displayMyData.js-meta.xml

E.
  displayMyData.html

Explanation:

For a deployable Lightning Web Component likedisplayMyData, the required files include the component's CSS file (displayMyData.css) for styling, the metadata configuration file (displayMyData.js-meta.xml) for defining the component's configuration and properties, and the template file (displayMyData.html) for the component's HTML structure. The JavaScript file (displayMyData.js) contains the business logic but is not listed as an option here. For deployment, these files are essential. Refer to the Salesforce LWC documentation for deployment requirements:Salesforce LWC Deployment Documentation.


Page 8 out of 22 Pages
Previous