Loading
Prepare for Email to Become the Default Login ExperienceRead More
Get Started with B2C Commerce
Multiple Tax Levels in B2C Commerce

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.

Tax Item 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.

Note
Note Use either individual tax items or the existing aggregated-tax approach for a line item. You can't use both approaches for the same line item. Setting taxes with an existing single-tax Script API method removes the individual tax items previously set on that line item.
Multiple Tax Levels
Multiple Tax Levels

A basket contains a product priced at $100. The product is subject to a 10% federal tax and a 5% state tax. Its line item contains a $10 federal tax item and a $5 state tax item. B2C Commerce stores $15 as the line item's aggregated tax value.

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.

 
Loading
Salesforce Help | Article