> This page is for Documentation, version Integration guides (default).
> For other versions, use one of these documentation indexes:
> - Integration guides (default): https://avalara.ferndocs.com/docs/integration-guides/llms.txt
> - Refactor guides: https://avalara.ferndocs.com/docs/refactor-guides/llms.txt
> - Get certified: https://avalara.ferndocs.com/docs/get-certified/llms.txt
> - Agent to Agent (A2A): https://avalara.ferndocs.com/docs/agent-to-agent-a2a/llms.txt
> - AI use cases: https://avalara.ferndocs.com/docs/ai-use-cases/llms.txt
> - API versioning: https://avalara.ferndocs.com/docs/api-versioning/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://avalara.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://avalara.ferndocs.com/_mcp/server.

# Q-and-A

Guide: E-Invoicing and Live Reporting

For both outbound (sale) and inbound (purchase) e-invoicing flows, Avalara determines which Avalara company record the document belongs to. All API responses related to the document include the `companyId` field.

Your integration must map the Avalara `companyId` to your application’s internal reference for the corresponding legal entity or company. This mapping ensures that your system can process the document correctly.

**Parent topic:** [Q-and-A for ELR](https://developer.avalara.com/elr/lbp6527542929684/)

> **Note**
>
> Part of the **E-Invoicing & Live Reporting** integration guide. [Open the full "Q-and-A" milestone on Avalara](https://developer.avalara.com/products/e-invoicing/integration-guides/elr/uek2600453704100/) to see every page in this section.