Skip to content
B2B demo
Quick login
Demo accounts Plugins Architecture Technical proof
Demo menuFull demo menu
Professional supplies · Prices excl. VAT · Dedicated account manager
B2B demonstration e-shop Fictitious data, no order fulfilled, no real payment. Learn more

Flat-file exchange

The flat-file export plugin writes the placed orders to a CSV file, according to a documented contract, in an exchange directory that a business system can read. This page shows the contract and an excerpt of a file produced from the latest orders of the demonstration.

The contract is neutral: the plugin connects to no business software and names none. The excerpt below is produced by the plugin itself, with masked addresses.

The contract of the file

A header line, then one line per order line.

  • UTF-8 encoding, without a byte order mark.
  • Semicolon separator; a field that contains a semicolon is enclosed in quotes.
  • One line per order line, each ending with a line break.
  • Amounts as integers in the minor unit of the currency, with no decimal point.
  • One file per batch, with a unique name: orders, UTC date and time, then eight characters.
  • order_number

    Number of the order.

  • webhook_id

    Id of the outbox event: the idempotence key on the reader side.

  • placed_at

    Date of the end of the checkout, in UTC.

  • currency

    Currency code of the order.

  • customer_email

    Address of the customer (masked in this excerpt).

  • variant_code

    Code of the product variant.

  • quantity

    Quantity ordered.

  • unit_price_minor

    Unit price, in the minor unit.

  • line_total_minor

    Total of the line, in the minor unit.

  • ship_country

    Country code of the shipping address.

An excerpt of a file

The first lines of the last file really produced by the plugin from the orders of the demonstration, for the channel shown (addresses masked).

order_number;webhook_id;placed_at;currency;customer_email;variant_code;quantity;unit_price_minor;line_total_minor;ship_country
000000015;01a239a1-958c-74ae-8efe-840c949082c8;2026-11-24T09:00:00Z;EUR;h***@globalmaint.example;EPI-GANT-001;20;1178;23560;FR
000000012;01a239a1-958c-7262-8efe-840c943a48a5;2026-11-26T09:00:00Z;EUR;a***@buildco.example;EPI-CHAU-001;60;6291;377460;FR
000000006;01a239a1-958b-7d27-a7f5-8010007383ec;2026-11-29T09:00:00Z;EUR;c***@acme.example;EPI-CASK-001;40;1588;63520;FR

Running it

A console command writes one batch; schedule it at the rhythm the reader reads the directory.

bin/console tmonier:erp-flatfile:export-orders

  • The file is written under a provisional name then renamed: a reader never sees a partial file.
  • Each event is exported once; delivery is at least once, the reader deduplicates on the event id.
  • If the directory is missing, not writable or full, no file is left behind, the error is logged and the events stay to export.
  • The plugin does not purge the directory: the retention of the files, which hold addresses, is set by the operator.

The whole journey, with the Demo ERP (fictitious) that sends back a simulated acknowledgement: the documentation (new tab)

Back to the integration guide