Cert++
Close

Tax calculation reference implementation

Key Takeaway

With the Cart Calculate API on, the default orchestrator runs the tax calculator only when the delivery group changes or a delivery method is selected. Showing estimated tax in the cart takes a custom orchestrator and a custom tax calculator.

A tax calculation reference implementation is sample Apex code that shows how to plug custom or third-party tax logic into B2B Commerce cart and checkout. For LWR stores, the recommended approach is a Commerce extension that extends CartExtension.TaxCartCalculator and runs inside the Cart Calculate API (CCA). The older checkout integrations framework still works, but a store can use extensions or integrations, not both.

Tax calculation services

A tax calculation service decides how much tax buyers pay based on their location. A B2B store can use the Salesforce Tax Solution or a third-party tax service.

For a third-party service, Salesforce recommends an AppExchange package. To build your own, start from the reference examples on GitHub. They include extension provider examples and reference implementations for B2B and D2C Commerce.

The manual Salesforce tax solution is the built-in declarative option, and it fits a simple gross tax situation. The solution supports only gross taxation. It uses tax rates, tax treatments and a tax policy for each store.

Salesforce Accredited B2B Commerce Developer Professional Study Guide

Checklist progress

0/124Learned

Code implementations against the 4 crucial reference implementations used in checkout and payment interfaces with in-depth knowledge of all supported actions

0/23

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Salesforce Accredited B2B Commerce Developer Professional studiers. 757 members and growing.