Filemaker Mcp
Search the build
-
d91bd912026-07-16 add scripts/fetch-clients.js — page entire Clients file to MCC staged dataset -
72102362026-07-16 chore: lint, refactor, v0.2.3 (session close) -
8e0d01f2026-07-16 auto-save: 2026-07-16T09:42:29 (1 files) — scripts/audit-clients.mjs -
96da4962026-07-16 Harden client dedup + add read-only single-order test -
de6eb812026-07-16 Fix client double-entry + Company/Name field swap in Shopify→FileMaker sync -
65eb72c2026-07-14 fix: idempotency guard — skip invoice creation when FileMaker already has one for this Cust PO (order#) -
aa0cddd2026-07-14 fix: resolve George basic-auth from live fleet cred (was empty 'admin:', 401'd since 2026-07-13 rotation → froze Shopify→FileMaker sync at order #32600) -
22d9eff2026-07-14 Add Greenland cork disco script: stamps Date Discontinued on 15 WALLPAPER masters (recId 536960-536974) 2026-07-14 -
9f680a32026-07-12 auto-save: 2026-07-12T19:19:48 (1 files) — scripts/bulk-create-greenland-full.mjs -
c542aa62026-07-12 auto-save: 2026-07-12T08:47:12 (2 files) — scripts/bulk-series-dwgl-to-dwlg.mjs scripts/bulk-series-dwlg-to-cork.mjs -
c23bb052026-07-12 auto-save: 2026-07-12T08:17:05 (1 files) — scripts/bulk-set-dwnumber-fm.mjs -
b7ae2b72026-07-12 auto-save: 2026-07-12T07:46:59 (5 files) — scripts/_gl_recon.mjs scripts/_gl_recon2.mjs scripts/_gl_recon3.mjs scripts/bulk-create-greenland-cork.mjs scripts/bulk-series-cork-to-dwgl.mjs -
81207d42026-07-10 chore: v0.2.2 (session close — invoice mfr backfill + flag-on-unresolved) -
478c8b22026-07-10 invoice: backfill vid+mfr onto 158 pre-hook blank-mfr Otto invoice lines -
f8ad1882026-07-10 invoice: flag+notify (not swallow) SKUs with no findable mfr number -
4d2ed042026-07-10 wallpaper: resolve mfr# from flat metafields + vendor_catalog/registry tiers -
e138cce2026-07-10 invoice: wire WALLPAPER auto-complete into the live daemon path -
0c0536f2026-07-10 wallpaper: resolve legacy DWLK sku -> canonical DWSW via shopify sku mapping -
ea6b0922026-07-10 add lib/wallpaper.js — importable ensureWallpaper() for pipeline integration (wiring pending) -
01d9bff2026-07-10 add ensure-wallpaper-for-order: auto-complete FileMaker WALLPAPER master from dw_unified -
57039732026-07-09 invoice: all money on FIRST invoice, just the SKU on each subsequent -
f7c81062026-07-09 add watch-real-units-order.mjs — live watcher for next real order's per-line breakdown -
d9b2cbf2026-07-09 invoice: show real units + real per-unit price (not lumped Q1=1) -
fb3670b2026-07-08 chore: v-bump (session close — per-SKU invoicing fix + dup audit tooling) -
1b0bc8f2026-07-07 auto-save: 2026-07-07T13:00:27 (1 files) — scripts/watch-next-multisku.mjs -
f705ac92026-07-07 auto-save: 2026-07-07T09:29:44 (1 files) — scripts/watch-next-order.mjs -
4dd914e2026-07-07 invoicing: fix double-increment so per-SKU invoice numbers are consecutive (no gaps); verified live 3-invoice write test PASS -
bd4cd952026-07-07 invoicing: one record per SKU, only the FIRST carries the dollars (NET/RETAIL=order total, PAID=grand total); remaining SKU records $0 (Steve 2026-07-07). Tax+shipping ride the money record only; $0 records stay off #new-order via GRAND TOTAL 2=0 filter -
f903c3b2026-07-07 auto-save: 2026-07-07T08:57:11 (2 files) — scripts/tmp-probe-net.mjs scripts/tmp-probe-net2.mjs -
f3f47182026-07-07 auto-save: 2026-07-07T08:56:34 (2 files) — scripts/tmp-probe-net.mjs scripts/tmp-probe-net2.mjs -
7b8fa262026-07-07 add read-only dry-run pipeline test: proves 1-invoice-per-order + zero per-SKU dups on latest Shopify orders -
4b94f5f2026-07-07 audit: add --csv export (both categories, per-invoice rows) -
6a8406b2026-07-07 add read-only dup-invoice audit: group by Cust PO, split double-billing (money) vs $0 tracking clutter -
a19a17d2026-07-03 invoicing: require client account number before any invoice (client-account-first) + stop creating the duplicate per-SKU 'second invoice' -
83d84942026-07-03 chore: macstudio3 migration — reconcile from mac2 + repoint paths (stevestudio2→macstudio3, node/npm/npx→/opt/homebrew) -
1de62662026-07-03 sales summary: report trailing 24h window via seen-ledger diff (Steve 2026-07-03) -
70f934b2026-07-02 daily sales summary: move fire time 23:55 -> 16:30 (4:30 PM EOD report to #new-order) -
a4db9ca2026-07-02 chore: lint, refactor (shared fm-script-helpers), v0.2.0 (session close) -
fec41022026-07-02 add DWTA baxter dedup: archive+delete script for FM dup record 536613 -
700b05c2026-07-02 new-invoice-monitor: label booked sale vs unpaid quote (payment-received gate) -
7bf6a1d2026-07-02 sales-summary: count BOOKED orders only (payment received); add today's quotes (no payment) line — fixes $92k unpaid-quote inflating MTD -
4255ec92026-07-02 sales-to-Slack via FileMaker: EOD daily+MTD summary + per-invoice monitor + launchd timers (reuses fm-client; posts to #new-order) -
5a0d50e2026-07-02 auto-save: 2026-07-02T07:11:42 (1 files) — scripts/relookup-invoice-102387.mjs -
a231cf02026-07-02 add DWKK-120156 master (order 32513/inv 102387) + invoice probes; codify fuzzy-SKU rule -
bcf5e672026-07-02 chore: v0.1.1 (session close — Baxter records, invoice 102374 repair, fuzzy-sku-check) -
941cf7a2026-07-01 add fuzzy-sku-check.mjs: reusable WALLPAPER SKU existence probe (strips -Sample; combo sku/comboskuwithdash/mfr pattern number/Mfr Pattern; exit 0/1 + JSON) -
10f7a192026-07-01 invoice 102374 repair script: split Otto's collapsed 4-sample line into 4 proper lines (Fracchia / Shopify #32508); totals preserved 17+22=39 -
94f54872026-07-01 fix DWTT73434 (recordId 536611) Mfr Pattern AT79129->AT79126 + fill mfr pattern number (AT79129 belongs to 73436 Silver) -
9bad19a2026-07-01 create 3 missing DWTT Baxter WALLPAPER masters (73433 Navy/73435 Beige/73436 Silver) — recordIds 536615-17; combo sku + Dw Retail Price are calcs, omitted from write -
2412a372026-07-01 test: dummy client+invoice demo scripts (999999/Testy McTestface); fix script gains RETAIL cols via HDR layout; probe scripts for line-2/tax calc behavior -
7b9b08c2026-07-01 fix: fm_find/sort JSON-string coercion (harness stringifies z.any); invoice file live w/ Order Detail default; add invoice-102332 repair script -
1f3eaf82026-06-29 remove dead lib/invoice-core.js (orphaned from refactor; lib/invoice.js is the single source of truth) -
f9e757d2026-06-29 invoice: strip dashes in WC Pattern Number AKA DW SKU; write 'Resale card lookup' (the resale field shown on invoice) so it's no longer blank -
ea51d972026-06-29 sync: every order also creates one no-$ per-SKU tracking record with the DW SKU in 'WC Pattern Number AKA DW SKU'; verified 8/8 on order 32476 -
707cde72026-06-29 invoice: populate 'WC Pattern Number AKA DW SKU' from primary line base SKU -
7525e582026-06-29 fix: consolidate multi-item orders to single line (exact total), round cents, WC PATTERN=base pattern, delete API, Slack→#new-order, error-resilient runner; recovered 32476 ($34) -
1894d572026-06-29 auto-save: 2026-06-29T12:49:09 (2 files) — lib/invoice.js src/fm-client.js -
c4dc4402026-06-29 sync: refresh existing client's contact info from the order before invoicing (update client first, then invoice) -
e2e050f2026-06-29 sync: every new order now auto-creates client + full invoice (UOM/Otto/FedEx/tax/resale/SKU/WC PATTERN/sold-ship blocks) + posts to Slack #general -
b60dfd52026-06-29 sync: every order now auto-creates client + full invoice (Otto/FedEx/tax/resale/SKU/WC-PATTERN/paid) + Slack #general alert; invoice 102262 fully built per Steve specs -
8f367cd2026-06-29 auto-save: 2026-06-29T12:19:02 (5 files) — bin/shopify-sync.js lib/sync-core.js lib/invoice-core.js lib/invoice.js lib/notify.js -
cecc7802026-06-29 shopify->filemaker client sync: info@ trigger, 3-way dedup (email/phone/name), auto-create; created acct 1061931 live; launchd staged (not loaded) -
64709232026-06-29 live: connected to FileMaker Cloud — Clients + WALLPAPER reading; invoice pending fmrest; MCP registered -
2719a892026-06-29 initial scaffold: FileMaker Cloud MCP server + CLI (read + dry-run-gated writes)
Authors
- Steve63
- steve1
Agents used
Skills used
- /invoice4
- /tax4
- /wallpaper3
- /supplier3
- /name3
- /notify2
- /mfr2
- /vid2
- /tmp-probe-net2
- /tmp-probe-net22
- /invoice-core2
- /resale2
- /fetch-clients1
- /audit-clients1
- /test-one1
- /bulk-create-greenland-full1
- /bulk-series-dwgl-to-dwlg1
- /bulk-series-dwlg-to-cork1
- /bulk-set-dwnumber-fm1
- /bulk-create-greenland-cork1
- /bulk-series-cork-to-dwgl1
- /backfill-blank-mfr1
- /preview1
- /catch1
- /sku1
- /reason1
- /flagged-skus1
- /drain-flagged-skus1
- /shipping1
- /registry1
Creative ideas + design notes
7210236 · 2026-07-16 · chore: lint, refactor, v0.2.3 (session close)
- findDuplicates: rename inner accumulator e→entry (was shadowing catch(e)) - annotate best-effort client-refresh catch Author: steve@designerwallcoverings.com
96da496 · 2026-07-16 · Harden client dedup + add read-only single-order test
- findDuplicates now only swallows FileMaker 401 (no-records) as an empty result; any other find error is surfaced (per-order handler logs it) instead of silently returning no-match, which would double-enter the client - scripts/test-one.mjs: read-only (commit:false) single-order test proving the Company/Name split and live dedup without writing to FileMaker Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
de6eb81 · 2026-07-16 · Fix client double-entry + Company/Name field swap in Shopify→FileMaker sync
- Company field now holds the business name, Name holds the contact person (was reversed: put e.g. 'Denny Wilson' in Company, 'Wilson Construction' in Name) - Dedup rewritten as priority waterfall: email → company → client name, searching the correct fields (old code searched Company against the person's name, silently missing real dupes and creating second records) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
65eb72c · 2026-07-14 · fix: idempotency guard — skip invoice creation when FileMaker already has one for this Cust PO (order#)
Prevents the systemic double-billing (e.g. #32609). Dedup was local-only (state.processed[]); any re-process minted a duplicate invoice. Now checks FileMaker truth by Cust PO before creating. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
478c8b2 · 2026-07-10 · invoice: backfill vid+mfr onto 158 pre-hook blank-mfr Otto invoice lines
Steve-approved backfill of the pre-hook backlog (orders Otto invoiced before ensureWallpaper was wired at e138cce). scripts/backfill-blank-mfr.mjs finds all Otto-imported invoice lines with a blank Detail 1 Mfr Number, groups by distinct SKU, ensureWallpaper() once per SKU, then direct-writes VID + Detail 1 Mfr Number onto every matching line. --dry-run does a read-only resolve (no FileMaker writes) via the new exported resolveWallpaperSource(). Result: 167 blank-mfr lines -> 146 SKUs resolved, 158 lines updated, 3 SKUs FLAGGED and left blank (DWAT65011, XP5, a custom framed-art order — no findable mfr, per Steve's flag-don't-guess rule). Remaining blank: 9 (4 flagged-SKU lines + 5 blank-SKU money records) — the correct residue. lib/wallpaper.js: extract read-only resolveWallpaperSource() out of ensureWallpaper() so dry-run/preview callers get zero-write resolution. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
f8ad188 · 2026-07-10 · invoice: flag+notify (not swallow) SKUs with no findable mfr number
createInvoiceForOrder still creates the invoice line when ensureWallpaper
returns {ok:false} FLAGGED or throws (money must never be blocked by a catalog
data gap), but the outer catch{} no longer silently swallows it. New else/catch
branch calls lib/notify.js flagSku():
1. console.warn a loud single line (order/invoice/sku/reason).
2. idempotent append to data/flagged-skus.jsonl (key=orderId:invoice:sku;
stores ts,orderId,orderName,custPO,invoice,sku,dwSku,reason,resolved:false).
3. internal Slack (#general) + George email to steve-office — INTERNAL ops
signal only, never customer-facing.
Graft from DTD verdict C: scripts/drain-flagged-skus.mjs reads the queue, groups
unresolved rows by Cust PO, re-runs ensureWallpaper, writes VID+mfr onto matching
invoice lines (same copy-lookup write as ensure-wallpaper-for-order.mjs), and
marks rows resolved:true. --dry-run supported.
Fixes the silent-swallow that let 102660/102662 (Cust PO 32580) ship blank
vid/mfr unnoticed. Money/tax/shipping logic untouched.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4d2ed04 · 2026-07-10 · wallpaper: resolve mfr# from flat metafields + vendor_catalog/registry tiers
Invoices 102660 (DWBR170698) and 102662 (DWDX220241) had blank vid+mfr#
because their WALLPAPER master records were never created — ensureWallpaper's
sourceFor() couldn't find a mfr number:
- DWDX (Designtex): mfr lived in a FLAT metafield (custom.manufacturer_sku
= '8405252'), but SP_FIELDS only read the nested {value} shape.
- DWBR (Malibu private-label): absent from shopify_products entirely
(dw_sku null); real mfr 2999-39028 lives in vendor_catalog + dw_sku_registry.
Fixes:
- SP_FIELDS now COALESCEs nested (->'k'->>'value') AND flat (->>'k') metafields
for mfr/supplier/pattern/color/width.
- sourceFor() adds two universal fallback tiers: vendor_catalog (all scraped
vendors, joined to dw_sku_registry for a clean supplier name) and
dw_sku_registry (mfr+vendor backstop).
Ran ensure-wallpaper-for-order.mjs 32580: all 10 lines now carry vid+mfr#.
e138cce · 2026-07-10 · invoice: wire WALLPAPER auto-complete into the live daemon path
createInvoiceForOrder now calls ensureWallpaper(sku) per line — auto-creates/ completes the FileMaker WALLPAPER master from dw_unified and direct-writes VID + Detail 1 Mfr Number onto each line, so every NEW order's width/name/vid/supplier/ mfr lookups resolve at creation (no manual redo). Best-effort: wrapped so a WALLPAPER-completion failure never breaks invoicing. Verified end-to-end on a 2-sample order (DWTT70647 + DWKK134979 both fully resolve). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0c0536f · 2026-07-10 · wallpaper: resolve legacy DWLK sku -> canonical DWSW via shopify sku mapping
DWLK is a legacy Schumacher prefix; shopify_products maps old sku (DWLK-830880-Sample) -> canonical dw_sku (DWSW-5003662) + real mfr (5003662). ensureWallpaper sourceFor now tries dw_sku, then legacy sku/variant_sku (base-normalized), then connie. Also backfilled connie_our_catalog.mfr_sku for 912 DWLK rows from this mapping (backup: _bak_connie_dwlk_mfr_20260710; rollback list: _filled_connie_dwlk_mfr_20260710; 50 orphans remain). Refactored ensure-wallpaper-for-order.mjs to import lib/wallpaper.js. #32574 DWLK830880 now resolves mfr 5003662. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
01d9bff · 2026-07-10 · add ensure-wallpaper-for-order: auto-complete FileMaker WALLPAPER master from dw_unified
When invoicing (esp. samples), a SKU with no width/name/vid/supplier means the FileMaker WALLPAPER master record is missing/incomplete → this creates/completes it from dw_unified (shopify_products.metafields rich source, connie fallback): create stored fields on 'Add wallcovering' (Mfr Pattern/JS Pattern/Series/ Supplier/Width; combo sku is a calc), then Name/Color of Pattern + vid (series-mode code) + JPG Name on '*List Wallpapers - Full View'. Direct-writes invoice VID + Detail 1 Mfr Number (copy-lookups) so a redo shows them. SKUs with no mfr number are flagged, not created. Redid #32575 (Lee Jofa Taplow x4) + #32574 (DWTT70647; DWLK830880 flagged). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
5703973 · 2026-07-09 · invoice: all money on FIRST invoice, just the SKU on each subsequent
Steve's refined rule (2026-07-09): the money record carries the WHOLE order total on ONE line = total units x per-unit price (GRAND TOTAL = merch subtotal); DETAIL='Samples' for an all-samples order so Q=2 reads '2 Samples @ $4.25 = $8.50'. Every subsequent record shows JUST its SKU at $0. Reverts the line-2-on-first-record approach. PAID ON ACCOUNT computed exactly (merch+tax+ shipping) so money is right even when a summarized per-unit line rounds a cent. Also updated live invoice 102622 (order #32571) to the new format. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
d9b2cbf · 2026-07-09 · invoice: show real units + real per-unit price (not lumped Q1=1)
- money record now lists each order line in its own physical row (line 1 = '… 1' fields, line 2 = distinct 'DETAIL 2'/'Q2'/'NET 2' fields) with the REAL quantity + REAL per-unit price; GRAND TOTAL/PAID sum correctly. - single-SKU (the common case): line 1 = real qty x real unit price, identical GRAND/PAID/GRAND TOTAL 2 to before -> zero risk. 2-SKU shows both lines; >2-SKU lumps the overflow into line 2 (layout caps at 2 rows). - per-SKU stub records stay $0 (real units shown for reference) so dollars are counted once and the monitor posts one card per order. - monitor: card total now reads PAID ON ACCOUNT when booked (sums both lines; GRAND TOTAL 2 is a line-1-only calc that undercounts a 2-line order). - verified live: single-SKU 2x$44.18=$88.36 and 2-SKU (2x$12.50 + 3x$4.25)=$37.75. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
707cde7 · 2026-06-29 · invoice: populate 'WC Pattern Number AKA DW SKU' from primary line base SKU
Discovered exact field name (Text[4], repeating, writable) and wired it into createInvoiceForOrder via the '1-order detail 1 Copy3' layout (shares the header base table). Proven on invoice 102262 -> DWCC-112200.
File tree
- .env.example
- .gitignore
- README.md
- bin/fm.js
- bin/shopify-sync.js
- config.json
- launchd/com.steve.daily-sales-summary.plist
- launchd/com.steve.new-invoice-monitor.plist
- lib/fm-script-helpers.js
- lib/george-auth.js
- lib/invoice.js
- lib/notify.js
- lib/sync-core.js
- lib/wallpaper.js
- package-lock.json
- package.json
- scripts/_gl_recon.mjs
- scripts/_gl_recon2.mjs
- scripts/_gl_recon3.mjs
- scripts/audit-clients.mjs
- scripts/audit-dup-invoices.mjs
- scripts/backfill-blank-mfr.mjs
- scripts/bulk-create-greenland-cork.mjs
- scripts/bulk-create-greenland-full.mjs
- scripts/bulk-series-cork-to-dwgl.mjs
- scripts/bulk-series-dwgl-to-dwlg.mjs
- scripts/bulk-series-dwlg-to-cork.mjs
- scripts/bulk-set-dwnumber-fm.mjs
- scripts/create-dwkk-120156.mjs
- scripts/create-dwtt-baxter-73433-35-36.mjs
- scripts/delete-dup-536613.mjs
- scripts/drain-flagged-skus.mjs
- scripts/ensure-wallpaper-for-order.mjs
- scripts/fetch-clients.js
- scripts/fix-dummy-hdr.mjs
- scripts/fix-dummy-tax.mjs
- scripts/fix-dwtt73434-mfr.mjs
- scripts/fix-invoice-102332.mjs
- scripts/fix-invoice-102374.mjs
- scripts/fuzzy-sku-check.mjs
- scripts/greenland-disco-2026-07-14.mjs
- scripts/new-invoice-monitor.mjs
- scripts/probe-32513-invoice.mjs
- scripts/probe-invoice-102387.mjs
- scripts/probe-line2.mjs
- scripts/relookup-invoice-102387.mjs
- scripts/sales-summary.mjs
- scripts/test-dummy-invoice.mjs
- scripts/test-one.mjs
- scripts/test-real-units-live.mjs
- scripts/test-real-units.mjs
- scripts/test-sync-dryrun.mjs
- scripts/watch-next-multisku.mjs
- scripts/watch-next-order.mjs
- scripts/watch-real-units-order.mjs
- src/auth.js
- src/fm-client.js
- src/index.js