# File processing overview
Source: https://www.stedi.com/docs/edi-platform/operate/file-processing-overview

***

title: File processing overview
sidebarTitle: "File processing overview"
----------------------------------------

![Inbound and Outbound file processing flow](/images/diagrams/inbound-outbound-flow.svg)

Once you [add a trading partner](/edi-platform/configure), you can start exchanging EDI files.

## Inbound processing flow

When a new EDI file arrives over a [connection](/edi-platform/configure/trading-partners/connections), Stedi automatically:

1. Confirms that the information in the file's `ISA` headers matches the corresponding partnership. If not, the file will error, and you can retry after creating the required configuration. (Stedi may skip this step if the connection is set to a non-default [**ISA validation** option](/edi-platform/configure/trading-partners/connections#isa-validation-options).)
2. Identifies all available transaction sets in the file and validates them against the [transaction settings](/edi-platform/configure/trading-partners/transaction-settings) for the partnership, either using the specified guide or the base X12 specification.
3. Translates the EDI transaction into [Guide JSON](/edi-platform/operate/transform-json/guide-json), using the JSON Schema defined by the guide.
4. Sends processing events to any configured [webhooks](/edi-platform/configure/webhooks).
5. Persists the original EDI file and the Guide JSON for review and retrieval and displays the transaction set data in the UI for inspection.

<Tip>
  Stedi can also route non-EDI files, such as CSV, XML, and JSON to your
  business system for further processing. [Learn
  more](/edi-platform/operate/parse-edi#non-edi-file-types)
</Tip>

## Outbound processing flow

When you use the API to generate EDI files, Stedi automatically:

1. Validates the [Guide JSON](/edi-platform/operate/transform-json/guide-json) transaction payload against the guide attached to the [outbound transaction setting](/edi-platform/configure/trading-partners/transaction-settings) for the partnership. The API returns an error if validation is not successful.
2. Generates an EDI document that conforms to outbound transaction setting.
3. Persists the JSON payload and resulting EDI file.
4. Delivers the EDI file to your trading partner through the configured connection.
5. Displays the generated file on the **Files** page in the Stedi portal for review.
6. Emits a `file.delivered.v2` event and one or more `transaction.processed.v2` [events](/edi-platform/operate/event-types).