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

# How CargoWise sends documents

> How a document gets from CargoWise into Transitive, and what Transitive checks when it arrives.

Ingress is the way data enters Transitive. CargoWise sends each document to Transitive as an XML message. Transitive checks the message. Then it creates the document or updates it.

## What CargoWise sends

| Message | What Transitive does |
| - | - |
| Income invoice | Creates an invoice. |
| Payment receipt | Creates a payment. |
| Credit note | Creates a credit. |
| Receipt reversal | Applies the reversal to the receipt. |
| Any other message | Ignores it. No document is created. |

CargoWise can send the same document more than once. Refer to [Send an update from CargoWise](/cargowise/send-updates).

## What Transitive checks

Transitive checks each message:

| Check | Rule |
| - | - |
| Credential | CargoWise signs in with the ingress credential of one company. Refer to [Connect CargoWise](/cargowise/connect). |
| Format | The message is XML. It is 25 MB or smaller. |
| Identity | The message names the **Enterprise ID**, the **Server ID** and the company code of that company. |
| Document | The message is an invoice, a credit note, a receipt or a receipt reversal. It has a document number. |

If a check fails, Transitive does not create a document. The message shows on the **Events** page with the reason. Refer to [Check what CargoWise sent](/cargowise/events).

## How Transitive knows whose a document is

| Data in the message | What it identifies |
| - | - |
| Enterprise ID | Your CargoWise enterprise. |
| Server ID | The CargoWise server of your enterprise. |
| Company code | The CargoWise company that owns the document. |
| Document number | The document. Transitive uses it as the key. |

Each CargoWise company is a separate company in Transitive. It has its own settings, credential and credits history.

## What happens to a message

Each message gets one of these results on the **Events** page:

| Result | Meaning |
| - | - |
| **OK** | Transitive used the message. The document is new or updated. |
| **Processing** | Transitive received the message and has not finished. |
| **Duplicate** | Transitive already has this exact message. |
| **Stale** | Transitive did not use the message. It is older than the data that Transitive has. |
| **Quarantined** | Transitive kept the message but did not create a document. |
| **Failed** | Transitive could not receive the message. |

Refer to [Event codes](/reference/events/overview) for the reason of each result.

## A company that is not active

If a message comes from a company that is not active, Transitive keeps the message. It processes the message when the company becomes active. Refer to [Connect CargoWise](/cargowise/connect).

<Columns cols={2}>
  <Card title="Connect CargoWise" icon="link" href="/cargowise/connect">
    Set up the connection.
  </Card>

  <Card title="Check what CargoWise sent" icon="inbox" href="/cargowise/events">
    Read the Events page.
  </Card>
</Columns>


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