Sales
Importing quotes and invoices
Bring existing documents, contacts and number series in from another system.
View as MarkdownIf you are switching to Borkol from another quoting or invoicing system, your existing documents don't have to start from zero. The import brings over document types, contacts, quotes, invoices, payments and number series from a single JSON export, so your numbering continues where the old system left off instead of restarting at 1.
There is no self-service import screen for this yet: Borkol support runs it for you from a JSON file you (or your old system) produce.
How it works
Support runs php artisan sales:import {tenant} {file} against the export. Add --dry-run first to validate the file and see how many rows of each kind would be imported, without writing anything — the run always rolls back and never stores media in a dry run. A real run either imports everything in the file or nothing at all: any row-level error (a total that doesn't add up, an unknown number series, a rejected image or PDF source) rolls the whole import back, and the command reports every error by its location in the file (for example quotes[0] (q-1).total_amount: …).
The import is idempotent on external_id: running the same file twice, or a file with new rows appended to an earlier one, skips anything already imported and only adds what's new.
What the file contains
The export is one JSON document with five optional top-level arrays:
| Key | What it holds |
|---|---|
document_types[] | The named number series prefixes your old system used |
contacts[] | Customers, each with an external_id and typed addresses |
quotes[] | Quotes, with their lines, scope items and (optionally) a signature |
invoices[] | Invoices and credit notes, with their lines and payments |
series[] | The counters to seed so new numbers continue where the old ones stopped |
Contacts
Each contact carries a real name, optional company fields, and an external_id you assign — the same value used to match this contact against quotes and invoices in the same or a later file. Addresses are typed billing or work, matching the two address kinds a quote or invoice can reference.
Quotes
Each quote carries its number, status, dates, lines and scope items, plus its own external_id. A quote can also carry a signature_url and signed_pdf_url (for an accepted quote that was signed) and up to the usual photo limit as photos[] — all given as URLs that get fetched and stored in Borkol on import. A draft quote is never given a number by the import, matching how a draft never has one in the live system.
Invoices
Each invoice carries its number, whether it is an invoice or a credit_note, its status, dates, lines and any payments already recorded against it. A credit note references the invoice it corrects.
Series
Each entry names a scope (quote, invoice or credit note), optionally a specific document type, the accounting period it applies to, and the highest value already issued in that period. After the import, the live numbering picks up from the number right after that value — nothing is renumbered and no gaps are introduced.
Media
Signatures, signed PDFs and invoice PDFs referenced by URL are downloaded and stored the same way a document generated inside Borkol is stored; quote photos are added to your media library like any other upload. Only ordinary public web addresses are accepted as sources — private, local or otherwise unreachable addresses are refused.