WFDASH-WEBAPP/docs/pocketbase
SJCoetz 81c9f64158 feat(pricelist): notes field for AI instructions + file_name on upload
Operators can now type per-upload instructions for the AI extraction
step in the Pricelist upload form. The notes go into a new
`raw_price_list.notes` field that the n8n workflow reads and
injects into the LLM user message as per-upload context.

Common uses:
  - "Brand is JEI" → AI stamps every item with brand="JEI"
  - "Apply 30% markup" → Code node regexes this out for selling_price
  - "All prices in ZAR excl. VAT" → AI uses ZAR
  - "Page 4 has discount codes" → AI skips those rows

Also auto-populates `raw_price_list.file_name` (the original
browser-side filename) on upload — PB slugifies the upload to a
token stored inside supplier_file, so without this field the
operator saw the slugged version. Existing rows backfilled by the
admin script.

The `log_summary` field is now reserved for the AI's write-back
summary (set by the n8n workflow after extraction). It was
previously operator-editable on the form, which was wrong —
overwriting it clobbered the AI's output.

New migration: scripts/migrations/2026-06-30-add-pricelist-notes.ts
(idempotent, only adds `notes` if missing — `file_name` was
added manually via the PB admin UI before this commit).

doc/pricelist-extraction.md updated with the n8n LLM user message
shape, the markup regex, and the notes field's role in the pipeline.
2026-06-30 11:09:27 +02:00
..
collection_pool.collection.json chore: standardize line endings and add full test + config scaffolding 2026-06-11 20:30:02 +02:00
delivery_note_items.collection.json Add PocketBase collections, APIs & migration docs 2026-05-25 18:39:33 +02:00
delivery_notes.collection.json Add PocketBase collections, APIs & migration docs 2026-05-25 18:39:33 +02:00
order_items.collection.json chore: standardize line endings and add full test + config scaffolding 2026-06-11 20:30:02 +02:00
order_items_v2.collection.json chore: standardize line endings and add full test + config scaffolding 2026-06-11 20:30:02 +02:00
quote_attachments.collection.json feat: add quote templates, improved email, new statuses 2026-06-24 22:57:01 +02:00
quote_counters.collection.json feat(quotes): add email-to-quote pipeline with attachments and replies 2026-06-16 20:46:28 +02:00
quote_replies.collection.json feat(quotes): add email-to-quote pipeline with attachments and replies 2026-06-16 20:46:28 +02:00
raw_price_list.collection.json feat(pricelist): notes field for AI instructions + file_name on upload 2026-06-30 11:09:27 +02:00
repairs.collection.json Add PocketBase collections, APIs & migration docs 2026-05-25 18:39:33 +02:00
wfdash_workflow_collections.import.json Add PocketBase collections, APIs & migration docs 2026-05-25 18:39:33 +02:00