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

# SFTP Flat File

> Send order data to Owlery as a CSV over SFTP when your WMS doesn't have a direct Owlery integration.

This page is for **Facilities**: warehouse and dock teams that run their facility's appointment schedule in Owlery. If the person you're helping isn't on a facility team, this page doesn't apply to them.

If your warehouse system doesn't have a direct Owlery integration, you can still keep Owlery in sync by sending order data as a flat file. Your system drops a CSV on Owlery's SFTP server, and Owlery picks it up and loads the orders so appointments line up with what's coming and going.

## How It Works

1. Your system exports inbound and outbound orders to a CSV that follows the [Owlery template](#quick-start).
2. The file is uploaded to the `inbound/` folder on Owlery's SFTP server, ideally on an automated schedule.
3. Owlery picks up each new file and creates or updates the matching inbound and outbound orders so your dock team can schedule against them.
4. If an order can't be loaded, Owlery emails your IT contact with what's wrong so you can correct and resend it.

There is nothing to install and no API to build. Most WMS and ERP platforms can already export a scheduled CSV and push it over SFTP.

> [!NOTE]
>
> The template is built for facilities that handle their own goods, so every order stays in your facility's Owlery account. If you're a 3PL and need orders routed to the clients who own the goods, contact [Owlery Support](mailto:support@owlery.ai).

## Who Does What

| | Owlery | Your team |
| - | - | - |
| **SFTP server** | Hosts, secures, and maintains the server | — |
| **Credentials** | Issues and manages your SFTP login | Requests access from Owlery Support |
| **Generating the file** | — | Exports full order data in the template format |
| **Sending the file** | — | Uploads files to the server, ideally automated |
| **Ingesting the file** | Picks up and loads every file you send | — |
| **Data accuracy** | — | Makes sure the data in each file is correct and complete |
| **Errors** | Emails your IT contact about each rejected order and why | Fixes the data at the source and resends |

> [!NOTE]
>
> Owlery loads what's in the file as sent. If an order has the wrong date, quantity, or trading partner, the fix belongs in your source system, followed by a corrected file.

## Quick Start

Fill in every column in the template that your system can export. Only a few are strictly required, but those are a floor, not a target.

> [!NOTE]
>
> **We strongly recommend sending the full order data.** Trading partners and line items tell your warehouse and dock team who's coming, what's on the truck, and how much of it. That context makes it much easier to plan labor, stage freight, and catch problems before the truck arrives. The required columns get orders loading, but the full order is what makes them useful on the dock.

> **[Download the blank template](/files/owlery-order-template.csv)**
>
> Every column header, ready to fill in. Leave a column out only if your system can't provide it.

**1. Fill in every column you can**

Use the [full template](#template-reference) and fill in as many columns as your system can export. At a minimum, every order needs these:

| Column | What to enter |
| - | - |
| `Order Number` | Your order or receiver number. |
| `Facility Code` | Your facility's code. Owlery Support gives you this. |
| `Order Type` | `inbound` or `outbound`. |
| `Requested Date` | Recommended. The ship or arrival date, such as `2026-11-03`. |

A file with only these columns still loads:

```csv theme={null}
Order Number,Facility Code,Order Type,Requested Date
PO-5521,OAK1,inbound,2026-11-02
SO-10482,OAK1,outbound,2026-11-03
```

**2. Save it as a CSV**

Use a `.csv` extension and a unique filename for every upload, such as `orders-20261103-0800.csv`.

**3. Upload it to the inbound folder**

Put the file in the `inbound/` folder on Owlery's SFTP server. Owlery picks it up from there.

> [!WARNING]
>
> Files left at the SFTP root, in other folders, or without a `.csv` extension are not processed, and no notification is sent.

## Template Reference

Every column is listed below. Only the order columns marked **Yes** are required, but we strongly recommend filling in the trading partner, location, and line item columns as well.

Headers aren't case-sensitive, and each column also accepts the alternate names listed. If your system already exports one of those names, you can keep it.

### Order Columns

| Column | Required | Also accepted | Notes |
| - | - | - | - |
| `Order Number` | Yes | `Order #`, `PO Number`, `PO #` | Identifies the order. Sending the same number again replaces the existing order. |
| `Facility Code` | Yes | `Warehouse Code` | Must match the source ID configured on your facility profile. Owlery Support can confirm the code for each facility. |
| `Order Type` | Yes | `Direction` | `inbound` or `outbound`. Values `sales` → `outbound` and `purchase` → `inbound` also work. For transfers, use whichever direction applies to this site. |
| `Requested Date` | Recommended | `Ship Date`, `Delivery Date` | Ship date for outbound, arrival date for inbound. Use ISO 8601 (for example `2026-11-03` or `2026-11-03T08:00:00-08:00`). A value with no time zone offset is read in the facility's local time zone. |
| `Notes` | No | | Free text for the dock team, such as `transfer from Plant 2`. |

### Trading Partner Columns (Strongly Recommended)

The trading partner is who's on the other side of the order: the vendor on an inbound order, the customer on an outbound order, or the other warehouse on a transfer. It shows in the **Trading Partner** column on the Orders table.

| Column | Required | Also accepted | Notes |
| - | - | - | - |
| `Trading Partner Code` | Recommended | | Your stable ID for the vendor or customer. Including it keeps each partner as one record instead of creating duplicates. |
| `Trading Partner Name` | Recommended | Inbound: `Vendor Name`, `Supplier Name`. Outbound: `Customer Name` | The vendor or customer's name. |

### Location Columns (Strongly Recommended)

The **Ship From** and **Ship To** columns are locations, not the partner. They're often the same, but not always. For example, a vendor might ship from a third-party warehouse. Use **Ship From** on inbound orders and **Ship To** on outbound orders.

If `Ship From Name` or `Ship To Name` is blank, it defaults to the `Trading Partner Name`. Most files only need the partner name plus the address.

| Field | Inbound orders | Outbound orders |
| - | - | - |
| Code | `Ship From Code` | `Ship To Code` |
| Name | `Ship From Name` | `Ship To Name` |
| Street 1 | `Ship From Street 1` | `Ship To Street 1` |
| Street 2 | `Ship From Street 2` | `Ship To Street 2` |
| City | `Ship From City` | `Ship To City` |
| State | `Ship From State` | `Ship To State` |
| Zipcode | `Ship From Zipcode` | `Ship To Zipcode` |
| Country | `Ship From Country` | `Ship To Country` |

Also accepted:

* **Inbound**: `Shipper` or `Origin` in place of `Ship From`, such as `Shipper Name` or `Origin City`.
* **Outbound**: `Consignee` or `Destination` in place of `Ship To`, such as `Consignee Name` or `Destination City`.
* **Zipcode**: `Ship From Postal Code` and `Ship To Postal Code` also work.

### Line Item Columns (Strongly Recommended)

Line items show your dock team what's on each order. Use one row per line, and repeat the order columns on each row.

| Column | Also accepted | Notes |
| - | - | - |
| `Line Number` | `Line #`, `Line` | Unique within the order. |
| `SKU` | `Item`, `Part Number` | The item number. |
| `Quantity` | `Qty` | A number, 0 or greater. |
| `Unit of Measure` | `UOM`, `Unit` | For example `each`, `case`, or `pallet`. |

### Example File

A file using every column, with one inbound and one outbound order of two lines each. Inbound rows leave the **Ship To** columns blank, and outbound rows leave the **Ship From** columns blank.

The inbound order leaves `Ship From Name` blank, so it defaults to the trading partner, Sunrise Packaging. The outbound order ships to one of Acme Foods' stores, so `Ship To Name` is filled in.

```csv theme={null}
Order Number,Facility Code,Order Type,Requested Date,Notes,Trading Partner Code,Trading Partner Name,Ship From Code,Ship From Name,Ship From Street 1,Ship From Street 2,Ship From City,Ship From State,Ship From Zipcode,Ship From Country,Ship To Code,Ship To Name,Ship To Street 1,Ship To Street 2,Ship To City,Ship To State,Ship To Zipcode,Ship To Country,Line Number,SKU,Quantity,Unit of Measure
PO-5521,OAK1,inbound,2026-11-02T08:00:00,Live unload,SUN-01,Sunrise Packaging,,,2200 Industrial Pkwy,Dock 4,Stockton,CA,95206,US,,,,,,,,,1,PKG-100,500,case
PO-5521,OAK1,inbound,2026-11-02T08:00:00,Live unload,SUN-01,Sunrise Packaging,,,2200 Industrial Pkwy,Dock 4,Stockton,CA,95206,US,,,,,,,,,2,PKG-200,2,pallet
SO-10482,OAK1,outbound,2026-11-03,,ACME,Acme Foods,,,,,,,,,ACME-12,Acme Foods Store 12,55 Main St,Suite 100,Fresno,CA,93721,US,1,SKU-001,240,case
SO-10482,OAK1,outbound,2026-11-03,,ACME,Acme Foods,,,,,,,,,ACME-12,Acme Foods Store 12,55 Main St,Suite 100,Fresno,CA,93721,US,2,SKU-002,4,pallet
```

A file can also contain only inbound or only outbound orders. Leave out the columns you don't use.

### How Owlery Handles Your File

> **File format**
>
> * UTF-8, comma-delimited, with standard CSV quoting ([RFC 4180](https://www.rfc-editor.org/rfc/rfc4180)). Wrap any value that contains a comma in double quotes.
> * A header row is required. Headers aren't case-sensitive, and the alternate names listed in each table are accepted.
> * Columns Owlery doesn't recognize are ignored.
> * Owlery moves processed files out of `inbound/`.

> **Resending an order**
>
> Each file is a complete picture of the orders it contains. Resending an order replaces it, including its line items. Resending an order with no line rows clears its earlier lines.

> **Errors**
>
> Problems are handled one order at a time, so one bad order doesn't block the rest of the file. Your facility's IT contact receives a rejection email for each order that couldn't be loaded.

> **Order and line item rules**
>
> * If an order appears on several rows, the first row's `Notes` value is used.
> * If you include any line item column, then `Line Number`, `SKU`, and `Quantity` are all required. An order with no line item columns at all is valid.
> * A duplicate `Line Number` within an order replaces the earlier line.
> * `Unit of Measure` accepts common names and abbreviations (`each`/`ea`, `case`/`cs`, `pallet`, `pack`, `tray`, and so on). Unrecognized units default to `each` with a warning.

> **Trading partner and location rules**
>
> * On an inbound order, the trading partner is stored as the order's supplier. On an outbound order, it's stored as the customer.
> * **Ship From** columns are ignored on outbound orders, and **Ship To** columns are ignored on inbound orders.
> * A blank `Ship From Name` or `Ship To Name` defaults to the `Trading Partner Name`.
> * If you include any address field, city and state are required.
> * Include `Trading Partner Code`, `Ship From Code`, and `Ship To Code` so each partner and location maps to one stable record instead of creating duplicates.

## Getting SFTP Credentials

To get a login for Owlery's SFTP server, email Owlery Support at [support@owlery.ai](mailto:support@owlery.ai). We'll send your credentials and connection instructions, and confirm your first file loads correctly.

## FAQ

### How Often Can We Send Files?

As often as you like. Owlery picks up every new file in `inbound/`, so you can send on a schedule, whenever orders change, or both.

### Can We Send a Different CSV Format?

If your system can't produce the template, let [Owlery Support](mailto:support@owlery.ai) know what you can export and we'll see what we can do to work with you.

## Related Settings

* [Set up your facility profile](/facilities/facility-profile.md): `Facility Code` must match a facility configured here.


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