You are here:
Multiple Tax Levels in B2C Commerce
In many jurisdictions, more than one tax applies to a product or shipping charge, such as federal, state, and district taxes. B2C Commerce can track each tax individually while retaining the item's aggregated tax amount.
Your tax-provider integration can use a basket calculation hook to retrieve the taxes that
apply to each line item. The integration then uses the LineItem.setTaxes()
and LineItem.getTaxes() Script API methods to store the taxes on the
applicable basket line items.
A line item can have up to 10 tax items. Each tax item has these properties.
| Property | Description |
|---|---|
| Tax ID | A tax-provider-defined identifier for the tax, such as federal, state, or district. |
| Tax rate |
The tax rate expressed as a decimal value. For example, a 5% tax
rate is stored as 0.05.
|
| Tax value | The tax amount in the basket's currency. |
B2C Commerce sums the individual tax values and stores the result in the line item's aggregated tax field. Basket, shipment, and order tax totals continue to use the aggregated value.
When B2C Commerce sends an order to Salesforce Order Management, the integration transfers the individual tax items from each B2C Commerce line item to the corresponding line item in Salesforce Order Management. You don't need custom tax fields or mapping codes to transfer this information.
To enable the Multilevel Tax feature, see Set Feature Switches (Toggles) in B2C Commerce. After enabling the feature, configure your cartridge and basket calculation hook to retrieve the taxes from your tax provider and set them on each applicable line item. For more details, see Shopper Baskets.
To add custom attributes to tax items, see Create Custom Preferences for B2C Commerce. To process orders that contain individual tax items, use the existing order import and export. See Order Object Import and Export in B2C Commerce.
- View Tax Items in B2C Commerce
After a shopper places an order, you can review the tax breakdown in Business Manager.
