ExamGecko
Ask Question

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

List of questions

Question 11

Report
Export
Collapse

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?

connectedCallback
connectedCallback
renderedCallback
renderedCallback
errorCallback
errorCallback
disconnectedCallback
disconnectedCallback
Suggested answer: A

Explanation:

To make an API call in a Lightning web component (LWC), a developer should use the connectedCallback lifecycle hook. The connectedCallback lifecycle hook is invoked when the component is inserted into the DOM. This is the ideal time to make an API call, as the component is ready to receive and display data. The developer can use the fetch API or a third-party library, such as axios, to make the API call and handle the response. The renderedCallback lifecycle hook is not a good choice for making an API call, as it is invoked every time the component is rendered or rerendered. This can cause unnecessary or repeated API calls and affect performance. The errorCallback lifecycle hook is not a good choice either, as it is invoked when an error occurs in the component or in one of its children. This is not related to making an API call, but rather to handling errors. The disconnectedCallback lifecycle hook is not a good choice either, as it is invoked when the component is removed from the DOM. This is not a suitable time to make an API call, as the component is no longer visible or active. Salesforce

Reference:Lightning Web Components Developer Guide: Lifecycle Hooks,Lightning Web Components Developer Guide: Call an Apex Method Imperatively

asked 23/09/2024
John Hart
47 questions

Question 12

Report
Export
Collapse

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?

ComponentValidity
ComponentValidity
Validate
Validate
SaveCheckout
SaveCheckout
CheckValidity
CheckValidity
Suggested answer: B

Explanation:

To implement a custom Terms and Conditions checkbox at checkout in the Aura Commerce template, a developer should add a Desired Delivery Date input field during the checkout flow. The Desired Delivery Date input field allows the customer to enter a date when they want their order to be delivered. The developer can use the @api decorator to expose this field as a public property of the Lightning web component and bind it to the ccCheckoutOrder object. The developer can also use the @wire decorator to get the current cart object and use its properties, such as shipping address and shipping method, to calculate and display an estimated delivery date based on the desired delivery date. The developer can also add validation logic to ensure that the desired delivery date is valid and acceptable. Adding the Expected Delivery Date field to the order confirmation email is not a good solution, as it does not allow the customer to choose or see their delivery date before placing their order. Displaying the Expected Delivery Date on the order page with a Lightning web component is not a good solution either, as it does not allow the customer to enter or change their delivery date after placing their order. Configuring an email alert to the customer when the Expected Delivery Date changes is not a good solution either, as it does not provide a consistent or reliable way of informing the customer about their delivery date. Salesforce

Reference:B2B Commerce Developer Guide: Checkout Flow,B2B Commerce Developer Guide: Checkout Order Object,Lightning Web Components Developer Guide: Communicate with Properties

asked 23/09/2024
JEROME SANANES
40 questions

Question 13

Report
Export
Collapse

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?

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

Explanation:

To expose delivery time estimates to NTO's customers in the storefront, a developer should display the Expected Delivery Date on the order page with a Lightning web component. The Expected Delivery Date is a custom field on the Order object that stores the date when the order is expected to be delivered to the customer. The developer can use the @wire decorator to get the current order object and use its properties, such as order number, status, total amount, and expected delivery date, to display them on the order page. The developer can also use Apex methods or third-party APIs to calculate and update the expected delivery date based on various factors, such as inventory availability, shipping method, shipping address, and carrier service level. Displaying the expected delivery date on the order page allows the customer to see their delivery time estimate at any time and reduce their need to call customer service. Adding the Expected Delivery Date field to the order confirmation email is not a good solution, as it does not allow the customer to see their delivery time estimate if they lose or delete their email. Adding a Desired Delivery Date input field during the checkout flow is not a good solution either, as it does not guarantee that the customer's desired delivery date will be met or reflect any changes in delivery time due to unforeseen circumstances. Configuring an email alert to the customer when the Expected Delivery Date changes is not a good solution either, as it can create confusion or frustration for the customer if they receive multiple or conflicting emails about their delivery date. Salesforce

Reference:B2B Commerce Developer Guide: Order Object, [B2B Commerce Developer Guide: Order Page], [Lightning Web Components Developer Guide: Call an Apex Method Imperatively]

asked 23/09/2024
Brett Tin
37 questions

Question 14

Report
Export
Collapse

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

Salesforce Certified B2B Commerce Developer image Question 14 59491 09232024001811000000

A)

Salesforce Certified B2B Commerce Developer image Question 14 59491 09232024001811000000

B)

Salesforce Certified B2B Commerce Developer image Question 14 59491 09232024001811000000

C)

Salesforce Certified B2B Commerce Developer image Question 14 59491 09232024001811000000

D)

Salesforce Certified B2B Commerce Developer image Question 14 59491 09232024001811000000

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

Explanation:

The template that will correctly display the details message only when areDetailsVisible becomes true given the following code in a Lightning Web Component is option C. Option C uses the if:true directive to conditionally render a template block based on the value of areDetailsVisible. If areDetailsVisible is true, the template block inside the <template if:true={areDetailsVisible}> tag will be rendered. Otherwise, it will be skipped. Option A is incorrect because it uses the if:false directive, which does the opposite of if:true. It renders the template block only when areDetailsVisible is false. Option B is incorrect because it uses an invalid syntax for the if directive. The if directive requires a colon (:) after the if keyword, not an equal sign (=). Option D is incorrect because it uses an invalid syntax for the template tag. The template tag requires a closing tag (</template>), not a self-closing tag (<template/>). Salesforce

Reference:Lightning Web Components Developer Guide: Conditional Rendering,Lightning Web Components Developer Guide: Template Syntax

asked 23/09/2024
Thomas Kincer
39 questions

Question 15

Report
Export
Collapse

What are two advantages of using Lightning Data Service?

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

Explanation:

Two advantages of using Lightning Data Service are that it combines and de-duplicates server calls and that it loads record data progressively. Lightning Data Service is a service that provides access to Salesforce data and metadata in Lightning web components. It optimizes performance and minimizes server round trips by caching data on the client side and sharing data across components. It also combines and de-duplicates server calls by batching requests for the same record or object and returning a single response. It also loads record data progressively by returning available cached data first and then fetching updated data from the server asynchronously. Communicating with other components and converting between different data formats are not advantages of using Lightning Data Service, as they are not related to its functionality or features. Salesforce

Reference:Lightning Web Components Developer Guide: Lightning Data Service,Lightning Web Components Developer Guide: Work with Salesforce Data

asked 23/09/2024
Oliver Lüthi
40 questions

Question 16

Report
Export
Collapse

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

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

Explanation:

If a developer leaves debug mode turned on in an environment, the user will begin getting JavaScript limit exceptions. Debug mode is a setting that enables more detailed logging and error reporting for Lightning web components. However, it also increases the size and complexity of the JavaScript code that is delivered to the browser, which can cause performance issues and JavaScript limit exceptions. The JavaScript limit exceptions are errors that occur when the browser reaches its maximum capacity for executing JavaScript code, such as memory heap size or script execution time. The performance of the org will not become slower each day, as debug mode only affects the client-side performance, not the server-side performance. The org will not turn off debug mode after 72 hours, as debug mode is a persistent setting that can only be changed manually by an administrator. A banner will not be displayed to the user indicating that the org is in debug mode, as debug mode is a transparent setting that does not affect the user interface. Salesforce

Reference: Lightning Web Components Developer Guide: Debug Your Code, Lightning Web Components Developer Guide: JavaScript Limit Exceptions

asked 23/09/2024
Karthik Krishnamoorthy
25 questions

Question 17

Report
Export
Collapse

A developer has created a custom Lightning web component to display on the Product Detail page in the store. When the developer goes to add the component to the page in Experience Builder, it is missing from the list of custom components.

Which XML fragment should the developer include in the component's configuration XML file to ensure the custom component is available to add to the page?

A)

Salesforce Certified B2B Commerce Developer image Question 17 59494 09232024001811000000

B)

Salesforce Certified B2B Commerce Developer image Question 17 59494 09232024001811000000

C)

Salesforce Certified B2B Commerce Developer image Question 17 59494 09232024001811000000

D)

Salesforce Certified B2B Commerce Developer image Question 17 59494 09232024001811000000

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

Explanation:

The XML fragment that the developer should include in the component's configuration XML file to ensure the custom component is available to add to the page is option B. Option B uses the <targets> tag to specify where the component can be used in an app. The <targets> tag contains a list of <target> tags, each of which defines a valid target for the component. The value of the <target> tag for the Product Detail page in the store is lightningCommunity__RecordPage, which means that the component can be used on any record page in a Lightning community. Option A is incorrect because it uses an invalid value for the <target> tag. There is no such target as lightningCommunity__ProductDetailPage. Option C is incorrect because it uses an invalid syntax for the <targets> tag. The <targets> tag should not have any attributes, such as isAvailable. Option D is incorrect because it uses an invalid syntax for the <target> tag. The <target> tag should not be self-closing, but rather have a closing tag (</target>). Salesforce

Reference:Lightning Web Components Developer Guide: Configure Components for Lightning Communities,Lightning Web Components Developer Guide: Configure Components for Different Pages and Apps

asked 23/09/2024
Renante Elpa
23 questions

Question 18

Report
Export
Collapse

Which two statements are accurate about the Cart Item with a Type of Charge?

It is created with the Cart Delivery Group Method after the shipping integration
It is created with the Cart Delivery Group Method after the shipping integration
It is created with the Cart Delivery Group Method after the freight integration
It is created with the Cart Delivery Group Method after the freight integration
It is linked directly to a Cart Id
It is linked directly to a Cart Id
It is linked directly to a Catalog Id
It is linked directly to a Catalog Id
Suggested answer: C, D

Explanation:

Two statements that are accurate about the Cart Item with a Type of Charge are that it is linked directly to a Cart Id and that it is linked directly to a Catalog Id. A Cart Item with a Type of Charge is a special type of Cart Item that represents an additional charge or fee that is applied to a Cart, such as shipping, handling, or tax. A Cart Item with a Type of Charge is linked directly to a Cart Id, which means that it belongs to a specific Cart and can be retrieved or updated along with other Cart Items. A Cart Item with a Type of Charge is also linked directly to a Catalog Id, which means that it references a specific Catalog that contains the products and prices for the store. A Cart Item with a Type of Charge is not created with the Cart Delivery Group Method after the shipping integration or after the freight integration, as these are not related to the creation of Cart Items. The Cart Delivery Group Method is a method that determines how products are grouped into delivery groups based on their shipping methods and addresses. The shipping integration and the freight integration are integrations that calculate and apply shipping costs and freight charges to a Cart or an Order. Salesforce

Reference:B2B Commerce Developer Guide: Cart Item Object, B2B Commerce Developer Guide: Shipping Integration, B2B Commerce Developer Guide: Freight Integration

asked 23/09/2024
Ammar Ahmed
33 questions

Question 19

Report
Export
Collapse

When a developer configures a tax integration for a store, what happens to the previously calculated tax entries during the checkout flow?

Ignored during recalculation
Ignored during recalculation
Saved prior to recalculation
Saved prior to recalculation
Deleted from the Cart
Deleted from the Cart
Modified with the new tax calculation
Modified with the new tax calculation
Suggested answer: C

Explanation:

When a developer configures a tax integration for a store, the previously calculated tax entries during the checkout flow are deleted from the Cart. A tax integration is an integration that calculates and applies tax rates and amounts to a Cart or an Order based on various factors, such as product type, price, quantity, location, and tax rules. A tax integration can use either an external tax service provider or custom Apex code to perform the tax calculation. When a developer configures a tax integration for a store, any existing tax entries in the Cart are deleted before calling the tax integration service or method. This ensures that the tax calculation is accurate and up-to-date based on the current state of the Cart and avoids any conflicts or inconsistencies with previous tax entries. The previously calculated tax entries are not ignored during recalculation, saved prior to recalculation, or modified with the new tax calculation, as these are not valid actions for handling existing tax entries. Salesforce

Reference: B2B Commerce Developer Guide: Tax Integration, B2B Commerce Developer Guide: Tax Calculation Flow

asked 23/09/2024
Renata Maria DA SILVA
46 questions

Question 20

Report
Export
Collapse

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

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

Explanation:

Three actions that a developer must take, in a B2B Commerce store, to accept credit card payments using a client's chosen payment provider are: create a named credential for authentication with the payment provider, create an Apex class that implements the sfdc_checkout.PaymentGatewayAdapter interface, and create a PaymentProviderGateway record for the custom payment provider class. Creating a named credential for authentication with the payment provider allows the developer to securely store and manage authentication information, such as username, password, token, or certificate, for connecting to the payment provider's API or service. Creating an Apex class that implements the sfdc_checkout.PaymentGatewayAdapter interface allows the developer to define custom logic for processing credit card payments using the payment provider's API or service. The interface provides methods for validating credit card information, authorizing payments, capturing payments, voiding payments, and refunding payments. Creating a PaymentProviderGateway record for the custom payment provider class allows the developer to register the custom payment provider class as a payment gateway in the store and associate it with a payment method. Creating a RegisteredExternalService record for the custom payment provider class is not a required action, as this is only used for registering external services that are not related to payment processing, such as tax or shipping services. Creating an Apex class that implements the commercepayments.PaymentGatewayAdapter interface is not a required action either, as this is only used for D2C Commerce stores, not B2B Commerce stores. Salesforce

Reference: B2B Commerce Developer Guide: Payment Integration, B2B Commerce Developer Guide: Payment Gateway Adapter Interface, B2B Commerce Developer Guide: Payment Provider Gateway Object

asked 23/09/2024
Lin Sun
38 questions
Total 221 questions
Go to page: of 23
Search

Related questions