ExamGecko
Home Home / Salesforce / Certified B2B Commerce Administrator

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

Question list
Search
Search

List of questions

Search

Which two guidelines should a developer consider when migrating aura components to LWC? 07m 01s

A.
Migrate one component and then determine whether additional effort would make sense
A.
Migrate one component and then determine whether additional effort would make sense
Answers
B.
Start with migrating trees of components (components within components)
B.
Start with migrating trees of components (components within components)
Answers
C.
Force all developers to write any new components using Lightning web components
C.
Force all developers to write any new components using Lightning web components
Answers
D.
Start with simple components that only render UI
D.
Start with simple components that only render UI
Answers
Suggested answer: A, D

Explanation:

When migrating aura components to LWC, the developer should consider the following guidelines:

Migrate one component and then determine whether additional effort would make sense. This way, the developer can evaluate the benefits and challenges of migration, and decide whether to continue or postpone the process. The developer can also use the Lightning Web Components Migration Assistant tool to automate some of the migration steps.

Start with simple components that only render UI. These components are easier to migrate because they have less logic and dependencies. The developer can use the base Lightning web components as a starting point, and then customize them as needed. The developer can also use the Lightning Web Components Playground to test and debug the migrated components.Reference:

Migrate Aura Components to Lightning Web Components

B2B Commerce Aura to LWR Migration Guide

What are two considerations to keep in mind when including additional JavaScript files in a Lightning web component?

A.
Each additional file needs a corresponding .js-meta.xml file.
A.
Each additional file needs a corresponding .js-meta.xml file.
Answers
B.
The files must be ES6 modules and must have names that are unique within the component's folder.
B.
The files must be ES6 modules and must have names that are unique within the component's folder.
Answers
C.
A module can export named functions or variables
C.
A module can export named functions or variables
Answers
D.
Additional JavaScript files should be minified before deployment
D.
Additional JavaScript files should be minified before deployment
Answers
Suggested answer: B, C

Explanation:

When including additional JavaScript files in a Lightning web component, the developer should keep in mind the following considerations:

The files must be ES6 modules and must have names that are unique within the component's folder. This is because the files are imported by their relative path, and the file name becomes the module name. The files must also use the export and import keywords to expose or consume functionality from other modules.

A module can export named functions or variables that can be imported by other modules. The developer can use the export keyword to specify what to expose from a module, and the import keyword to specify what to consume from another module. The developer can also use the default keyword to export or import a single value from a module.Reference:

Import JavaScript Files into Lightning Web Components

JavaScript Modules

Which wire adapter should a developer use to retrieve metadata about a specific object? 06m 555

A.
getObjectMetadata
A.
getObjectMetadata
Answers
B.
getObjectinfo
B.
getObjectinfo
Answers
C.
getObject
C.
getObject
Answers
D.
getObjectDescribe
D.
getObjectDescribe
Answers
Suggested answer: A

Explanation:

To retrieve metadata about a specific object, the developer should use the getObjectMetadata wire adapter. This adapter returns an object that contains metadata describing the fields, child relationships, record type, and theme info of an object. The developer can use this adapter to access information about an object's schema and layout without making an Apex call.Reference:

getObjectMetadata

Work with Salesforce Data

A developer is building a custom component in Lightning web components (LWC) that needs to fetch data from an API.

Which lifecycle hook should the developer use to make the API call?

A.
connectedCallback
A.
connectedCallback
Answers
B.
renderedCallback
B.
renderedCallback
Answers
C.
errorCallback
C.
errorCallback
Answers
D.
disconnectedCallback
D.
disconnectedCallback
Answers
Suggested answer: A

Explanation:

The connectedCallback lifecycle hook is invoked when a Lightning web component is inserted into the DOM. This is the best time to make an API call, as the component is ready to render data from the server.The other lifecycle hooks are not suitable for making API calls, as they either occur after the component is rendered (renderedCallback), when an error occurs (errorCallback), or when the component is removed from the DOM (disconnectedCallback)1.Reference:1: Call Apex Methods - Trailhead2

A developer is creating a component to implement a custom Terms and Conditions checkbox at checkout in the Aura Commerce template.

Which method should the developer implement on the Lightning web component to ensure the user accepts the terms and conditions?

A.
ComponentValidity
A.
ComponentValidity
Answers
B.
Validate
B.
Validate
Answers
C.
SaveCheckout
C.
SaveCheckout
Answers
D.
CheckValidity
D.
CheckValidity
Answers
Suggested answer: D

Explanation:

The CheckValidity method is a standard method that Lightning web components can implement to validate user input. It returns true if the input is valid, and false otherwise. The developer can use this method to check if the user has checked the Terms and Conditions checkbox, and prevent them from proceeding to checkout if they have not.The other methods are not standard methods for Lightning web components, and would have to be custom defined by the developer3.Reference:3: Validate User Input - Trailhead4

Northern Trail Outfitters (NTO) has a B2B Commerce store for its resellers. It has received many customer service calls involving questions about the delivery date of customer orders.

How should a developer expose delivery time estimates to NTO's customers in the storefront to reduce call volume?

A.
Add the Expected Delivery Date field to the order confirmation email.
A.
Add the Expected Delivery Date field to the order confirmation email.
Answers
B.
Add a Desired Delivery Date input field during the checkout flow.
B.
Add a Desired Delivery Date input field during the checkout flow.
Answers
C.
Display the Expected Delivery Date on the order page with a Lightning web component.
C.
Display the Expected Delivery Date on the order page with a Lightning web component.
Answers
D.
Configure an email alert to the customer when the Expected Delivery Date changes.
D.
Configure an email alert to the customer when the Expected Delivery Date changes.
Answers
Suggested answer: C

Explanation:

A developer can expose delivery time estimates to NTO's customers in the storefront by displaying the Expected Delivery Date on the order page with a Lightning web component. This way, the customers can see the delivery date of their orders in real time, without having to wait for an email confirmation or contact customer service.A Lightning web component is a custom HTML element that can render dynamic data from Salesforce B2B Commerce using Apex and JavaScript1.The developer can use the ccrz.cc_api_DeliveryDate.getDeliveryDates method to get the expected delivery date for an order, based on various factors such as inventory availability, shipping method, and requested delivery date2.The developer can then display the expected delivery date on the order page using a Lightning web component template and style3.Reference:1: Build Lightning Web Components - Trailhead,2: Set Up the Requested Delivery Date Picker on the Checkout Page - Salesforce,3: Create and Use Lightning Web Components in B2B Commerce - Trailhead

Which template will correctly display the details message only when areDetailsVisible becomes true given the following code in a Lightning Web Component?

A)

B)

C)

D)

A.
Option A
A.
Option A
Answers
B.
Option B
B.
Option B
Answers
C.
Option C
C.
Option C
Answers
D.
Option D
D.
Option D
Answers
Suggested answer: B

Explanation:

Option B is the correct template to display the details message only when areDetailsVisible becomes true. This is because Option B uses the if:true directive on a nested <template> tag that encloses the conditional content.The if:true directive binds data to the template and removes and inserts DOM elements based on whether the data is a truthy or falsy value1.Option A, C, and D are incorrect because they do not use the if:true directive on a nested <template> tag, and therefore will not render the content conditionally.Reference:1: Render HTML Conditionally - Trailhead2

What are two advantages of using Lightning Data Service? 05m 47s

A.
Communicates with other components
A.
Communicates with other components
Answers
B.
Converts between different data formats
B.
Converts between different data formats
Answers
C.
Combines and de-duplicates server calls
C.
Combines and de-duplicates server calls
Answers
D.
Loads record data progressively
D.
Loads record data progressively
Answers
Suggested answer: C, D

Explanation:

Lightning Data Service is a standard controller that provides a declarative way to access and modify Salesforce data in Lightning web components. It has the following advantages:

It combines and de-duplicates server calls to optimize performance and reduce network traffic. It caches data on the client side and shares it across components, so that multiple components can use the same data without making redundant requests to the server.

It loads record data progressively, meaning that it displays the cached data first and then updates it with the latest data from the server. This way, it improves the user experience by reducing the perceived loading time and avoiding flickering of data on the screen.Reference:

Lightning Data Service Basics

Work with Salesforce Data

What is likely to happen if a developer leaves debug mode turned on in an environment? 05m 43s

A.
The performance of the org will become slower each day
A.
The performance of the org will become slower each day
Answers
B.
The user will begin getting JavaScript limit exceptions
B.
The user will begin getting JavaScript limit exceptions
Answers
C.
The org will turn off debug mode after 72 hours
C.
The org will turn off debug mode after 72 hours
Answers
D.
A banner will be displayed to the user indicating that the org is in debug mode
D.
A banner will be displayed to the user indicating that the org is in debug mode
Answers
Suggested answer: B

Explanation:

Debug mode is a feature that allows developers to debug their Lightning web components by providing more detailed information about errors and warnings in the browser console. However, if a developer leaves debug mode turned on in an environment, it can have a negative impact on the performance and functionality of the org. One of the possible consequences is that the user will begin getting JavaScript limit exceptions, which are errors that occur when a component exceeds the maximum amount of JavaScript resources allowed by Salesforce. Debug mode increases the size of the JavaScript code and makes it more likely to hit these limits, especially in complex or large applications.Reference:

Debug Your Code

JavaScript Limits

Which three actions must a developer take, in a B2B Commerce store, to accept credit card payments using a client's chosen payment provider?

A.
Create a named credential for authentication with the payment provider.
A.
Create a named credential for authentication with the payment provider.
Answers
B.
Create a RegisteredExternalService record for the custom payment provider class.
B.
Create a RegisteredExternalService record for the custom payment provider class.
Answers
C.
Create an Apex class that implements the sfdc_checkout.PaymentGatewayAdapter.
C.
Create an Apex class that implements the sfdc_checkout.PaymentGatewayAdapter.
Answers
D.
Create a PaymentProviderGateway record for the custom payment provider class.
D.
Create a PaymentProviderGateway record for the custom payment provider class.
Answers
E.
Create an Apex class that implements the commercepayments.PaymentGatewayAdapter.
E.
Create an Apex class that implements the commercepayments.PaymentGatewayAdapter.
Answers
Suggested answer: A, C, E

Explanation:

To accept credit card payments using a client's chosen payment provider, a developer must take the following three actions in a B2B Commerce store:

Create a named credential for authentication with the payment provider. A named credential is a Salesforce feature that defines the URL of a callout endpoint and its required authentication parameters.By creating a named credential for the payment provider, the developer can securely store the credentials and use them in Apex code without hardcoding them1.

Create an Apex class that implements the commercepayments.PaymentGatewayAdapter interface. This interface defines the methods that a custom payment provider class must implement to process credit card payments in B2B Commerce.The developer must implement the methods such as authorize, capture, refund, and void to handle the payment transactions with the payment provider's API2.

Create a PaymentProviderGateway record for the custom payment provider class. This record is a custom metadata type that defines the properties of the payment provider, such as its name, label, description, and Apex class name.By creating this record, the developer can register the custom payment provider class with B2B Commerce and make it available for selection in the Payment Gateway Settings page3.Reference:1: Named Credentials - Trailhead4,2: Implementing Custom Payment Providers - Salesforce Developers Blog5,3: Integrate Payments into a B2B Commerce Store with Ease - Salesforce Developers Blog6

Total 256 questions
Go to page: of 26