SFTP Import format
This page specifies every file your export sends to Monk. For how the integration works, see File integration (SFTP), and for how to connect and authenticate, see Connecting. If your ERP can’t produce these formats, talk to your Monk contact.Folders and file names
Upload every file of a batch directly into the inbound folder, with no
subfolders. Every file name is lowercase and starts with the batch’s timestamp
and
batch_id:
- CSV files are named
<timestamp>_<batch_id>_<file>, where<file>is one of the names in Files you send. Leave out files you do not send. <timestamp>is the manifest’sgenerated_atin UTC, asyyyymmdd-hhmmss, and is the same for every file in the batch.- Invoice PDFs are named
<timestamp>_<batch_id>_<pdf_file>, where<pdf_file>is the value in that invoice’spdf_filecolumn. Upload a PDF only in the batch where it is new or changed, not in every batch. <timestamp>_<batch_id>_manifest.csvis uploaded last. Monk processes nothing in the batch until it arrives.- A
batch_iduses only lowercase letters, digits, and hyphens, and is never reused. File names are case-sensitive, so a name with uppercase letters is not picked up.
File conventions
- CSV (RFC 4180), UTF-8, comma-delimited, with a header row using the exact
column names in this guide. A byte-order mark at the start of a file is
ignored; a file that is not valid UTF-8 rejects the batch. Fields may contain
line breaks inside quotes, and
rowsin the manifest counts records, not lines. - A manifest can be at most 1 MiB, a CSV at most 100 MiB, and an invoice PDF at most 10 MiB. Monk rejects a larger file before reading its contents.
- Do not open and re-save files in a spreadsheet such as Excel before uploading: it rewrites dates and strips leading zeros from IDs.
- Monk reads columns by their header name, so columns can be in any order.
Optional columns can be left out of the header. Omitting a column has the
effect described for that column (for example,
pause_invoicesandinvoice_via_portalkeep the setting chosen in Monk). Conditionally required columns, such asexchange_rate, can be omitted only when no row in the file meets their condition. - Columns not in this guide are ignored and listed as warnings in the batch’s sync history, so you can export extra columns without breaking the import. A misspelled required column still rejects the batch, because the required column is missing.
- Within a
format_version, Monk only adds optional columns, so an export that works keeps working. A new required column, or a change to what a column means, comes with a newformat_version. - Booleans as
trueorfalse, in lowercase. A required boolean is never blank. - Dates as
YYYY-MM-DD. - Amounts as decimals in major units with a dot, such as
1234.50, with no currency symbols or thousands separators. Amounts are positive unless a column says otherwise. - Invoice amounts must be below 21,474,836.47 in Monk-supported currencies with 2 decimal places.
- Currency as a Monk-supported ISO 4217 code with 2 decimal places in
invoices.csv. Payments and credit memos are stated in the currency of the invoice they apply to. When a document’s currency differs from the entity’s functional currency, you can includeexchange_rate: units of functional currency per one unit of document currency. Leave it blank if your export does not have it. - Amounts cannot have more than two fractional digits. Excess precision rejects the row.
- IDs are your ERP’s internal identifiers: stable for the life of the record,
never reused, unique within an
entity_code, up to 255 characters, case-sensitive, and without:or|. invoice_numberis the number printed on the invoice, exactly as your customers see it. Monk matches it against payment references.- Send only posted documents. Leave out draft invoices, invoices awaiting approval, and payments that have not posted to your ledger, such as ones awaiting approval.
entity_codeon every row identifies the legal entity or business unit. Monk maps each code to the right Monk organization during setup. Single-entity customers send one constant value. Entity codes use only letters, digits, and hyphens, and must stay unique when lowercased, because they appear in lowercase in Monk’s file names; Monk checks this when mapping them during setup.- Lists, such as
tags, are pipe-separated:key-account|EMEA.
Batches and the manifest
Each export is a batch: a set of files followed by a manifest, named as in Folders and file names. Monk processes nothing until the manifest arrives and every file matches it. The manifest lists exactly the files you send, and every file it lists must arrive and match it. Every batch is a complete snapshot: every open invoice for the listed entities, plus invoices closed in the last 60 days, and everything related to them. A batch must also include every file needed by the products switched on for your connection. Leave a file out only when no product on for your connection uses it, such ascontacts.csv for a Cash App-only connection. A batch that leaves out a
needed file is rejected, even when its manifest matches the files that arrived.
The manifest has one row per file in the batch, including invoice PDFs. The
batch columns repeat on every row and must be identical; a manifest whose rows
disagree rejects the batch.
A rejected or incomplete batch blocks nothing. Fix the export and send it again
as a new batch, with a new batch_id and generated_at.
Files you send
Cash App needs each invoice’s full payment history. Cash App is switched
on for your connection during setup. From then on, Monk computes every balance
from the payments and credit memo applications you send, and every batch
must include
payments.csv and credit_memos.csv, with only the header row
if there is nothing to send. Send all of them for each invoice in
invoices.csv, including payments made before Monk was connected, not only
recent ones. An application missing from a batch, on an invoice the batch
includes, is treated as removed.customers.csv
If you leave out
pause_invoices or invoice_via_portal, Monk keeps the
setting your team chose in Monk. If you send them, your ERP sets them, except
for a customer whose setting your team changed in Monk: that change takes
precedence over the file.
contacts.csv
Send the complete contact list in every batch. A contact missing from it is
removed.
Monk treats every contact as a billing contact and addresses collection emails
to it. The file has no role or recipient column. A customer with no contact that
has an email gets no collection emails, so send at least one for every customer
you want Monk to chase.
Send only the contacts who should receive collection emails, such as your
customer’s accounts payable contacts.
invoices.csv
If your ERP splits an invoice into installments, send one row per installment
with its own
invoice_id, the shared invoice_number, and that installment’s
amounts and due date. Otherwise Monk treats the whole open balance as due on one
date. Applications in payments.csv and credit_memos.csv refer to an
installment by its invoice_id.
Whether Monk sends the first invoice email or only follows up on invoices you
have already delivered is a setting for the whole connection, chosen during
setup.
How Monk uses open_balance:
- Collections only, Monk trusts
open_balanceand records the paid portion as settled in your ERP. Collections works; Cash App does not. - With Cash App on, Monk computes each balance from the payments and credit
memos you send, plus
other_applied_amount. Sendother_applied_amountfor anything else that settled part of the invoice in your ERP, such as a journal entry or a write-off without a payment; otherwise an invoice closed that way stays open in Monk, and keeps receiving collection emails. If Monk’s balance still disagrees withopen_balance, Monk keeps its own balance and records the difference for review. - Missing invoices: an invoice that disappears from a batch stays as it
was in Monk. Send a cancelled invoice with
statuscancelled, and keep paid and cancelled invoices in the file for 60 days from the date they were paid or cancelled, so Monk sees them close. If your ERP reverses an invoice with a credit memo instead of cancelling it, keep the invoiceopenand send the credit memo application incredit_memos.csv.
Invoice PDFs
Upload an invoice’s PDF, and list it in the manifest, only in the batch where it is new or changed. In later batches, keep the samepdf_file value on the
invoice’s row without uploading the file again; Monk keeps the PDF it already
has. To replace a PDF, upload the new one in a batch, under the same name or a
new one. A blank pdf_file never removes a PDF Monk already has for the
invoice; your team removes one in Monk. pdf_file names are unique within a
batch, PDFs are at most 10 MiB, and a file that is not a PDF rejects the batch.
If a pdf_file names a PDF Monk does not have, the invoice still imports, with
a warning, and Monk shows the PDF as unavailable until a batch includes it.
payments.csv
Echo the exact
monk_payment_id for every payment loaded from Monk. If it is
missing on an invoice with a retained, unechoed Monk payment, Monk leaves the
ERP payment unapplied and warns not applied until Monk's payment is confirmed; send monk_payment_id in payments.csv. Monk does not guess which payment it
represents.
An ERP payment held because it duplicates a Monk payment is applied once that
Monk payment is echoed. If a Monk payment is never echoed, Monk surfaces it in
Sync Review as not_confirmed after three exports and in the
unconfirmed-payments monitor.
Keep a voided payment in every batch for 60 days after the void, with
voided true on its rows, as you would a paid or cancelled invoice. An
application that disappears from a batch without voided, on an invoice the
batch still includes, such as one your team moved to another invoice, is
treated as unapplied.
Cash on account
Monk only imports cash once it is applied to an invoice. Rows withunapplied
true confirm cash that Monk itself left on account, through their
monk_payment_id; Monk ignores other cash on account until your team applies
it to an invoice, when it arrives as an ordinary application.
credit_memos.csv
Send only credit memos applied to an invoice. A credit memo not yet applied to
anything is left out until your team applies it.
invoice_lines.csv
entity_code, invoice_id, line_type (product, tax, or discount),
item_name, description, quantity (up to 3 decimals), unit_price, and
line_amount.
Monk identifies a line by its position among the invoice’s rows, as it does for
NetSuite, so send each invoice’s lines in the same order in every batch, such as
your ERP’s line number order.
Lines and pdf_file are both optional. If you send neither for an invoice,
Monk shows the invoice to your customer as a single line for total_amount.
Example
Validation
Every batch appears in Monk’s sync history with the rows accepted and rejected,
any warnings, and a downloadable error report. During setup, upload test batches to validate
your export without importing anything.