ml-connector
AcumaticaSFTP / Flat Files

Acumatica and SFTP / Flat Files integration

Acumatica runs finance, distribution, and operations through a modern REST API. SFTP / Flat Files is the transport used by trading partners and older systems that exchange data as files instead of API calls. Connecting the two lets Acumatica trade documents with any partner that only speaks CSV, fixed-width, or X12 EDI over SFTP. ml-connector reads and writes Acumatica records and turns them into files, and parses inbound files and posts them into Acumatica, handling the very different authentication and data shapes on each side.

How Acumatica works

Acumatica Cloud ERP exposes vendors, bills, purchase orders, payments, GL accounts, and journal transactions through its Contract-Based REST API. Each instance has its own URL and a version-locked endpoint path, such as /entity/Default/24.200.001/, that must exactly match the customer's ERP release or the call returns 404. All field values are wrapped in value objects, and entity names are case-sensitive. Authentication is OAuth 2.0 through the built-in OpenID Connect server, or a legacy login session cookie. There is no native bulk endpoint, so reads and writes loop over individual calls; the common change-detection pattern is polling on LastModifiedDateTime with OData $top and $skip.

How SFTP / Flat Files works

SFTP / Flat Files is not a product with an API. It is a pull-only file-transfer transport over SSH on port 22, where structured files are exchanged through a folder layout such as /inbound, /outbound, /processed, and /acks. File formats include CSV, fixed-width, X12 EDI, EDIFACT, and XML, and the column or segment layout is defined per trading partner. Authentication is an SSH key pair, with the connector's public key registered on the server, or a username and password fallback; the server host key should be pinned to prevent interception. There is no push mechanism, so new files are discovered by polling the inbound folder on a schedule.

What moves between them

Data moves in both directions. Outbound, ml-connector reads Acumatica records such as purchase orders, bills, or payments over REST and writes them as CSV or X12 EDI files into the partner's outbound folder. Inbound, it polls the inbound folder, parses files such as X12 810 invoices, X12 850 purchase orders, or vendor and GL CSVs, and posts them into Acumatica as bills, purchase orders, or journal transactions. Vendor and account reference data is aligned so each file line maps to a valid Acumatica record. Cadence is the configured poll interval, typically every 5 to 60 minutes, plus scheduled outbound runs.

How ml-connector handles it

ml-connector stores both credential sets encrypted: Acumatica OAuth tokens on one side, and the SSH private key or password on the other, presenting the key during the SSH handshake and verifying the server host key to block interception. On the Acumatica side it accepts the full instance URL and the exact endpoint version per customer, since a version mismatch returns 404, and it wraps every field value in the required value object so writes do not fail with a 400. Because SFTP has no push, it polls the inbound folder on a schedule, lists new files, and skips ones already handled using a processed-files log keyed on filename and content hash, since file timestamps are unreliable across timezones. Partial uploads are detected with a sentinel file or a two-read size check before parsing. Each inbound file becomes Acumatica records mapped to the partner's column or X12 segment layout, with vendors and accounts aligned first so every line references a record that already exists. For X12 traffic it produces a 997 acknowledgment in the /acks folder. Outbound filenames are deterministic so a retried run does not create duplicates, and every record carries a full audit trail and can be replayed if a call fails.

A real-world example

A mid-sized manufacturer with around 250 staff runs Acumatica Cloud ERP for purchasing and finance and sells to two large retailers that require X12 EDI over SFTP. Before the integration, a clerk pulled each retailer's purchase order off the SFTP server, keyed it into Acumatica by hand, and later exported the matching invoice to a spreadsheet to upload back, which was slow and error-prone at month-end. With Acumatica and SFTP / Flat Files connected, inbound X12 850 purchase orders post into Acumatica automatically and outbound X12 810 invoices are written to each retailer's folder on schedule, with a 997 acknowledgment returned for every file. The manual re-keying is gone and chargebacks from late or malformed EDI drop off.

What you can do

  • Write Acumatica purchase orders, bills, and payments to the partner's SFTP folder as CSV or X12 EDI files.
  • Poll the inbound folder, parse files, and post them into Acumatica as bills, purchase orders, or journal transactions.
  • Bridge Acumatica OAuth with SSH key or password authentication, pinning the server host key against interception.
  • Pin the exact Acumatica endpoint version and wrap field values so writes never fail with a 404 or 400.
  • Deduplicate inbound files, detect partial uploads, return X12 997 acknowledgments, and keep a full audit trail with replay.

Questions

Which direction does data move between Acumatica and SFTP / Flat Files?
Both directions. Outbound, ml-connector reads Acumatica records and writes them as CSV or X12 EDI files into the partner's folder. Inbound, it polls the partner's folder, parses incoming files, and posts them into Acumatica as bills, purchase orders, or journal transactions. Vendor and account reference data is aligned so each file line maps to a valid Acumatica record.
How does the integration detect new files without webhooks?
SFTP is pull-only and has no push mechanism, so ml-connector polls the inbound folder on a schedule, typically every 5 to 60 minutes. It skips files it has already handled using a processed-files log keyed on filename and content hash, since file timestamps are unreliable across timezones. It also checks for partial uploads with a sentinel file or a two-read size comparison before parsing, so a half-written file is never imported.
How does it handle Acumatica's version-locked URL and field wrapping?
ml-connector accepts the full Acumatica instance URL and the exact endpoint version per customer, since a version mismatch returns a 404. It also wraps every field value in the value object Acumatica requires, so records post without a 400 error. There is no bulk endpoint, so each record from a file is written in its own call while respecting the instance's per-minute request limit.

Related integrations

Connect Acumatica and SFTP / Flat Files

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started