Get Started with Revenue Management Developer Resources
Revenue Management Settings
Salesforce Payments Objects in Billing
TaxEngineAdapter Example Implementation
Tax Mappings for Invoices and Credits
Previous Versions
Refer to the example implementation of the TaxEngineAdapter interface to accept information from a tax engine and evaluate the information to define tax details.
See commercetax namespace to view the list of available classes.
The TaxEngineAdapter interface accepts information from the tax engine through the TaxEngineContext class. The interface evaluates the information to define tax in the response with details, such as tax amount and addresses. The response is used to update and create entities in the Salesforce org.
From Winter ’26, the available state and country values from orgs that are configured with State and Country/Territory Picklists are also supported.
Use these steps to build a sample tax adapter implementation. Each tax adapter implementation varies based on your implementation requirements. Customize this example to suit your business requirements.
See Tax Engine Reference Gateway Adapter for reference implementations of a tax engine adapter.
Get the tax rates from the created custom object. See TaxEngineAdapter Interface.
The custom adapter class implements the TaxEngineAdapter interface. The processRequest method takes an instance of TaxEngineContext class and returns a response with the calculated tax details through the TaxDetailsResponse class or an error response through the ErrorResponse class.
Select StandardTaxAdapter as the provider when you create a tax engine record in your org.