{"title":"Recalculating taxes","slug":"recalculating-taxes","url":"https://support.storeconnect.com/articles/recalculating-taxes","url_markdown":"https://support.storeconnect.com/articles/recalculating-taxes.md","subtitle":null,"summary":"Enable and use the Tax Calculator in Salesforce to calculate taxes on new orders or recalculate after order item changes. Supports POS orders, split-shipped orders, and free-text country names. Previews before-and-after amounts and handles both exclusive and inclusive pricing.","type":"Help_Documentation","video_url":"","keywords":"recalculate tax, tax calculator, calculate tax, order tax, tax recalculation, StoreConnect Setting, custom metadata, Manual Tax Calculation Enabled, inclusive tax, exclusive tax, tax preview, order products, line item tax, Salesforce actions, apply tax, tax before and after, invocable action, POS tax, split shipping tax, fulfillment item tax, shipment address, shipping zone, address mismatch, fallback warning, free-text country","last_modified":"2026-08-21T07:12:35+0000","body_markdown":"You can recalculate taxes on StoreConnect Orders, or calculate taxes on new Orders, all from within Salesforce, using the Tax records you already have configured. Tax recalculation works for all order types — including POS orders where the ship-to address is stored on the Fulfillment Item's Shipment record rather than on the Order itself.\n\n:::note\nRecalculating tax requires Tax records to be already configured. See Configuring Tax for details.\n:::\n\n:::warning\nCalculate tax before you take payment wherever you can. On a tax-exclusive price book, applying tax raises the **Unit Price** on each order item, and with it the order total. If a payment has already been captured against the order, the order will then show an amount still owing equal to the tax that was just applied. Before applying tax to an order that is already paid, decide how you will collect or write off that difference. See [Exclusive vs inclusive tax](#exclusive-vs-inclusive-tax) for how each pricing method behaves.\n:::\n\n## How to enable\n\nRecalculation of taxes is disabled by default. To enable it for your org:\n\n1. Go to **Setup** \u003e **Custom Metadata Types** \u003e **StoreConnect Setting** and click **Manage Records**.\n2. Open **Manual Tax Calculation Enabled**.\n3. Set the **Setting** field to `true` and save.\n\n## Calculating tax on new orders\n\nTo calculate tax on a new order, ensure it has a Shipping Address and Order Products, and click **Calculate Tax** in the StoreConnect Actions sidebar tab.\n\n![The Calculate Tax button](https://res.cloudinary.com/hzkr6fi81/image/upload/v1781677671/documentation-media/calculate-tax/button.png)\n\nClicking **Calculate Tax** will open the Tax Calculator window with a preview of what taxes will be applied.\n\n![The Tax Calculator window](https://res.cloudinary.com/hzkr6fi81/image/upload/v1781677673/documentation-media/calculate-tax/window.png)\n\nYou can expand the product items list to dig deeper and see what taxes will be applied at the line item level.\n\n![The Tax Calculator with product items expanded](https://res.cloudinary.com/hzkr6fi81/image/upload/v1781677674/documentation-media/calculate-tax/expanded.png)\n\nWhen you're ready to proceed, click Yes, and the taxes will be applied to the Order.\n\n![The Order record showing the applied taxes](https://res.cloudinary.com/hzkr6fi81/image/upload/v1781677675/documentation-media/calculate-tax/result.png)\n\n## Recalculating taxes on existing orders\n\nIf taxes have already been applied to an Order, you can recalculate them if you need to, for instance, if the quantity has changed, or items have been added or removed, or if the price has been modified.\n\nThe process for recalculating taxes is much the same, however this time the button will read \"Recalculate Tax\".\n\n![The Recalculate Tax button](https://res.cloudinary.com/hzkr6fi81/image/upload/v1781677676/documentation-media/calculate-tax/recalculate-button.png)\n\nAnd this time the Tax Calculator window will show you the existing applied taxes as well so you can compare and see the changes.\n\n![The Tax Calculator window showing both New and Previous taxes](https://res.cloudinary.com/hzkr6fi81/image/upload/v1781677677/documentation-media/calculate-tax/recalculate-window.png)\n\n## How the ship-to address is resolved\n\nFor ship-based taxes (taxes configured with **Based on Ship Address** enabled), StoreConnect determines the ship-to address for each Order Item in this order:\n\n1. **Fulfillment Item Shipment** — if the Order Item has related Fulfillment Items, each Fulfillment Item's linked Shipment record provides the ship-to address for that portion of the quantity. This is how POS orders are handled, where the Order's own shipping fields may be blank.\n2. **Order shipping fallback** — if a Fulfillment Item's Shipment address does not match any configured tax zone, StoreConnect tries the Order's shipping address for that Fulfillment Item. If the Order's shipping address matches a zone, it is used and a warning appears in the Tax Calculator (see below).\n3. **Order shipping (no Fulfillment Items)** — if the Order Item has no Fulfillment Items at all, the Order's shipping address is used directly (the standard path for web orders).\n\nBilling-based taxes always use the Order's billing address, regardless of fulfillment.\n\n### Country name formats\n\nStoreConnect accepts both ISO country codes and full country names. For example, `AU`, `AUS`, and `Australia` are all valid values for the shipping or billing country field.\n\n### The Order-shipping fallback warning\n\nIf StoreConnect uses the Order's shipping address as a fallback for one or more Fulfillment Items, the Tax Calculator displays a warning:\n\n\u003e *Some shipments couldn't be matched to a tax zone and fell back to the order's shipping address. Verify the fulfillment item shipment data is correct.*\n\nThis warning indicates that the Shipment record on one or more Fulfillment Items either has a blank country or doesn't match any of your configured tax zones. Check that the Shipment record has the correct destination address and that a tax zone is configured for that address.\n\n### The address mismatch error\n\nIf no address can be matched to a configured tax zone, the Tax Calculator displays:\n\n\u003e *The shipping or billing address doesn't match a configured tax zone. Verify the country, state, or postal code on the related Shipment record or on the Order.*\n\nThis applies to both kinds of tax:\n\n- **Ship-based taxes** — no ship-to address (neither the Fulfillment Item's Shipment nor the Order shipping fallback) matches a configured zone.\n- **Billing-based taxes** — the Order's billing address doesn't match a configured zone.\n\nTo resolve it, check that:\n\n- At least one Order Item has a resolvable destination (a Shipment with a matching zone, or an Order shipping address with a matching zone) for ship-based taxes\n- The Order's billing address matches a configured zone for billing-based taxes\n- A tax zone is configured for the destination country (and state/postcode/city if applicable)\n\n## Other errors and warnings\n\nAlongside the fallback warning and address mismatch error above, the Tax Calculator may surface the following.\n\n### Errors\n\nThese prevent tax from being calculated until resolved:\n\n- **No product taxes configured** — *No taxes are configured for the order items. Please add a product tax or tax group.*\n- **Zero-quantity items** — *All order items have a quantity of zero. Tax can only be calculated for items with a quantity greater than zero.*\n- **Pricebook zone mismatch** — *The pricebook's tax zone doesn't match the product's tax zone. Please check the pricebook tax configuration.*\n\n:::note\nIf the Order already has taxes applied (or its tax total is already $0), the **No product taxes configured**, **address mismatch**, and **Pricebook zone mismatch** conditions show a new tax amount of $0 instead of an error. This lets you clear stale taxes — for example, after moving a product to a tax-exempt pricebook — rather than being blocked.\n:::\n\n### Warnings\n\nThese don't block applying tax, but flag data worth verifying first:\n\n- **Previously tax-exempt items** — *Some items may have been previously tax-exempt. The tax shown is based on the current unit price. Please verify the price is correct before applying.*\n- **Quantity mismatch** — shown when the quantity being taxed differs from the quantity ordered. The exact wording depends on whether items are taxed for *less* than ordered (typically because Fulfillment Items don't cover the full quantity, or a shipment is to a destination not authorised by the price book's tax zone), *more* than ordered, or both.\n\nThe Tax Calculator shows only one banner warning at a time. If more than one condition applies, the highest-priority warning is displayed, in this order: previously tax-exempt items, then quantity mismatch, then the [Order-shipping fallback](#the-order-shipping-fallback-warning) warning.\n\n### Tax-exempt orders\n\nIf the Order's account is tax-exempt, or its pricebook entry is configured as **Exempt**, the Tax Calculator shows a new tax amount of $0 with an **Exempt** badge rather than an error or warning. No tax is applied.\n\n## Split-shipped orders\n\nWhen an Order Item's quantity is split across multiple Fulfillment Items shipping to **different tax zones**, StoreConnect calculates tax separately for each Fulfillment Item at its own destination zone.\n\nFor example, if an order has 6 units of a product split as 3 units shipping to California and 3 units shipping to New York, and you have state-level tax zones configured for both states, each portion is taxed at the applicable state rate. The Tax Calculator preview groups the breakdown by destination address so you can see the per-location tax amounts before applying them.\n\nIf all Fulfillment Items on an Order Item would attract the same taxes (for example, they all ship to addresses in the same zone), a single combined tax row is used — the result is the same as if there were one shipment.\n\n## Using invocable Apex in Flows\n\nStoreConnect exposes a global invocable Apex action — **StoreConnect: Invocable Action** — that lets you trigger tax calculation from any Salesforce Flow (record-triggered, scheduled, screen, or autolaunched).\n\nThe action creates, updates, or deletes order item tax records as needed based on the current state of the order — no pre-existing tax records are required. The order's total tax amount is updated whenever tax records change, and zeroed out if no taxes apply.\n\n### Action label\n\n`StoreConnect: Invocable Action`\n\n### Input variables\n\n| Variable | Type | Required | Description |\n|---|---|---|---|\n| `action` | Text | Yes | The action to perform. Set to `CALCULATE_TAX` to calculate or recalculate tax on an order. |\n| `recordId` | Record ID | No | The ID of a single order to calculate tax for. Use in record-triggered flows where one order drives each flow interview. |\n| `recordIds` | Record ID Collection | No | A collection of Order IDs to calculate tax for. Use in screen, scheduled, or autolaunched flows where you need to pass multiple orders at once. |\n\nSupply either `recordId` or `recordIds` — not both. In a record-triggered flow, `recordId` is the natural choice; for all other flow types, use `recordIds`.\n\n### Output variables\n\n| Variable | Type | Description |\n|---|---|---|\n| `isSuccess` | Boolean | `true` if the tax calculation completed without errors. |\n| `error` | Text | Error message if `isSuccess` is `false`. |\n\n### Requirements\n\nTax calculation will not execute if any of the following conditions are not met:\n\n- **Manual Tax Calculation must be enabled.** Go to **Setup \u003e Custom Metadata Types \u003e StoreConnect Setting** and confirm `Manual Tax Calculation Enabled` is set to `true`.\n- **The running user must have the SC Admin or Order Manager permission set.** Record-triggered flows run in system context by default, so explicit permission set assignment is not required for those flows. For flows running in user context, ensure the user has the required permission set.\n- **At least one Order ID must be supplied** via `recordId` or `recordIds`.\n\n### When to trigger\n\n**Trigger on Order, not on Order Item.** The tax calculator processes all items on the Order in a single call. If you trigger from an OrderItem flow and multiple items are saved in the same transaction, each item fires a separate flow interview — each calling the calculator for the same order. This causes redundant calculations and can quickly exhaust governor limits.\n\nTriggering on Order works reliably when there is a clear signal that all items are in their final state, such as a status change (for example, Activated) or a custom field being set on the order.\n\nIf no such signal exists on the order, a two-flow pattern works well:\n\n1. An **OrderItem record-triggered flow** (after save) that sets a flag field on the parent Order — one fast field update, no tax calculation.\n2. An **Order record-triggered flow** that fires when that flag is set and calls `CALCULATE_TAX` — one calculation per order per transaction, regardless of how many items changed.\n\n### Example: record-triggered flow on order\n\nTo automatically recalculate tax when an order's status changes:\n\n1. Create a **Record-Triggered Flow** on `Order`, triggering on **Update**.\n2. Add an entry condition for the status field change (for example, `Status` changes to `Activated`).\n3. Add an **Action** element and select **StoreConnect: Invocable Action**.\n4. Set `action` to the text value `CALCULATE_TAX`.\n5. Set `recordId` to `{!$Record.Id}`.\n6. Use the `isSuccess` output to branch to an error path if needed.\n\n## Exclusive vs inclusive tax\n\nThere's a few things to note when comparing tax recalculation with regard to exclusive vs inclusive tax.\n\n### Exclusive\n\nIf you're changing the unit price on an Order Item, when the tax is exclusive, you should set the value to the exclusive price and then recalculate the tax. During recalculation the unit price will be updated to include the tax amount.\n\nBecause the tax is added into the unit price, the order total rises by the tax amount. Any payment already captured against the order stays as it is, so an order that was fully paid before you calculated tax will afterwards show a balance owing equal to the tax. This applies whether you use the **Calculate Tax** action or the invocable action in a flow.\n\nHowever if you **do not** plan to recalculate tax, you should set the unit price to the tax inclusive amount and update the tax amount with the new tax amount.\n\n### Inclusive\n\nYou should always set the unit price to the inclusive price. You can also update the tax amount if you wish and avoid recalculation, or leave it as-is and recalculate to let the system update it for you."}