[object Object]

← back to Dw Photo Capture

docs: FileMaker sticker setup — flag field + OnTimer poller (reuse existing print/stamp scripts) + FM_WRITE gate. Deployed read-only FM creds to Kamatera; sample-request lookup live (Maya50162→Haley McKinley w/ image), print-sticker dry-run until flag field designated.

1f9cc3b17343309c52159e7bbb507076ca42c7e7 · 2026-07-06 17:20:08 -0700 · Steve Abrams

Files touched

Diff

commit 1f9cc3b17343309c52159e7bbb507076ca42c7e7
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon Jul 6 17:20:08 2026 -0700

    docs: FileMaker sticker setup — flag field + OnTimer poller (reuse existing print/stamp scripts) + FM_WRITE gate. Deployed read-only FM creds to Kamatera; sample-request lookup live (Maya50162→Haley McKinley w/ image), print-sticker dry-run until flag field designated.
---
 FILEMAKER-STICKER-SETUP.md | 58 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/FILEMAKER-STICKER-SETUP.md b/FILEMAKER-STICKER-SETUP.md
new file mode 100644
index 0000000..43c5342
--- /dev/null
+++ b/FILEMAKER-STICKER-SETUP.md
@@ -0,0 +1,58 @@
+# FileMaker Sticker Workflow — the 3 steps YOU own (Steve)
+
+The scanner side is LIVE: scan a sample → it identifies the item against the unified catalog →
+finds the open sample request in FileMaker (`today for client` filled + `Date Sample Request
+printed for vendor` filled + `Date WP Sample Sent` empty) → shows the popup with the client +
+**Print SKU / Print address** buttons. Pressing a button currently returns a safe **dry-run**.
+
+To make the physical Zebra print + date-stamp fire, three things live on YOUR side (FileMaker Pro
+can't be scripted via the cloud API, so these are manual one-time):
+
+## 1. Add a flag field the scanner writes
+On the `WALLPAPER` table (the one behind `Sample Requests via email`), add a **Text** field, e.g.
+`web_print_request`. The scanner writes `"sku"` or `"address"` into it for the matched record.
+
+Then on Kamatera, set two env vars and restart:
+```
+FM_PRINT_FLAG_FIELD=web_print_request
+FM_WRITE=1          # lets /api/print-sticker actually write the flag (until then: dry-run)
+```
+(Leave `FM_WRITE` unset to keep everything in preview mode.)
+
+## 2. Add ONE poller script in FileMaker Pro (reuses your existing print + stamp scripts)
+Create a script `Web Sticker Poller` with `Install OnTimer Script` (interval ~4s) on an open
+window (a "Sticker Station" window). Steps:
+```
+Enter Find Mode
+  Set Field [ web_print_request ; "sku" ]          // (or an OR-find for "sku" | "address")
+Perform Find
+If [ Get(FoundCount) > 0 ]
+  Go to Record [ First ]
+  Loop
+    # run YOUR existing scripts for this record:
+    Perform Script [ "Print Sample Sticker (<size>)" ]   // your existing Zebra print script
+    Perform Script [ "today for client / stamp WP sent" ]// your existing stamp script → Date WP Sample Sent = today
+    Set Field [ web_print_request ; "" ]                 // clear the flag so it doesn't reprint
+    Commit Records
+    Go to Record [ Next ; Exit after last ]
+  End Loop
+End If
+```
+Branch on the flag value (`"sku"` vs `"address"`) to pick the SKU-sticker vs address-sticker
+layout. Keep the "Sticker Station" window open on the Mac attached to the Zebra printer.
+
+## 3. Confirm the field mapping (already wired, just verify)
+- Match: `combo sku` (house) == identified `internal_sku`, else `Mfr Pattern` begins-with the mfr code.
+- Qualify: `today for client` filled, `Date Sample Request printed for vendor` filled, `Date WP
+  Sample Sent` EMPTY; most-recent by `today for client`.
+- Stamp on print: `Date WP Sample Sent` = today (done by YOUR stamp script in the poller).
+
+## Fallback (zero scripting)
+Skip the OnTimer poller: make a "Samples to send" layout showing the found set where
+`web_print_request` is not empty, and click your existing print button per row on the Mac.
+
+## Test
+1. `FM_WRITE=1` + `FM_PRINT_FLAG_FIELD=web_print_request` on the box, restart dwphoto.
+2. Scan a sample with an open request (e.g. Maya50162 → Haley McKinley, record 536653).
+3. Popup → Print SKU → the flag lands on the record → your poller prints the Zebra label and
+   stamps `Date WP Sample Sent` = today → flag clears.

← 7f00ab4 feat: sample-request sticker popup + scan cost throttle  ·  back to Dw Photo Capture  ·  fix: print-sticker no longer hangs + go-live hardening 7754221 →