Build a State Sales & Use Tax Return Dataset
Skill: Convert sales data into a multi-jurisdiction state sales/use tax return dataset
Region: United States Category: Sales & Use Tax — state/local return Does: Takes a period's sales data and produces a state sales & use tax return dataset (JSON) with gross/taxable/exempt sales and tax due broken out by state, county, city, and special district — ready to key into a state DOR portal or a Streamlined (SST) simplified electronic return. Standard: State DOR sales/use tax return (jurisdiction-specific; SUT/STR). Worked example models a home-rule, destination-sourced state.
Sales-tax rules are jurisdiction-specific and change frequently (rates, thresholds, taxability, sourcing). The AI computes from the rates and taxability you supply or that it is instructed to look up; always confirm current rates and nexus rules with the state DOR or your tax engine before filing. Economic-nexus thresholds derive from South Dakota v. Wayfair.
When this applies
- A seller files a periodic state sales/use tax return and must allocate tax to local jurisdictions (destination sourcing).
- Covers marketplace-facilitator deductions, exempt/resale sales, and use tax self-assessed on taxable purchases where sales tax was not charged.
- Not a single national format — each state DOR differs; this produces a normalized dataset that maps onto the state's return lines or an SST simplified return.
Conversion procedure
- Read the source. Accept CSV/JSON of transactions (date, ship-to jurisdiction, amount, tax collected, exemption reason, channel) plus a rate/taxability table. Identify the filing state and period.
- Determine nexus. Confirm the seller has nexus (physical or economic — e.g. >$100k sales or 200 transactions, state-specific). Flag if below threshold.
- Classify each sale. Taxable, exempt (resale/exemption certificate), or marketplace-facilitated (collected by the marketplace → deductible from the seller's taxable base).
- Allocate by jurisdiction. Assign each taxable sale to state + county + city + special district by the ship-to address; stack the local rates.
- Compute gross sales, deductions, taxable sales, and tax per jurisdiction; sum to the return total; apply any timely-filing discount.
- Emit the JSON dataset; validate with the checklist.
Source → return field map
| From the source | → Target field |
|---|---|
| Filing state + period | state, period.start/end |
| All sales (incl. exempt) | gross_sales |
| Marketplace-facilitated sales | deductions.marketplace_facilitator |
| Exempt/resale sales | deductions.exempt_resale |
| Gross − deductions | taxable_sales |
| Per ship-to jurisdiction taxable base | jurisdictions[].taxable |
| State/county/city/district rate | jurisdictions[].rate |
| Tax per jurisdiction | jurisdictions[].tax |
| Self-assessed use tax | use_tax_due |
| Sum of jurisdiction tax + use tax | total_tax_due |
| Vendor discount (if allowed) | vendor_discount |
| Net remittance | net_due |
Document structure
sales_use_tax_return
├── filer (name, state tax id)
├── state, period
├── gross_sales
├── deductions (marketplace_facilitator, exempt_resale, other)
├── taxable_sales
├── jurisdictions[] (code, level, rate, taxable, tax)
├── use_tax_due
├── total_tax_due
├── vendor_discount
└── net_due
Code tables
Jurisdiction level
| Level | Meaning |
|---|---|
state |
Statewide rate |
county |
County rate |
city |
Municipal / home-rule city rate |
special |
Special-purpose district (transit, stadium, etc.) |
Common deduction reasons
| Code | Meaning |
|---|---|
resale |
Sale for resale (resale/exemption certificate on file) |
exempt_entity |
Sale to exempt entity (government, 501(c)(3)) |
marketplace |
Tax collected & remitted by a marketplace facilitator |
exempt_product |
Non-taxable product category |
Calculation rules
- Taxable sales =
gross_sales − Σ deductions. - Combined rate per ship-to =
state_rate + county_rate + city_rate + special_rate. - Tax per jurisdiction line =
taxable_in_jurisdiction × that level's rate, rounded to the cent. - Use tax =
taxable_purchases_without_tax × applicable_rate(self-assessed). - Total tax due = Σ jurisdiction tax + use tax.
- Net due =
total_tax_due − vendor_discount(only if the state allows a timely-filing discount). - Recompute all totals from the per-jurisdiction lines; flag any mismatch with the source.
Worked example (end-to-end)
Input — monthly sales summary (home-rule state)
Filer: Widgets LLC, State acct 12-345678-9, State: CO, Period: May 2026
Gross sales: 120,000
Marketplace-facilitated (Amazon): 40,000
Resale (certificate): 10,000
Taxable destination: Denver — state 2.90% + RTD/special 1.10% + Denver city 4.81% = 8.81%
Use tax: office supplies 1,000 untaxed @ 2.90% state
After classification + computation (intermediate)
taxable_sales = 120000 - 40000 - 10000 = 70000 (all destined to Denver)
state tax 70000 × 0.0290 = 2030.00
special tax 70000 × 0.0110 = 770.00
city tax 70000 × 0.0481 = 3367.00
use tax 1000 × 0.0290 = 29.00
total = 2030 + 770 + 3367 + 29 = 6196.00
Output — sales & use tax return dataset
{
"filer": { "name": "Widgets LLC", "state_account": "12-345678-9" },
"state": "CO",
"period": { "start": "2026-05-01", "end": "2026-05-31" },
"gross_sales": 120000.00,
"deductions": {
"marketplace_facilitator": 40000.00,
"exempt_resale": 10000.00,
"other": 0.00
},
"taxable_sales": 70000.00,
"jurisdictions": [
{ "code": "CO-STATE", "level": "state", "rate": 0.0290, "taxable": 70000.00, "tax": 2030.00 },
{ "code": "CO-RTD", "level": "special", "rate": 0.0110, "taxable": 70000.00, "tax": 770.00 },
{ "code": "DENVER", "level": "city", "rate": 0.0481, "taxable": 70000.00, "tax": 3367.00 }
],
"use_tax_due": 29.00,
"total_tax_due": 6196.00,
"vendor_discount": 0.00,
"net_due": 6196.00
}
Normalisations shown: deductions subtracted (120000 − 40000 − 10000 = 70000); each jurisdiction tax recomputed from its own rate; use tax self-assessed 1000 × 2.90% = 29.00; total summed across lines 6196.00.
Validation checklist
- Nexus confirmed (physical or economic threshold) for the filing state; flagged if below
- Every sale classified: taxable, exempt/resale, or marketplace-facilitated
- Deductions documented (certificates / marketplace remittance) and subtracted from gross
-
taxable_sales = gross_sales − Σ deductions - Each jurisdiction line uses the correct current rate; local rates stacked by ship-to address
- Use tax self-assessed on untaxed taxable purchases
-
total_tax_due = Σ jurisdiction tax + use tax;net_dueapplies discount only if allowed - Rates and taxability confirmed against the state DOR / tax engine before filing
Last updated: 2026-06-13 — verify current state/local rates, economic-nexus thresholds, taxability rules, and the specific state return format before use.