# SFTP Sales Channel ### 1. Overview The SFTP (Secure File Transfer Protocol) channel lets you exchange data by dropping CSV files on a secure server. It’s ideal if you prefer file-based workflows instead of APIs. --- ### 2. Features - **Four File Types**: Orders, Products, Inventory, Fulfilments - **Automatic Processing**: Files are processed on a schedule - **Secure Transfer**: All data moves over SFTP - **Column Mapping**: You can map your own column names - **File Tracking**: Processed files go into a `processed/` folder and get a timestamp suffix - **Error Handling**: Errors are logged for you to review under channel transactions --- ### 3. Setup #### 3.1 Basic Configuration You will need to supply these details when you add the SFTP channel in your system settings: - **Host** (e.g. `sftp.example.com`) - **Port** (usually `22`) - **Username** - **Password** - **Base path** (optional; defaults to `/`) #### 3.2 Directory Structure When you connect, the system creates these folders automatically under your base path: ``` / ├── orders/ │ └── processed/ ├── products/ │ └── processed/ ├── inventory/ └── fulfilments/ ``` --- ### 4. File Guidelines - **Maximum lines**: 5,000 per file - **Format**: CSV (headers in first row) - **Filenames**: Any name is fine—just drop into the correct folder (orders, products, inventory, fulfilments) - **Processing order**: Oldest modified file first **Orders files with multiple items** - Repeat all order-level columns on each row - Fill in only the `item_`prefixed columns with that item’s data - Example: a 2-item order becomes 2 rows identical except for `item_` columns - **Import grouping**: The system will automatically group rows by `order_id`. **Fulfilments files with multiple items** - Repeat all non-`item_` columns on each row - Use the `item_`prefixed columns for each fulfilled item’s data - Example: a 2-item shipment becomes 2 rows identical except for `item_` columns --- ### 5. File Format Requirements #### 5.1 Orders Required columns: ``` order_id order_date customer_name customer_email shipping_address_name shipping_address_company_name shipping_address_line_one shipping_address_line_two shipping_address_city shipping_address_country_iso_code shipping_address_zip shipping_address_phone billing_address_name billing_address_company_name billing_address_line_one billing_address_line_two billing_address_city billing_address_country_iso_code billing_address_zip billing_address_phone item_price_currency item_discount_currency item_discount_tax_currency ``` #### 5.2 Products Required columns: ``` product_id product_alt_id sku ``` #### 5.3 Inventory Required columns: ``` product_id product_alt_id sku quantity ``` #### 5.4 Fulfilments Required columns: ``` order_id tracking_number courier item_id item_product_sku item_quantity ``` --- ### 6. Sync Intervals By default, the system checks for new files at these intervals. You can change them per channel if you need to.
File Type | Interval |
---|---|
Orders | 180 seconds (3 min) |
Products | 43 200 seconds (12 h) |
Inventory | 300 seconds (5 min) |
Fulfilments | 300 seconds (5 min) |