Understanding the Tax Engine
Tax is the most intricate part of any accounting system — and REDA’s tax engine is the most layered piece of this product. The good news: once you understand the shape of it, the rest of this category falls into place. This article is the map. It explains how the whole machine fits together so that every later article — jurisdictions, rules, calculation, withholding — slots into a picture you already hold in your head.
The single most important idea: REDA’s tax engine is data-driven. The rules of tax for the United Kingdom, the United States, Brazil, and India are not written into the software — they are configured as records. Adding a new country means creating jurisdiction, tax-type, and rule records. It never means changing code. The same engine that fires one rule for a UK sale fires six for a Brazilian one, with nothing different under the hood.
Access you'll need. Any REDA Financials AI permission set can view the tax setup and the tax on documents. Setting up and maintaining the rulebook requires the Accounting Admin v2 or Accounting Controller v2 permission set; the Accounts Payable v2, Accounts Receivable v2, and Read Only v2 sets cannot change it.
The big idea: a rulebook, and a calculation
Hold two things apart in your mind and everything else follows:
| The rulebook (setup) | The calculation (runtime) | |
|---|---|---|
| What it is | Records you configure: jurisdictions, tax types, rules, profiles, registrations, GL routing | What the engine does automatically each time a document posts |
| How often it changes | Rarely — set up at implementation, edited when a rate or law changes | Every invoice, every time |
| Who touches it | A finance administrator | Nobody — it’s invisible automation |
| The output | — | A Source Line Tax audit row for every tax that applied, and balancing GL entries |
The four layers of the engine
The tax module is fourteen objects. That sounds like a lot until you see them grouped — they fall into three setup layers plus one runtime output. Each later article in this category lives in one of these layers, so this is the table to remember.
Layer 1 — Master Data (the vocabulary)
Configured once. These define the universe the rules draw on.
| Object | What it represents | Example |
|---|---|---|
| Tax Jurisdiction | A place, in a hierarchy (country → state → city) | “GB”, “US-CA”, “BR-SP” |
| Tax Type | A named tax and how it behaves | VAT, GST, ICMS, IGST, TDS |
| Fiscal Operation | The nature of the transaction (auto-derived) | Intrastate / Interstate / Export |
| Party Tax Profile | How a buyer or seller behaves for tax | Registered business, end consumer, exempt |
| Tax Profile | How a product/service is treated | Standard-rated, zero-rated, exempt |
Layer 2 — The Rule Engine (the brain)
| Object | What it represents |
|---|---|
| Tax Rule | “When all these conditions match, apply this tax type at this rate.” Eight optional matching dimensions — every one left blank means “match anything”. |
| Tax Calculation Component | Optional extra steps for a rule’s base — a cap on the taxable base, or a rate override. Brazil’s markup (MVA), embedded tax (por dentro) and rule-on-rule dependencies live on the Tax Rule itself. Most rules need neither. |
Layer 3 — Entity Configuration (your specifics)
| Object | What it represents |
|---|---|
| Entity Tax Registration | Which jurisdictions your company is registered to collect tax in (its “nexus”). |
| Tax GL Mapping | Where each tax posts in your chart of accounts — by tax type, side, and recoverability. |
| Product Fiscal Profile | The bridge from your products to a Tax Profile, with country codes (UK none, India HSN, Brazil NCM). |
Runtime output
| Object | What it represents |
|---|---|
| Source Line Tax | The result. One immutable row per tax that fired, per invoice line — the tax-side audit trail. Created by the engine, never edited by hand. |
The remaining three objects belong to withholding tax (a parallel engine): Withholding Tax Rule and its Withholding Tax Rate children, plus the WHT Transaction audit record. More on that below.
Where the engine gets “who” and “where”
The engine needs to know the seller, the buyer, and their locations. Those come from two records you already manage, each extended with two tax fields:
| Record | Tax fields | Role |
|---|---|---|
| Entity (your company) | Tax Jurisdiction, Party Tax Profile | The seller — its location is the tax origin |
| Account (customer / vendor) | Tax Jurisdiction, Party Tax Profile | The buyer — its location is the tax destination |
So a sale from your UK entity to a French customer has origin = GB, destination = FR — and the engine knows, without anyone choosing it, that this is an export. (The Entity also carries the withholding-tax configuration; see the WHT articles.)
How one calculation flows
When an invoice is posted, the engine runs a fixed six-step pipeline. You don’t need the internals yet — How Tax Calculates on a Document covers every step with numbers — but here is the shape:
The same engine, four countries
Nothing makes the design click like watching one engine handle wildly different tax regimes with no code change. We’ll use these four throughout the category.
🇬🇧 United Kingdom — one simple rule
Your UK entity sells £1,000 of standard-rated goods to a UK customer. One rule matches: VAT at 20%, added on top.
| Rules fired | Base | Rate | Tax | Invoice total |
|---|---|---|---|---|
| VAT (1 rule) | £1,000.00 | 20% | £200.00 | £1,200.00 |
This is the simplest case, and the most common. With one catch-all rule and a flag on the product, you barely configure anything — covered in UK VAT.
🇺🇸 United States — nexus decides everything
US sales tax is destination-based, but only applies if your entity is registered (has nexus) in the buyer’s state. Same $1,000 sale, two outcomes:
| Scenario | Nexus in buyer’s state? | Result |
|---|---|---|
| Entity registered in Texas, ships to Texas | Yes | Texas sales tax fires (seeded 8.19% = $81.90) |
| Entity not registered in Texas, first sale there | No | $0 tax — recorded as a normal outcome, not blocked |
That “zero tax, not an error” behaviour is deliberate — crossing into a new state is a normal business event. See US Sales Tax & Nexus.
🇧🇷 Brazil — six rules fire at once
An interstate sale from São Paulo to a consumer in Rio de Janeiro is the engine’s stress test. Six rules fire on a single line, in sequence — and three of them (ICMS, PIS, COFINS) are embedded inside the price (“por dentro”), not added on top:
| # | Tax | Note |
|---|---|---|
| 1 | ICMS | Embedded in the price (por dentro) |
| 2 | IPI | Federal excise on manufactured goods, added on top |
| 3 | PIS | Federal social contribution — also embedded in the price |
| 4 | COFINS | Federal social contribution — also embedded in the price |
| 5 | DIFAL | Rate differential owed to the destination state (consumer sales) |
| 6 | FCP | Poverty-fund surcharge of the destination state |
The engine handles all of this through ordinary configuration — sequence, dependency links, and calculation components. Walked through in full in Brazil.
🇮🇳 India — the rules change with the route
Indian GST splits by whether the sale crosses a state line — and the engine derives that automatically from the two jurisdictions:
| Route | Rules fired | On ₹10,000 @ 18% |
|---|---|---|
| Within one state (Maharashtra → Maharashtra) | CGST 9% + SGST 9% (2 rules) | ₹900 + ₹900 |
| Across states (Maharashtra → Karnataka) | IGST 18% (1 rule) | ₹1,800 |
India also features TDS (withholding) on the purchase side — the bridge into the WHT articles. See India.
Real data: the UK rulebook, record by record
Enough theory — let’s look at the actual records. Everything below ships with REDA in the UK seed pack; running the Tax Seeding Wizard for “United Kingdom” creates exactly these. This is what one country’s entire rulebook looks like — and it’s small.
1 · Jurisdictions — the geography
Five records: the country, plus its four nations as children. VAT is UK-wide, so the rules sit at country level — but the hierarchy is there for the cases that need it (e.g. Northern Ireland’s Windsor Framework).
| Code | Name | Level | Parent |
|---|---|---|---|
GB | United Kingdom | Country | — |
GB-ENG | England | State/Province | GB |
GB-SCT | Scotland | State/Province | GB |
GB-WLS | Wales | State/Province | GB |
GB-NIR | Northern Ireland | State/Province | GB |
2 · Tax Types — the named taxes
The UK has one tax (VAT) with four treatments. Note Exempt is the only one where input VAT is not recoverable — that flag drives the GL routing later.
| Code | Name | Family | Recoverable? |
|---|---|---|---|
GB-VAT-STD | UK VAT — Standard Rate | VAT / GST | Yes |
GB-VAT-RED | UK VAT — Reduced Rate | VAT / GST | Yes |
GB-VAT-ZERO | UK VAT — Zero Rate | VAT / GST | Yes |
GB-VAT-EXEMPT | UK VAT — Exempt | VAT / GST | No |
3 · Profiles — classifying the “what” and the “who”
Two independent dimensions. Tax Profiles classify the product; Party Tax Profiles classify the business.
| Tax Profile (product) | Party Tax Profile (business) | |
|---|---|---|
GB-STD-20 — Standard Rate Goods & Services | GB-VAT-REG — VAT Registered Business | |
GB-RED-5 — Reduced Rate Supplies | GB-VAT-FRS — Flat Rate Scheme | |
GB-ZERO — Zero Rated Supplies | GB-VAT-UNREG — Unregistered / Below Threshold | |
GB-EXEMPT — Exempt Supplies |
4 · Tax Rules — the brain
Four rules, one per treatment. Each ties a tax type to a product tax profile at a rate, scoped to the UK. Notice how lean a rule is when a country is simple — most of the eight matching dimensions are left blank (= “match anything”).
| Rule Code | Tax Type | Tax Profile | Destination | Rate | Effective from |
|---|---|---|---|---|---|
GB-VAT-STD-20 | GB-VAT-STD | GB-STD-20 | GB | 20% | 2011-01-04 |
GB-VAT-RED-5 | GB-VAT-RED | GB-RED-5 | GB | 5% | 1997-09-01 |
GB-VAT-ZERO-0 | GB-VAT-ZERO | GB-ZERO | GB | 0% | 1973-04-01 |
GB-VAT-EX-0 | GB-VAT-EXEMPT | GB-EXEMPT | GB | 0% | 1973-04-01 |
5 · GL accounts & routing — where the tax lands
The seed also creates the tax GL accounts and the Tax GL Mapping records that route each tax to them. This is where the recoverable flag pays off: the same VAT type posts to a liability when you sell and to an asset when you buy.
| Tax Type | Side | Recoverable? | GL Account |
|---|---|---|---|
GB-VAT-STD | Sales | No | 2311-VAT-GB — VAT Payable (liability) |
GB-VAT-STD | Purchase | Yes | 1511-VAT-ITC-GB — VAT Input Tax Recoverable (asset) |
6 · Putting it together — the £1,000 sale through these exact records
Now watch the engine walk this data for our UK sale of £1,000 of standard-rated goods to a VAT-registered UK customer:
GB (your entity), destination = GB (customer). The product’s fiscal profile points to Tax Profile GB-STD-20.GB-VAT-STD-20 (its tax profile is GB-STD-20, destination GB, active, effective). The other three don’t match the product’s profile.GB-VAT-STD, Rule GB-VAT-STD-20, Base £1,000, Rate 20%, Amount £200.2311-VAT-GB (VAT Payable). The invoice totals £1,200.The resulting journal:
| Account | Debit | Credit |
|---|---|---|
| Accounts Receivable | £1,200.00 | |
| Revenue | £1,000.00 | |
VAT Payable — 2311-VAT-GB | £200.00 |
Had this been a purchase of the same goods, that £200 would instead
debit 1511-VAT-ITC-GB (VAT Input Tax Recoverable) —
an asset you reclaim from HMRC — because the purchase mapping’s
Is Recoverable flag is set to Yes. Same tax type, different account, decided by one
flag. That’s the whole engine in miniature.
Real data: Brazil, where six rules fire at once
Now the opposite extreme — same engine, same kind of records, but Brazil’s seed pack is an order of magnitude bigger: 28 jurisdictions, 12 tax types, and 58 rules (versus the UK’s 5 / 4 / 4). And a single interstate sale fires six rules in sequence. The remarkable part: not one line of code differs from the UK. It’s all data.
The taxes in play
An interstate sale of manufactured goods touches six different taxes — three federal, three at state level:
| Tax Type | Name | Level |
|---|---|---|
BR-ICMS | ICMS — goods circulation tax | State |
BR-DIFAL | DIFAL — ICMS rate differential | State |
BR-FCP | FCP — poverty-fund surcharge | State |
BR-IPI | IPI — federal excise on manufactured goods | Federal |
BR-PIS-NC | PIS — social contribution (non-cumulative) | Federal |
BR-COFINS-NC | COFINS — social contribution (non-cumulative) | Federal |
The seller’s regime changes the rates
Brazil ships five Party Tax Profiles — and which one your entity carries genuinely changes the calculation. PIS and COFINS have two versions, and the engine picks based on the seller’s regime:
| Seller regime (Party Tax Profile) | PIS rate | COFINS rate |
|---|---|---|
BR-LR-CONTRIB — Lucro Real (non-cumulative) | 1.65% | 7.6% |
BR-LP-CONTRIB — Lucro Presumido (cumulative) | 0.65% | 3.0% |
That’s the Seller Regime dimension on a Tax Rule doing its job — a Lucro Real company and a Lucro Presumido company selling the identical product pay different federal contributions, from the same rule set.
The six rules that fire — São Paulo → Rio de Janeiro
A Lucro Real manufacturer in São Paulo sells R$1,000 of goods to an
end consumer in Rio de Janeiro (an interstate sale, fiscal operation
BR-6101; DIFAL and FCP fire only when the buyer is a
non-contributor — a consumer rather than an ICMS-registered business).
The engine matches six rules and runs them in sequence order:
| Seq | Rule | Tax | Rate | How it applies | Posts to |
|---|---|---|---|---|---|
| 10 | BR-ICMS-6101-SP-TO-SE | ICMS | 12% | Por dentro — embedded in the price | 2331-ICMS-BR |
| 20 | BR-IPI-STANDARD | IPI | 10% | Added on top | 2334-IPI-BR |
| 30 | BR-PIS-LR-STDG | PIS | 1.65% | Embedded (Lucro Real rate) | 2335-PIS-BR |
| 40 | BR-COFINS-LR-STDG | COFINS | 7.6% | Embedded (Lucro Real rate) | 2336-COFINS-BR |
| 50 | BR-DIFAL-RJ-STDG | DIFAL | 8% | RJ internal 20% − interstate 12%, added | 2332-DIFAL-BR |
| 60 | BR-FCP-RJ-STDG | FCP | 2% | Rio poverty-fund surcharge, added | 2333-FCP-BR |
Illustrative amounts on the R$1,000 goods value — six Source Line Tax rows, each posting to its own account:
| Tax | Rate | ≈ Amount | Added to total? |
|---|---|---|---|
| ICMS | 12% | R$120 (embedded) | No — inside the price |
| IPI | 10% | R$100 | Yes |
| PIS | 1.65% | R$16.50 (embedded) | No — inside the price |
| COFINS | 7.6% | R$76.00 (embedded) | No — inside the price |
| DIFAL | 8% | R$80.00 | Yes |
| FCP | 2% | R$20.00 | Yes |
CBS/IBS rules already in the seed)
comes along, you add records — never code.
What you set up vs what’s automatic
| You configure (once) | The engine does (every invoice) |
|---|---|
| Jurisdictions, tax types, rules, profiles | Picks the right jurisdiction by walking the hierarchy |
| Your registrations (nexus) per jurisdiction | Checks nexus and zeroes tax where you’re not registered |
| GL routing per tax type | Derives the fiscal operation (domestic / interstate / export) |
| Product fiscal profiles (or the “apply default tax” flag) | Matches every applicable rule and computes each tax |
| Buyer/seller jurisdiction & profile on Account/Entity | Writes the Source Line Tax audit rows and posts to the ledger |
Where to go next
Read this category in order — it follows the way you actually build:
- Foundations: Tax Jurisdictions → Tax Types → Tax GL Mapping → Fiscal Operations
- Classification: Party Tax Profiles → Tax Profiles → Product Fiscal Profiles
- Rules & calculation: Tax Rules → Calculation Components → Entity Tax Registration → How Tax Calculates → Source Line Tax
- Put it together: the country walkthroughs — UK, US, Brazil, India
- Withholding: Understanding Withholding Tax and its sub-articles
Frequently asked questions
No. Countries, rates, and rules are records, not code. Adding a country means creating jurisdiction, tax-type, and rule records (often via the seeding wizard); changing a rate means editing or superseding a Tax Rule. The engine is untouched.
Because that’s how many rules match. The engine never stops at the first match — it applies every matching rule. Brazil’s tax law genuinely layers six taxes on one sale; the UK layers one. The engine simply reflects the configured reality.
On the invoice (the tax total and the line tax), and in the Source Line Tax records behind it — one row per tax that fired, showing the rule, rate, base, and amount. Those rows are the audit trail and are created automatically; you never edit them by hand.
The line gets zero tax. That can be correct (a genuinely non-taxable item, or a jurisdiction where you have no nexus) — the engine records the outcome rather than guessing. If you expected tax and got none, it’s almost always a missing registration, a missing product fiscal profile, or a rule whose conditions didn’t fit. The calculation and country articles show how to diagnose each.
It’s a parallel engine with its own rules and rates, because withholding behaves differently — it reduces the payment rather than adding to the invoice. Like the tax engine, it previews on the draft form and writes its records when the bill posts. It shares the same data-driven philosophy. Start with Understanding Withholding Tax.
Was this article helpful?