Salesforce B2B Commerce Developer B2B Commerce for Developers Accredited Professional Exam Practice Test

Page: 1 / 14
Total 221 questions
Question 1

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.


Question 2

Which three files comprise the essential pieces of a Lightning Web Component that is named myComponent?



Answer : A, C, E

A Lightning Web Component (LWC) consists of a minimum of three core files: the template file (.html), the JavaScript file (.js), and the metadata configuration file (.js-meta.xml). These files are essential for defining the structure, functionality, and configuration of the component. For more information, review the Salesforce LWC documentation: Salesforce LWC Documentation.


Question 3

Ursa Major is planning to implement Salesforce B2B Commerce, and a developer needs to configure taxes for their storefront. The company operates in multiple states, each with different tax rates and tax rules.

What are two ways the developer should configure taxes in B2B Commerce?



Answer : A, B

Two ways that a developer should configure taxes in B2B Commerce for Ursa Major are: configure a tax engine using third-party software and configure tax rates and rules for each state in Salesforce B2B Commerce. Configuring a tax engine using third-party software allows the developer to integrate with an external tax service provider that can calculate and apply accurate and up-to-date tax rates and rules for different states and jurisdictions. The developer can use the sfdc_checkout.TaxCalculations interface or the RegisteredExternalService object to connect to the third-party tax service provider's API or service. Configuring tax rates and rules for each state in Salesforce B2B Commerce allows the developer to implement their own custom tax calculation logic using Apex code. The developer can use custom objects, such as TaxRate__c and TaxRule__c, to store and manage tax rates and rules for different states and products. The developer can also use the sfdc_checkout.TaxCalculations interface to define how to retrieve and apply tax rates and rules for a cart or an order. Using a different pricebook for each state is not a good way to configure taxes in B2B Commerce, as it can create complexity and inconsistency in pricing and discounting logic. Using the Salesforce out-of-the-box tax calculator is not a good way either, as it does not support complex or dynamic tax scenarios that may vary by state or jurisdiction. Salesforce Reference: [B2B Commerce Developer Guide: Tax Integration], [B2B Commerce Developer Guide: Tax Calculations Interface], [B2B Commerce Developer Guide: TaxRate Object], [B2B Commerce Developer Guide: TaxRule Object]


Question 4

A developer is setting up a storefront from scratch. They need to create a storefront, push store sources, create buyer users, import products, and create and search index.

Which command allows the developer to accomplish this task?



Answer : B

The sfdx commerce:store:quickstart:setup command allows the developer to set up a store from scratch using a definition file that specifies the store configuration. This command performs the following tasks:

Pushes the store sources to the scratch org

Creates a buyer user

Imports products

Creates a search index

Opens the store in a browser

The other options are not correct because:

A) sfdx commerce:store:quickstart:create only creates a community for the store, but does not perform the other tasks required to set up a store from scratch.

C) sfdx commerce:store:create creates and sets up a store, but does not use a definition file to specify the store configuration. Instead, it uses command-line flags to provide the store parameters.

D) sfdx commerce:store:open only opens an existing store in a browser, but does not create or set up a store from scratch.


store Commands

Build a B2B and B2B2C Commerce Store

Question 5
Question 6

Which wire adapter should a developer use to retrieve metadata about a specific picklist?



Answer : C

To retrieve metadata about a specific picklist, a developer should use the getPicklistValues wire adapter. The getPicklistValues wire adapter imports data from the @salesforce/ui-api module and returns an object that contains information such as the picklist's label, value, default value, validity, and controlling field values. The getPicklistMetadataValues wire adapter does not exist. The getPicklistMetadata wire adapter does not exist either. The getPicklist wire adapter does not exist either. Salesforce Reference: [Lightning Web Components Developer Guide: getPicklistValues], [Lightning Web Components Developer Guide: Import User Interface API]


Question 7

What is the fastest route to setting up a B2B Commerce Store as a developer?



Answer : C

The fastest route to setting up a B2B Commerce store as a developer is to use sfdx setup scripts. Sfdx setup scripts are scripts that use Salesforce CLI commands to automate the creation and configuration of a B2B Commerce store. The scripts can perform tasks such as creating scratch orgs, installing packages, importing data, assigning permissions, and deploying code. The scripts can save time and effort for developers who need to set up a B2B Commerce store quickly and easily. Setting up B2B Commerce on Lightning Experience manually is not the fastest route to setting up a B2B Commerce store, as it involves many steps and actions that can be tedious and error-prone. Creating a new store in the Commerce app is not the fastest route either, as it also requires manual configuration and customization of various settings and features. Importing a previously exported store archive is not the fastest route either, as it depends on the availability and quality of the store archive and may not reflect the latest changes or updates. Salesforce Reference: [B2B Commerce Developer Guide: Set Up Your Development Environment], [B2B Commerce Developer Guide: Create Your Store]


Page:    1 / 14   
Total 221 questions