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.