Stitchwork Docs
stitchwork.io

Help

Glossary

Every Stitchwork term, cookie, key prefix and status value, alphabetically.

Terms

access state
Whether a workspace may be used: trial, active, suspended or closed. Operator intent, evaluated on every request. See access.
affinity
A per-customer, per-product counter of views, cart adds and quote appearances. It is what makes recommendations personal.
attribution snapshot
A frozen copy of a visitor's ad-touch trail — {first_touch, last_touch, touch_count} — stamped onto a quote or an order at creation, so the conversion keeps its source even if identity is later reassigned.
bestseller window
How far back sales count towards the bestseller signal. 365 days by default.
category balance
A 0–1 dial that interleaves recommendation output across categories. 0 is pure relevance; 1 is strict round-robin.
channel
A surface you sell through: website, store, kiosk, pop-up, marketplace, wholesale. Quotes and orders both belong to one.
channel role
Per-channel permission: admin, manager or associate. Independent of the workspace role.
configurable product
A product with option axes, whose variants are generated from their cartesian product.
conversion window
How far before a conversion an ad touch can sit and still get credit. 90 days by default, 1–365 allowed.
delivery
One attempt-tracked row pairing a webhook event with a subscription. Statuses: pending, succeeded, failed, dead.
event
One recorded action by a visitor: a page view, product view, cart add, search, purchase, QR scan or campaign arrival.
featured
A manual per-product flag that lifts it in the ranking. Weighted at 2.0 by default and applied outside the personalisation blend, so it lifts for everyone.
join code
A single-use, five-minute code minted by a public quote page so a customer's phone can be linked to their customer record through your join endpoint.
join endpoint
A route on your domain that reads the __sw_v cookie and posts it to Stitchwork with a join code. The only place that cookie is readable.
line item
One row on a quote or an order. Snapshots its description, SKU and unit price, so later catalogue edits never rewrite a sent quote.
option
An axis of choice on a configurable product — wood, size, colour. 1–40 lowercase letters, digits or underscores.
organisation
One brand's workspace. The isolation boundary — everything else hangs off it.
owner
The user who created the workspace. Exactly one, and the only role that can edit the catalogue, run imports, delete records or set up payments.
personalisation strength
A 0–1 dial blending global ranking against the per-customer overlay. 0.5 by default.
public token
A 32-character unguessable string on every quote. It is the authentication for /q/{token}.
quote
A proposal: channel, customer, lines, totals, and a link only the customer has.
recompute
Rebuilding the materialised global ranking signals. Triggered by hand, or automatically after an order import.
row-level security
PostgreSQL policies that reject rows belonging to another workspace, layered underneath the explicit filters in application code.
signal
One input to the ranking score. Seven global (bestseller, popular, carted, newness, featured, price target, on sale) and three personal (view, cart, quote).
simple product
One thing, one price. Gets exactly one auto-created variant, so every product has at least one.
SKU
The join key between your systems and Stitchwork. Matched against product SKUs first, then variant SKUs; a variant SKU always rolls up to its parent as well.
slug
A URL-safe workspace identifier, used in the tracking tag URL. Never changes when you rename the workspace.
stitching
Linking an anonymous visitor to a named customer, which retroactively attributes their entire browsing history.
subscription
A webhook destination: one URL, one event filter, one signing secret.
tax inclusive
Quote mode where line prices already contain tax. The total equals the discounted subtotal; the tax figure is informational.
touch
One recorded ad arrival — UTM parameters or a click id — against a visitor.
variant
A specific purchasable combination of a product's options, with its own SKU, price and status. What quote and order lines point at.
visitor
One anonymous browser, identified by the __sw_v cookie. Becomes a known person when linked to a customer.
workspace role
owner, admin or member. Separate from channel roles.

Key and id prefixes

PrefixWhat it isWhere it goes
pk_live_Public tracking keyBrowser. Authorization: Public …, or ?key= on public read endpoints.
sk_live_Secret tracking keyYour server only. Authorization: Bearer ….
whsec_Webhook signing secretYour webhook receiver. Shown once at creation and once per rotation.
evt_Webhook event idThe envelope's id and the Stitchwork-Event-Id header. Dedupe on this.
Q-YYYY-NNNNNNQuote numberHuman-facing. Unique per workspace per year.
acct_Stripe Connect accountThe merchant's own Stripe Express account.

Cookies

NameSet byLifetimePurpose
__sw_vThe tag2 years, slidingVisitor identity on your domain. Written only after consent.
__sw_channelThe tag30 min, slidingPhysical-channel attribution after a QR scan.
__sw_attrThe tag30 min, slidingDeduplicates campaign touches.
PHP sessionThe app14 daysStaff authentication on the Stitchwork app itself. HttpOnly, SameSite=Lax.

URL markers

ParameterMeaningStripped?
_sw_chChannel id this scan belongs to.Yes
_sw_scanMarks the arrival as a QR scan.Yes
_sw_qrWhich specific QR code was scanned.Yes
utm_*, gclid, fbclid, msclkidCampaign attribution.No — your own analytics need them
joined, reasonResult of a QR join, on the return to the quote page.No

Status values

WhereValues
Workspace accesstrial, active, suspended, closed
Workspace roleowner, admin, member
Channel roleadmin, manager, associate
Channel typeweb, store, marketplace, kiosk, pop_up, wholesale
Channel ownershipowned, franchise, authorised, wholesale, marketplace
Channel statusactive, paused, closed
Product typesimple, variant, configurable
Product / variant statusdraft, active, discontinued
Quote statusdraft, sent, accepted, declined, expired, cancelled, paid
Quote discount typeamount, percent
Quote originapp, external
Order statuspaid, refunded, cancelled, fulfilled
Order originapp, import, quote_conversion, external
QR kindproduct, channel_entry, custom
Event typepage_view, click, search, add_to_cart, view_product, purchase, qr_scan, campaign_touch, scroll_depth, custom
Consent modeauto, require, off
Attribution modeltime_decay, linear, position_based, last_touch, first_touch
Webhook deliverypending, succeeded, failed, dead

Headers

HeaderDirectionPurpose
Authorization: Public pk_live_…To StitchworkStorefront / browser calls.
Authorization: Bearer sk_live_…To StitchworkServer-to-server calls.
X-Migrate-TokenTo StitchworkMigration endpoint.
X-Admin-KeyTo StitchworkOps endpoints.
Stitchwork-SignatureFrom Stitchworkt=<unix>,v1=<hex hmac-sha256>.
Stitchwork-Event-IdFrom StitchworkDedupe key for webhook deliveries.
Stitchwork-EventFrom StitchworkEvent type, for routing before parsing.
Stitchwork-AttemptFrom Stitchwork1-based attempt number.