Skip to content

Developer reference

Import and export price tables with CSV

Use product-specific headings, stable choice IDs and complete replacement semantics.

PressFlow 1.25.3 · 3 min read

Guide source reviewed for PressFlow 1.25.1.

CSV tools are under Print product setup → Advanced: import or export price tables. The normal guided grids are preferable for routine edits. A validated CSV import replaces the saved tables directly; it is not only a private draft operation.

Safe round trip

  1. Save any field/choice edits first.
  2. Export the current tables as a backup.
  3. Download that product's blank template. Its headings include the current field IDs.
  4. Add complete intended table rows using raw numeric values and stable choice IDs.
  5. Upload through Validate and import tables.
  6. Confirm validation, then run ordinary price checks and wider coverage against the imported result.

If import is rejected, the old tables are retained. A successful import replaces all saved tables in the supplied configuration; fields, rules and other settings remain. Do not provide only one amended row expecting an append/merge.

Headings and cells

Required headings are table,price,width_min,width_max,height_min,height_max,copies, plus every current field ID. Order can vary, but no heading may be missing, additional or duplicated. Use the freshly exported template rather than copying another product's header.

Prices and dimensions are finite nonnegative numbers with a decimal point, no currency symbol or thousands separators. Price is required. Blank dimension boundaries are treated as zero. Blank condition cells mean any choice; nonblank field values must match the configuration's internal IDs/validated values.

For quantity/matrix pricing, the price is the stored complete-job table amount before extras/adjustments. For bands, it is the configured band amount per copy. The table must be referenced by the configuration/rules intended to use it.

Example for a product with no extra fields

table,price,width_min,width_max,height_min,height_max,copies
standard,45,0,0,0,0,100
standard,75,0,0,0,0,250
standard,110,0,0,0,0,500

This example header is insufficient for a product with fields such as stock or sides: add exactly the columns its exported template includes. The pack's example CSV files are illustrative, not universal import files.

For size bands, nonzero minimum boundaries are exclusive and nonzero maximum boundaries inclusive after dimension rounding. Check exact boundaries and the next supported increment. A zero maximum leaves that row's dimension unbounded; the product's outer dimension limits still apply. Explicit bounded bands are easier to review.

Limits and spreadsheet handling

Imports are bounded to a file smaller than 5 MB and bounded row processing. Exported cells with formula-leading characters are escaped to reduce spreadsheet formula interpretation. Treat CSV as data: do not remove safety escapes blindly or execute imported content.

Keep a backup and avoid concurrent edits. The importer checks that the source configuration has not changed while reading, validates through the schema and retires stale draft state. A valid file format still needs commercial price review and coverage checks.

Related: Quantity tables, Custom-size pricing, Drafts/saving.

Example files

Reference examples for adapting to your shop. PHP examples are not plugin installers; review the guide and replace sample IDs before using them.

Need a hand?

Contact the PressFlow team with details of what you are trying to do.