> ## Documentation Index
> Fetch the complete documentation index at: https://docs.filexpress.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Traceability

> Map of relationships between documents, contacts, payments and accounting entries

Traceability shows, in a **relationship graph**, what a document or contact is connected to: which quotation an invoice came from, what payments it has, which accounting entry it generated and which bank movement it was reconciled with. It lets you audit the origin and destination of a transaction without opening module after module.

Go to **Traceability** in the side menu.

## Find the starting point

**1. Type in the search box (minimum 2 characters)**

The search finds:

| Type | Searched by |
| - | - |
| Customer / Supplier | Name, legal name, document or NIT/NRC |
| Invoice (sale) / Expense | Control number or DTE generation code |
| Quotation | Quotation number |
| Work order | Work order number |
| Project | Name |
| Journal entry | Code or description |

**2. Select a result**

Each result shows its type with a color. When you choose it, the graph is drawn.

> [!TIP]
>
> You can also open it directly with the **Traceability** button that appears in the view of a **sale**, a **customer**, an **expense**, a **supplier**, a **project** or an **accounting entry**.

Once the starting point is chosen, a **summary** shows how many elements and relationships the graph has, how many resource types appear and the depth used. Below it are the controls (depth, fit to screen and reload).

## Elements shown in the graph

Each node has a color and a shape according to its type (the **Legend** shows the ones present):

> [card] Commercial
>
> Customer, quotation, advance payment, invoice (includes credit and debit notes), collection, withholding voucher, work order and project.

> [card] Purchases
>
> Supplier, expense, supplier payment, fixed asset and production.

> [card] Accounting and banks
>
> Journal entry, bank movement, bank, card settlement and petty cash movement.

> [card] Payroll
>
> Payrolls, when associated with a project or when they have journal entries.

## Relationships shown

The lines between nodes indicate the relationship. The main ones:

| From | Connects to |
| - | - |
| Customer | Quotations, invoices, work orders, projects |
| Quotation | Customer, advance payments, invoices, work orders, projects |
| Invoice | Customer, quotation, project, work orders, collections, withholdings, related credit/debit notes, journal entries |
| Collection | Invoice, bank, journal entries |
| Work order | Customer, quotation, invoice, project, productions |
| Project | Customer, quotation, work orders, invoices, expenses, payrolls |
| Supplier | Expenses, fixed assets |
| Expense | Supplier, project, payments, fixed assets, productions, journal entries |
| Supplier payment | Expense, bank, journal entries |
| Fixed asset | Supplier, expense, depreciation journal entries |
| Production | Work order, expenses |
| Journal entry | Source document (or consolidated documents), bank movements, card settlements, petty cash, depreciated assets |
| Bank movement | Bank, journal entry, movement it reverses or that reversed it, reconciled settlements |
| Card settlement | Bank, journal entry, bank movement it was reconciled with |
| Payroll | Project, journal entries |

> [!NOTE]
>
> Traceability works at the **document** level. It does not follow batch numbers or individual products; for that, use [Batches](https://docs.filexpress.app/en/docs/inventario/lotes.md) and [Inventory movements](https://docs.filexpress.app/en/docs/inventario/movimientos.md).

## Use the graph

| Action | Result |
| - | - |
| Hover over a node | The **Detail** panel shows type, number, amount, date and status |
| Click a node | Opens the view of the document or contact |
| Right-click a node (or **Expand** button) | Adds that node's relationships to the graph |
| **Depth** 1, 2 or 3 | How many hops from the starting point are shown (default 2) |
| Fit button | Centers the graph on the screen |
| Reload button | Queries the graph again |

Nodes with a **dotted border** have no detail view (for example, collections, advance payments or withholdings).

> [!WARNING]
>
> If a contact has many documents, the graph is trimmed to **50 elements per relationship** and a notice appears. Right-click a node to explore from it. Banks do not expand automatically; you must expand them manually or search for them as a starting point.

## Transmissions of a sale (tax integrations)

Besides the relationship graph, each sale keeps the **traceability of the calls to the tax authority**: the Ministry of Finance (Hacienda) in El Salvador and SAT in Guatemala, both successful and failed. It lets you audit any document: what was sent, what the authority responded and how long it took.

Open the sale's detail and go to the **Transmissions** tab.

> [!NOTE]
>
> The tab is only visible to **administrators** and only in **El Salvador** and **Guatemala** branches.

| Column | Content |
| - | - |
| **Provider** | **Hacienda (MH)** or **SAT**. |
| **Operation** | Type of call, with its internal name (for example `publish` for issuance and `annul` for voiding). |
| **Status** | Successful or Failed (hover to see the error). |
| **HTTP** and **Duration** | Response code and time in milliseconds. |
| **Date** | Time of the call. |

The **Detail** button opens a panel with the attempt's information:

* **Request**: the JSON sent.
* **Response**: the JSON received.
* **XML**, when it exists: it can be copied or downloaded with **Download XML**.
* The **Error** message, if the call failed.

## Use cases

> [accordion] Audit the origin of a sale
>
> Search for the invoice by control number or generation code. The graph shows the source quotation and work order, the customer, the collections received, the withholdings, the associated credit or debit notes and the accounting entries generated.

> [accordion] Verify that a collection reached the bank
>
> From the invoice, follow the **collection** to its **journal entry** and the reconciled **bank movement**.

> [accordion] Understand why an invoice was rejected
>
> In the sale's detail, open **Transmissions**, choose the failed call and review the response and the tax authority's error message. In El Salvador, the rejected sale is also left as a [draft](https://docs.filexpress.app/en/docs/ventas/borradores.md) so you can correct and retransmit it.

> [accordion] Review an accounting entry
>
> Search for the entry by code. You see the documents that originated it (even if it is an entry consolidating several documents) and the related bank or petty cash movements.

> [accordion] Profitability of a project
>
> Start from the project to see its invoices, expenses, work orders and payrolls in one place.

> [accordion] Purchases from a supplier
>
> Start from the supplier to see its expenses, payments, fixed assets acquired and productions where those expenses were used.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.