Product architecture
From customer order to received blanks — automated end to end.
StitchFlow orchestrates Printavo, S&S Activewear and SanMar through a deterministic rules engine. Every step is observable, overridable, and auditable.
Printavo Sync
GraphQL poll for orders hitting trigger status.
Rules Engine
Group, route and prioritize line items by SKU & vendor.
Stock Check
S&S REST + SanMar SOAP calls confirm availability.
Review Queue
Production approves drafts before placement.
PO Placement
Submit to vendor APIs, store confirmations.
Receiving + Risk
Checklists, due-date risk, write-back to Printavo.
flow:
on(order.status == "Approved - Pending Materials") {
items = expandLineItems(order)
grouped = groupBy(items, "vendor")
for (vendor, lines) in grouped {
stock = vendorStockCheck(vendor, lines)
draft = buildPO(vendor, stock.fulfillable)
if (draft.total < $250) hold(draft)
else queueForReview(draft)
}
flagRisk(order, expectedDates)
}Rules are versioned and editable per workspace. Disabled rules retain audit history.
┌──────────┐ GraphQL ┌──────────────┐
│ Printavo │ ─────────────▶ │ Sync Worker │
└──────────┘ └──────┬───────┘
▼
┌──────────────┐
│ Rules Engine │
└──────┬───────┘
┌──────────┬──────┴──────┬───────────┐
▼ ▼ ▼ ▼
┌───────┐ ┌───────┐ ┌────────┐ ┌────────┐
│ S&S │ │SanMar │ │Review │ │ Risk │
│ REST │ │ SOAP │ │ Queue │ │ Engine │
└───┬───┘ └───┬───┘ └────┬───┘ └────┬───┘
└────┬─────┘ │ │
▼ ▼ ▼
┌─────────────┐ ┌──────────┐ ┌─────────┐
│ PO Placed │ ───▶ │Receiving │─▶│Printavo │
│ + Tracking │ │Checklists│ │Write-back│
└─────────────┘ └──────────┘ └─────────┘Deterministic
Same input always produces the same draft POs. Every decision logged.
Override-friendly
Production can edit, split or reject any draft before placement.
Vendor-aware
Lead times, cutoffs and success rates inform routing automatically.