> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/administration-and-setup/settings/document-processing/e-documents/tax-code-mapping.md). Agents can also search and read this documentation through its [MCP server](https://docs.docbits.com/~gitbook/mcp).

# Map e-invoice VAT categories to ERP tax codes

Electronic invoices can carry a VAT category such as **S** rather than the ERP's tax code. **eDoc Tax Code Mapping** defines the intended conversion. It is separate from editing tax amounts or e-invoice validation rules.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-1a332a93d9701ef5888e3074aad4b7b16b579b1e%2Fedoc-tax-mapping-form-en.png?alt=media" alt="The tax-code mapping form before any entry is saved."><figcaption><p>The tax-code mapping form before any entry is saved.</p></figcaption></figure>

## Before you start

You need administrative access, invoice tax country/category/rate and a valid ERP code agreed with your ERP administrator. Confirm organization and sub-organization. The page must be available in your deployed release.

## Add and check a mapping

1. Open **Settings → E-Documents → Tax Code Mapping** and review existing entries.
2. Choose **Add Mapping**.
3. Enter the **Tax country** as a two-letter ISO code, for example `DE`.
4. Select **E-invoice VAT category**. Examples: **S — Standard rate**, **Z — Zero rated**, **E — Exempt from tax**, **O — Outside scope of tax**. These have different meanings; do not interchange them to bypass an error.
5. Enter **Tax rate (%)** for a specific rate. Empty matches any rate in that category, as indicated by the form.
6. Enter **ERP tax code** and select the relevant **Sub-Organizations** where applicable. An empty ERP code explicitly permits the raw category to be exported unchanged; use it only if the destination accepts that category.
7. Choose **Add**. Check the stored country, category, rate, ERP code, scope and active state.
8. Test a representative e-invoice with a controlled export target. Verify the actual ERP code and response. Also test a missing/wrong mapping to check the failure path.

For example, a German invoice with category `S` and rate `19` needs the ERP code configured for that case. Obtain the actual code from your ERP configuration; a demonstration code is not a production default.

## Resolve an error

For a missing-mapping error, compare actual country, category, rate, scope and active entry. Check the integration response before repeating an export with an uncertain destination result. Removing a mapping changes future matching; it does not undo earlier exports.

See [E-Invoice Validation](https://docs.docbits.com/administration-and-setup/settings/document-processing/e-documents/validation-rules.md) and [Export](https://docs.docbits.com/administration-and-setup/settings/document-processing/export.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.docbits.com/administration-and-setup/settings/document-processing/e-documents/tax-code-mapping.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
