A developer is writing custom code to compare External Prices and Sales Prices for cart items. What should be returned if the External Prices are the same as Sales Prices for Products in the Cart? ~.
Correct Answer: A
Similar to question 198, when custom code compares external prices with sales prices for cart items and finds them to be the same, the appropriate return value should indicate a successful comparison (such as sfdc_checkout.IntegrationStatus.Status.SUCCESS). This signifies that the external prices are aligned with the sales prices, and there are no conflicts.
Question 37
How should data for Lightning web components be provided?
Correct Answer: D
Data for Lightning web components should be provided as independent properties that take simpler, primitive values (e.g. String, Number, Boolean, Array). Providing data as independent properties allows the developer to expose data as public or private properties of the Lightning web component and communicate data between components or services. Providing data as simpler, primitive values allows the developer to use data types that are supported by JavaScript and Lightning web components and avoid unnecessary or complex conversions or transformations. Providing data as a few properties that contain sets (objects) of data is not a good way to provide data for Lightning web components, as it can create confusion or inconsistency in data structure and access. Providing data as one property that contains all data in one set (object) is not a good way either, as it can create complexity or inefficiency in data management and manipulation. Providing data as a single property object that contains sets (objects) of data is not a good way either, as it can create redundancy or duplication in data storage and retrieval. Salesforce Lightning Web Components Developer Guide: Communicate with Properties, Lightning Web Components Developer Guide: Data Types
Question 38
Which three actions are applicable when modifying the number of steps required in the Salesforce Commerce Checkout flow? (3 answers)
Correct Answer: A,C,E
Three actions that are applicable when modifying the number of steps required in the Salesforce Commerce Checkout flow are: Perform a template override on the Checkout page. This action will allow you to change the structure and content of the Checkout page, such as adding or removing sections, widgets, or fields. For example, you can override the checkout.handlebars template and modify it according to your requirements. Set the value of the configuration setting defined as CO.overrideFlow to TRUE. This setting will enable you to use your own custom checkout flow instead of the default one. You need to set this value to true before you can modify the checkout flow. Set the value of the configuration setting defined as CO.useDef to TRUE. This setting will enable you to use a single-page checkout flow instead of a multi-step checkout flow. You need to set this value to true if you want to reduce the number of steps in the checkout flow to one. Salesforce B2B Commerce and D2C Commerce Developer Guide,Checkout Flow
Question 39
Which category can receive signaling from a Lightning Message Channel?
Correct Answer: C
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 [Lightning Web Components Developer Guide: Communicate Across Salesforce UI Technologies], [Lightning Web Components Developer Guide: Communicate with Events]
Question 40
A developer needs to make a call to a long running web service which is critical to finalizing their checkout process. Which three items should the developer consider in their implementation?
Correct Answer: A,B,C
A developer needs to make a call to a long running web service which is critical to finalizing their checkout process. The developer should consider the following items in their implementation: A new CORS entry may need to be created in Setup. CORS stands for Cross-Origin Resource Sharing, which is a mechanism that allows web browsers to make requests to servers on different domains. If the web service is hosted on a different domain than the B2B Commerce site, the developer may need to add a CORS entry in Setup to allow the browser to access the web service.This entry specifies the origin, path, and method of the request, as well as any headers or cookies that are allowed1. A new Named Credential may need to be created in Setup. A Named Credential is a type of metadata that stores the URL and authentication settings of a web service. By using a Named Credential, the developer can avoid hardcoding the web service URL and credentials in their code, and instead reference the Named Credential by name.This makes the code more secure and easier to maintain2. An Apex method returning a Continuation will need to be created. A Continuation is a special type of Apex object that allows the developer to make asynchronous calls to long running web services. By using a Continuation, the developer can avoid blocking the main thread and improve the user experience.A Continuation method must return a Continuation object, specify the web service URL and parameters, and register a callback method that handles the response3. Option D and Option E are incorrect because they are not relevant to the scenario. Option D suggests that the developer should broker the requests to the web service, which means to use an intermediary service that manages the requests and responses. This may be useful for some scenarios, but it is not required for making a call to a long running web service. Option E suggests that the developer should create a new Remote Site in Setup, which is a way to whitelist the domains that can be accessed from Apex code.However, this is not necessary if the developer uses a Named Credential, which automatically handles the Remote Site setting2.Reference: Set Up CORS Named Credentials Continuation Class