ExamGecko
Home Home / Salesforce / Certified B2B Commerce Administrator

Salesforce Certified B2B Commerce Administrator Practice Test - Questions Answers, Page 25

Question list
Search
Search

List of questions

Search

Which two are considered discrete units of work (code units) within a transaction in the debug logs?

A.
Validation rule
A.
Validation rule
Answers
B.
Lightning component load
B.
Lightning component load
Answers
C.
Web service invocation
C.
Web service invocation
Answers
D.
Apex class
D.
Apex class
Answers
Suggested answer: C, D

Explanation:

Discrete units of work (code units) are blocks of code that execute as a single operation and can be rolled back if an error occurs. Within a transaction in the debug logs, the following are considered discrete units of work:

Web service invocation. This is a code unit that calls an external web service using SOAP or REST protocols. The web service invocation can be synchronous or asynchronous, and it can return a response or a fault. The debug logs show the request and response details, as well as the execution time and heap size of the code unit.

Apex class. This is a code unit that defines a custom class with variables, methods, constructors, and other elements. The Apex class can be invoked by triggers, Visualforce pages, Lightning components, or other classes. The debug logs show the entry and exit points, as well as the execution time and heap size of the code unit.Reference:

Execution Governors and Limits

Debug Log Analysis

A developer is working on a storefront that needs to use a sophisticated pricing engine hosted as a service outside the org. Assuming security and trusts have been established, which two actions must the developer take?

A.
Make a call to the service
A.
Make a call to the service
Answers
B.
Use External Objects
B.
Use External Objects
Answers
C.
Implement the sfdc_checkout.PriceCalculations
C.
Implement the sfdc_checkout.PriceCalculations
Answers
D.
Implement the sfdc_checkout.CartPriceCalculations
D.
Implement the sfdc_checkout.CartPriceCalculations
Answers
Suggested answer: A, C

Explanation:

To use a sophisticated pricing engine hosted as a service outside the org, the developer must take the following actions:

Make a call to the service. The developer must use an Apex class or a Lightning web component to make a callout to the external service using the appropriate protocol, method, headers, parameters, and body. The developer must also handle the response from the service and parse the data as needed. The developer must ensure that the external service is added to the Remote Site Settings in Salesforce to allow the callout.

Implement the sfdc_checkout.PriceCalculations interface. The developer must implement this interface in an Apex class to override the default pricing logic of B2B Commerce and use the custom pricing logic from the external service. The developer must implement the methods of this interface, such as calculateCartPrice, calculateLineItemPrice, calculateShippingPrice, and so on. The developer must also register the custom pricing class in CC Admin under Storefront > Pricing > Pricing Engine.Reference:

Callouts from Lightning Web Components

Create a Custom Pricing Engine

What are two ways a developer should ensure that a store verifies shipping charges by using an external service?

A.
Create a flow using an action to retrieve shipping changes from an external service and update the Cart Delivery Group Methods.
A.
Create a flow using an action to retrieve shipping changes from an external service and update the Cart Delivery Group Methods.
Answers
B.
Create an Apex class implementing the sfdc_checkout.CartShippingCharges interface to retrieve shipping charges from an external services and register it as as the ..Calculation integration in the store administration.
B.
Create an Apex class implementing the sfdc_checkout.CartShippingCharges interface to retrieve shipping charges from an external services and register it as as the ..Calculation integration in the store administration.
Answers
C.
Create an Apex class to retrieve shipping charges from an external service and update the Cart Delivery group methods.
C.
Create an Apex class to retrieve shipping charges from an external service and update the Cart Delivery group methods.
Answers
D.
Create a trigger to retrieve shipping charges from an external service and update the Cart Delivery Group Methods.
D.
Create a trigger to retrieve shipping charges from an external service and update the Cart Delivery Group Methods.
Answers
Suggested answer: B, C

Explanation:

To ensure that a store verifies shipping charges by using an external service, a developer can use two ways:

Create an Apex class implementing the sfdc_checkout.CartShippingCharges interface to retrieve shipping charges from an external service and register it as the Shipping Calculation integration in the store administration. The sfdc_checkout.CartShippingCharges interface defines the methods that a custom shipping calculation class must implement to calculate shipping charges based on the cart items, delivery groups, and shipping methods. The developer can use this interface to call an external service API and return the shipping charges for each delivery group.The developer must also register the custom Apex class as the Shipping Calculation integration in the store administration, so that it can be used by the store to verify shipping charges during checkout1.

Create an Apex class to retrieve shipping charges from an external service and update the Cart Delivery Group Methods. The Cart Delivery Group Methods object stores the shipping methods and charges for each delivery group in a cart. The developer can create an Apex class that queries this object and updates the shipping charges based on the response from an external service API.The developer can invoke this Apex class from a trigger, a process, or a flow that runs when a cart is updated or submitted2.Reference:1: Add a Shipping Calculation Service for Commerce Stores - Salesforce Help3,2: CartDeliveryGroupMethod Object Reference - Salesforce Help4

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

A.
Apex Code
A.
Apex Code
Answers
B.
Database
B.
Database
Answers
C.
Callout
C.
Callout
Answers
D.
Workflow
D.
Workflow
Answers
Suggested answer: A, D

Explanation:

To debug platform events, a developer needs to include two log levels: Apex Code and Workflow. The Apex Code log level captures the execution of Apex triggers that subscribe to platform events. The Workflow log level captures the execution of processes and flows that subscribe to platform events.By setting these log levels to FINEST, the developer can see detailed information about the platform event messages, such as their fields, values, replay IDs, and delivery statuses5.The other log levels are not relevant for debugging platform events, as they capture different aspects of system activity, such as database operations or callouts6.Reference:5: Set Up Debug Logs for Event Subscriptions - Platform Events Developer Guide7,6: Debug Log Levels - Salesforce Help

A developer has written the logic to import products from an enterprise resource planning (ERP) platform into B2B storefront products. The imported products are in Salesforce, but they are not visible in the store.

What did the developer forget to assign to the imported products?

A.
Entitiement policy
A.
Entitiement policy
Answers
B.
Storefront
B.
Storefront
Answers
C.
Account
C.
Account
Answers
D.
Promotion
D.
Promotion
Answers
Suggested answer: B

Explanation:

To make the imported products visible in the store, the developer must assign them to a storefront. A storefront is a record that defines the properties and settings of a B2B Commerce store, such as its name, URL, theme, currency, and language. A storefront also has a relationship with the Product2 object, which allows the developer to specify which products are available for the store.The developer can assign products to a storefront by using the Storefronts related list on the product detail page, or by using the Products related list on the storefront detail page1.The other options are not required to make the products visible in the store, although they may affect other aspects of the product display or functionality.Reference:1: Create a Storefront - Trailhead2

Which three components should a developer use on the product page to replace the out-of-the-box Product Detai Card component?

A.
Product Detail Breadcrumbs component
A.
Product Detail Breadcrumbs component
Answers
B.
Product Fields Short component
B.
Product Fields Short component
Answers
C.
Product Field Long component
C.
Product Field Long component
Answers
D.
Product Detail Purchase Options component
D.
Product Detail Purchase Options component
Answers
E.
Product Detail Image Gallery component
E.
Product Detail Image Gallery component
Answers
Suggested answer: B, C, E

Explanation:

To replace the out-of-the-box Product Detail Card component on the product page, a developer can use three components: Product Fields Short component, Product Field Long component, and Product Detail Image Gallery component. These components are part of the standard Lightning web components that are available for B2B Commerce stores.They allow the developer to customize the product page layout and display different product fields and images3.The Product Fields Short component displays short text fields from the product object, such as name, SKU, or price4.The Product Field Long component displays long text fields from the product object, such as description or specifications5.The Product Detail Image Gallery component displays a carousel of product images from the product object or from a custom field6. The other options are not suitable for replacing the Product Detail Card component, as they serve different purposes.The Product Detail Breadcrumbs component displays the navigation path from the home page to the current product page7.The Product Detail Purchase Options component displays a button to add the product to the cart or to request a quote8.Reference:3: Lightning Web Components for B2B Commerce - Trailhead,4: Product Fields Short Component - Salesforce Developers,5: Product Field Long Component - Salesforce Developers,6: Product Detail Image Gallery Component - Salesforce Developers,7: Product Detail Breadcrumbs Component - Salesforce Developers,8: Product Detail Purchase Options Component - Salesforce Developers

A developer is working on an existing checkout information built against the Lightning Web Runtime (LWR) and wants to implement a custom child checkout component to modify out-of-the-box functionality.

Which interface must the developer implement for the child component?

A.
CheckoutSavable
A.
CheckoutSavable
Answers
B.
CheckoutInterface
B.
CheckoutInterface
Answers
C.
CustomCheckout
C.
CustomCheckout
Answers
D.
CheckoutStep
D.
CheckoutStep
Answers
Suggested answer: D

Explanation:

To implement a custom child checkout component to modify out-of-the-box functionality in an LWR checkout flow, the developer must implement the CheckoutStep interface. This interface defines the contract between the child component and the parent Checkout component, and allows the child component to communicate with the checkout flow. The developer must implement the methods of this interface, such as getStepName, getStepLabel, getStepStatus, validateStep, and so on. The developer can also use the @wire(CheckoutApi) decorator to access the checkout API methods and data.Reference:

Customize Your Checkout Flow for a B2B Store (LWR)

CheckoutStep Interface

What needs to be done first, in order to modify the out-of-the-box checkout flow template?

A.
Clone the existing checkout flow
A.
Clone the existing checkout flow
Answers
B.
Change the permissions on the existing checkout flow
B.
Change the permissions on the existing checkout flow
Answers
C.
Rename the existing Checkout Flow in place
C.
Rename the existing Checkout Flow in place
Answers
D.
Delete the existing flow
D.
Delete the existing flow
Answers
Suggested answer: A

Which two methods from the platformResourceLoader module are relevant for including third party JavaScript and CSS in a Lightning web component?

A.
loadClientScript
A.
loadClientScript
Answers
B.
loadScript
B.
loadScript
Answers
C.
loadCss
C.
loadCss
Answers
D.
loadStyle
D.
loadStyle
Answers
Suggested answer: B, D

Explanation:

To include third party JavaScript and CSS in a Lightning web component, a developer can use two methods from the platformResourceLoader module: loadScript and loadStyle. These methods allow the developer to access JavaScript and CSS files that are uploaded as static resources in Salesforce. The loadScript method returns a promise that resolves when the JavaScript file is loaded, and the loadStyle method returns a promise that resolves when the CSS file is loaded.The developer can use these methods to import and apply third party libraries in their Lightning web components1.Reference:1: Use Third-Party JavaScript Libraries - Trailhead2

In which two ways can events fired from Lightning web components be handled? 02m 05s

A.
Programmatically adding event listeners
A.
Programmatically adding event listeners
Answers
B.
Adding callbacks to components
B.
Adding callbacks to components
Answers
C.
Listening for all possible events at the document root
C.
Listening for all possible events at the document root
Answers
D.
Attaching handlers to DOM elements
D.
Attaching handlers to DOM elements
Answers
Suggested answer: A, D

Explanation:

Events fired from Lightning web components can be handled in two ways: programmatically adding event listeners or attaching handlers to DOM elements. Programmatically adding event listeners involves using the addEventListener method on the component or a specific element to register a callback function that executes when the event occurs.This method gives the developer more control over the event handling logic, such as adding conditional statements, removing listeners, or using custom events3. Attaching handlers to DOM elements involves using the on directive in the component's HTML template to bind an event handler to a specific element.This method is simpler and more declarative, but it only works for standard DOM events4.Reference:3: Handle Events Programmatically - Trailhead5,4: Handle Events Declaratively - Trailhead6

Total 256 questions
Go to page: of 26