ml-connector
QADSFTP / Flat Files

QAD and SFTP / Flat Files integration

QAD runs manufacturing, procurement, and finance. SFTP / Flat Files is the realistic path for trading partners and older systems that exchange data as files instead of through an API. This connection moves purchase orders, supplier invoices, vendor masters, and GL journal entries between QAD and partner SFTP folders as CSV, X12 EDI, EDIFACT, or fixed-width files. ml-connector polls the server, parses each file into a canonical shape, and writes it into QAD, and produces outbound files in the format the partner expects. Records are deduplicated by filename and content hash so nothing is imported or sent twice.

How QAD works

QAD Adaptive ERP exposes suppliers, purchase orders, supplier invoices, GL accounts, cost centers, items, goods receipts, and AP payments through REST business document APIs, documented in Swagger inside each customer instance. The cloud product authenticates with a JWT session or OAuth2 bearer token against a tenant-specific URL, so there is no shared hostname or public sandbox. Older on-premise sites run QAD Enterprise Edition with the QXtend SOAP framework, where QXI handles inbound documents and QXO pushes outbound events. QAD cloud has no native webhook system for connectors, so finance records are read by polling.

How SFTP / Flat Files works

SFTP / Flat Files is not a product but a transport pattern. Data is exchanged as CSV, fixed-width, X12 EDI, EDIFACT, or XML files over SFTP on TCP port 22, using SSH key authentication (preferred for automation) or a username and password. There is no request and response API: the connector polls an inbound folder, downloads new files, and writes outbound files to a partner folder. Standard folders separate inbound, outbound, processed, error, and acknowledgment files. The transport is pull-only with no webhooks, and X12 workflows use 997 functional acknowledgment files to confirm receipt.

What moves between them

Files flow in both directions. Inbound, ml-connector reads partner files from the SFTP inbound folder and writes them into QAD as purchase orders (X12 850 or CSV), supplier invoices (X12 810, EDIFACT INVOIC, or CSV), vendor masters, and GL journal entries (CSV or fixed-width). Outbound, it reads QAD records and produces files in the partner format, deposited in the outbound folder for pickup. Reference data such as suppliers, items, and cost centers is aligned so inbound documents reference codes that already exist in QAD. Polling runs on a fixed schedule, typically every 5 to 60 minutes, since neither side pushes.

How ml-connector handles it

ml-connector stores both credential sets encrypted: the SFTP private key or password on one side and the QAD tenant token on the other. For QAD it accepts the full tenant instance URL per customer, since QAD publishes no shared base address, and refreshes the bearer token when a call returns 401. Because both SFTP and QAD cloud are pull-only, a scheduled job connects over SSH, lists the inbound folder, and downloads files the connector has not seen before, tracked by filename plus content hash in its own database and by moving handled files to the processed folder. Each file is parsed against a per-partner mapping spec, since column order in fixed-width files is positional and X12 segment layouts vary, then mapped to QAD suppliers, purchase orders, supplier invoices, or GL entries. QAD runs a three-way match, so goods receipts must post before an inbound supplier invoice will match its purchase order. Edge cases handled include partial uploads detected with a sentinel file or a second size check, CRLF and LF line endings, encoding differences, and X12 delimiter characters in vendor names. Inbound X12 files get a 997 acknowledgment written back, and failed records carry a full audit trail and can be replayed.

A real-world example

A mid-sized contract manufacturer runs QAD Enterprise Edition on-premise and supplies several large retailers that mandate X12 EDI over SFTP. Before the integration, a clerk downloaded purchase orders from each retailer's SFTP portal, keyed them into QAD by hand, then built invoice files in a spreadsheet and uploaded them back, often missing the 997 acknowledgment and not noticing a rejected invoice until payment was late. With QAD and SFTP / Flat Files connected, inbound 850 purchase orders post into QAD automatically and outbound 810 invoices are generated from QAD and dropped in each partner folder, with acknowledgments tracked. The manual download, re-keying, and spreadsheet steps are gone, and rejected files surface immediately instead of weeks later.

What you can do

  • Read partner purchase orders, supplier invoices, and vendor masters from SFTP and write them into QAD.
  • Export QAD records as CSV, X12 EDI, EDIFACT, or fixed-width files into the partner outbound folder.
  • Authenticate SFTP with an SSH key or password and QAD with its tenant-specific token.
  • Deduplicate by filename and content hash and produce 997 acknowledgments for inbound X12 files.
  • Poll on a schedule and respect QAD three-way match so receipts post before matching invoices.

Questions

How does the integration move data when SFTP has no API and QAD cloud has no webhooks?
Both sides are pull-only, so ml-connector runs a scheduled job rather than waiting for a push. On each cycle it connects over SSH, lists the inbound folder, downloads new files, parses them, and writes the records into QAD through its business document API. Outbound, it reads QAD records and writes files to the partner folder for pickup.
How does ml-connector avoid importing the same file twice?
SFTP has no idempotency at the protocol level, so the connector enforces it. It tracks each handled file by filename plus content hash in its own database, and moves processed files to a separate folder where write permission allows. If a poll fires twice or a file reappears, the already-seen file is skipped instead of re-imported.
Does QAD's three-way match affect inbound supplier invoices from a partner?
Yes. QAD matches a supplier invoice against the purchase order and the goods receipt before it will post. If an inbound X12 810 or CSV invoice arrives before the receipt is recorded in QAD, the match cannot complete. ml-connector keeps the audit trail so a held invoice can be replayed once the receipt posts.

Related integrations

Connect QAD and SFTP / Flat Files

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

Get started