Which two Salesforce B2B Commerce visualforce pages must be enabled at a Salesforce Community level to make the out of the box SEO functionality available? (2 answers)
Answer : A, C
Two Salesforce B2B Commerce Visualforce pages that must be enabled at a Salesforce Community level to make the out of the box SEO functionality available are:
CCSizeIndex: This page generates a sitemap.xml file, which is a file that lists all the pages and resources on a site that can be crawled by web crawlers. The page uses the configuration settings CO.SiteMapIncludeProducts and CO.SiteMapIncludeCategories to specify which products and categories should be included in the sitemap.
Which two scoped modules should a developer import in Lightning web components to check user permissions?
Answer : A, B
To check user permissions in Lightning web components, a developer should import two scoped modules: @salesforce/permission and @salesforce/customPermission. The @salesforce/permission module allows the developer to check if the user has access to a standard permission, such as View Setup or Modify All Data. The @salesforce/customPermission module allows the developer to check if the user has access to a custom permission, such as Enable Debug Mode or Manage Orders. The other modules do not exist or are not related to user permissions. Salesforce Reference: Lightning Web Components Developer Guide: Check User Permissions, Lightning Web Components Developer Guide: Import Salesforce Modules
Which two practices are allowed when it comes to naming a Lightning Web Components folder and associated files?
Answer : A, C
When naming a Lightning Web Components folder and associated files, Salesforce best practices allow the name to begin with a lowercase letter and to use a single hyphen (dash) for compound names. Whitespace and underscores are not recommended in the naming convention. This is in line with web standards for custom elements. More details can be found in the Salesforce LWC documentation on naming conventions: Salesforce LWC Naming Conventions.
Which two methods should a developer implement in a Lightning web component to successfully handle the subscription lifecycle of a Message Channel?
Answer : A, D
To handle the subscription lifecycle of a message channel in a Lightning web component, the developer should implement thesubscribe()andunsubscribe()methods from thelightning/messageServicemodule. Thesubscribe()method returns a subscription object that represents the connection to the message channel. The developer can use this object to unsubscribe from the message channel later. Theunsubscribe()method takes a subscription object as a parameter and removes the listener from the message channel. The developer should call theunsubscribe()method when the component is disconnected from the DOM, such as in thedisconnectedCallback()lifecycle hook, to avoid memory leaks and performance issues.
The other options are not correct because:
B) stopListener() is not a valid method for handling the subscription lifecycle of a message channel. There is no such method in thelightning/messageServicemodule or the Lightning web component framework.
C) startListener() is not a valid method for handling the subscription lifecycle of a message channel. There is no such method in thelightning/messageServicemodule or the Lightning web component framework.
What happens to all previous tax entries during tax implementation?
Answer : C
In general best practices for tax implementation in systems like Salesforce B2B Commerce, previous tax entries are usually preserved or saved before any recalculation is performed. This ensures that there is a record of the original tax calculations before any modifications, which can be crucial for auditing, historical data integrity, and in case the new tax calculation needs to be rolled back for any reason.
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?
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?
Answer : A, C, D
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.Reference:
Integrate with External Services
[Store Administration]