Status: Draft Architectural RFC (SA-12) · Binds: Roller, Stockroom, JakeMon, simple-agility-accounting · Primary Hub: SimpleAgilityStackHub
This Request for Comments (RFC) establishes the architectural specification for cross-repository marketing attribution across the Simple Agility ecosystem. It defines how customer engagement on the sovereign blogging platform (RollerHub) is measured, correlated, and attributed to physical inventory transactions and revenue realized in the warehouse management system (StockroomIntakeInventoryPricingDesign) and settled in the general ledger (SimpleAgilityCommerceDataFlow).
In modern digital commerce, attribution is typically trivialized by uniform software stacks: an e-commerce storefront (e.g., Shopify, WooCommerce) injects Urchin Tracking Module (UTM) query parameters from an inbound landing page directly into a persistent visitor session cookie. When the customer submits a payment, the shopping cart writes those parameters (utm_source, utm_medium, utm_campaign) into the order record, which is emitted via webhook to the data warehouse.
The Simple Agility small-business architecture faces a fundamentally different structural challenge:
sequenceDiagram
autonumber
actor Reader as Customer / Collector
participant Blog as Roller Fork (docker2)
participant Umami as Umami Analytics (docker2)
participant Mkt as Third-Party Channel (eBay / FBA)
participant SR as Stockroom WMS (docker1)
participant GL as Accounting Engine (GL)
participant Dash as JakeMon Grafana (inference)
Reader->>Blog: Visits spotlight post (/entry/vintage-leica-m3)
Blog->>Umami: Records pageview (session_id, url_path)
Reader->>Blog: Clicks [cta] "View Listing on eBay"
Blog->>Umami: Emits cta-click (entry_anchor, dest=ebay.com)
Blog-->>Mkt: Redirects to external listing (strips/ignores 3rd-party UTMs)
Note over Reader,Mkt: Customer purchases item on eBay checkout
Mkt->>SR: Ingests order via sell.fulfillment (SKU, price, line_id#59; NO UTMs!)
SR->>GL: Emits ItemSold event (lacks marketing attribution)
Note over Dash: Blind Spot: Umami sees clicks#59; Stockroom sees sales#59; No join key!
ebay.com/itm/1234567890?utm_source=roller&utm_campaign=leica-m3, eBay’s checkout pipeline intentionally discards third-party UTM parameters.sell.fulfillment REST API (GET /sell/fulfillment/v1/order), the returned JSON payload contains shipping fulfillment lines, buyer delivery addresses, SKU custom labels, and transaction amounts. It provides zero visibility into HTTP referrers, entry URLs, or external campaign identifiers.Without explicit architectural mechanisms, the ecosystem suffers from an attribution blind spot: Umami measures top-of-funnel reader interest and outbound click-throughs, while Stockroom measures bottom-of-funnel sales and gross margins, but neither product can programmatically verify whether the blog spotlight actually generated the sale.
The Simple Agility stack already possesses several key architectural primitives that make closed-loop attribution feasible without building heavy third-party tracking services:
flowchart TD
subgraph Roller_Current["Roller Sovereign Platform"]
CTA["CtaShortcode.java<br/>[cta] Tagging"]
BOOK["BookingLink.java<br/>withUtmParams()"]
FORM["roller_form_submission<br/>(entry_anchor, client_ip)"]
REV["roller_event<br/>(FORM_SUBMITTED)"]
CTA --> BOOK
FORM --> REV
end
subgraph Telemetry_Current["Observability & Analytics"]
UMAMI_DB[("Umami Postgres<br/>website_event")]
VIEW["analytics_traffic View<br/>(path, entry_anchor, views)"]
LOKI[("Loki Central Logs<br/>(ECS JsonTemplateLayout)")]
UMAMI_DB --> VIEW
end
subgraph Stockroom_Current["Stockroom Inventory & WMS"]
CL["channel_listing Table<br/>(item_id, external_id, url)"]
SALE["sale Table<br/>(item_id, channel, price_cents)"]
SYNC["EbaySellerAccount Port<br/>sell.fulfillment Poller"]
CL --> SALE
SYNC --> SALE
end
BOOK -.->|Appends UTMs & data-umami-event| UMAMI_DB
SALE -.->|Emits ItemSold| LOKI
CtaShortcode.java & BookingLink.java):
utm_source=<weblog_handle>, utm_medium=blog, and utm_campaign=<entry_anchor> to all outbound anchor tags.data-umami-event="cta-click", data-umami-event-entry="<entry_anchor>", and data-umami-event-dest="<dest_host>".roller_form_submission which records the originating entry_anchor in the database.deploy/analytics/umami-views.sql):
event_type = 1) and custom interactions (event_type = 2).grafana_ro) and the analytics_traffic SQL view grouping daily sessions and views by entry_anchor.V022__create_channel_listing.sql, V023__create_sale.sql):
1A2B3).sell.fulfillment and matching the SKU present in eBay's Custom label field.sale table possesses no fields for marketing attribution, referral campaigns, coupon codes, or inbound click IDs.To bridge the gap between Roller content and multi-channel inventory realization, this RFC defines four distinct attribution vectors:
| Attribution Vector | Mechanism | Precision | Infrastructure Overhead | Platform Fee Impact |
|---|---|---|---|---|
| Vector 1: EPN Affiliate Tags | eBay Partner Network tracking links with customid | 100% Deterministic (Transaction Level) | Low (Free EPN account + link generator) | Positive: Reimburses 1% to 4% of sale value in affiliate credits |
| Vector 2: Store Coded Coupons | Targeted discount codes embedded in articles (e.g., ROLLER5) | 100% Deterministic (Order Level) | Very Low (Configured in eBay Seller Hub) | Minor discount (5%) offset by higher conversion rate |
| Vector 3: Sovereign Checkout | Direct reader inquiries or Stripe Payment Links | 100% Deterministic (Ledger Level) | Medium (Stripe Payment Link generation) | Huge Win: Bypasses eBay's ~13.25% fee entirely |
| Vector 4: Single-SKU Correlation | Temporal heuristic matching Umami cta-click to Stockroom sale | Probabilistic (~95% to 99%) | Zero (SQL join in Grafana) | Neutral |
flowchart LR
subgraph Vectors["Attribution Strategy Matrix"]
V1["Vector 1: EPN Network<br/>customid=blog_slug_sku"]
V2["Vector 2: Coded Coupon<br/>order.appliedPromotions"]
V3["Vector 3: Sovereign Form<br/>roller_form_submission"]
V4["Vector 4: Single-SKU Heuristic<br/>cta-click timestamp ~ sale"]
end
subgraph Targets["Target Channel"]
EBAY["eBay Marketplace"]
DIR["Direct Sovereign Sale"]
LOCAL["Craigslist / Facebook"]
end
V1 --> EBAY
V2 --> EBAY
V3 --> DIR
V4 --> EBAY
V4 --> LOCAL
eBay operates the eBay Partner Network (EPN), allowing publishers to generate tracked outbound URLs. EPN accepts a custom tracking parameter (customid) that persists through eBay's cart session:
https://www.ebay.com/itm/1234567890?mkcid=1&mkrid=711-53200-19255-0&siteid=0&campid=5339000000&customid=roller_vintagefinds_rolleiflex-28f_1A2B3
roller_<weblog_handle>_<entry_anchor>_<sku> (limited to 256 alphanumeric and underscore characters).customid that triggered it.For sellers holding an eBay Store subscription, eBay supports Coded Coupons (public or private alphanumeric voucher codes, e.g., ROLLER5 or SPOTLIGHT10):
blogger-agent) embeds an exclusive promotional callout into the Roller entry body:
Readers of Simple Agility can take an additional 5% off this camera at eBay checkout using code
ROLLER5.
sell.fulfillment API (GET /sell/fulfillment/v1/order/{orderId}), the order payload includes:
{
"orderId": "12-34567-89012",
"pricingSummary": {
"priceDiscount": {
"value": "15.00",
"currency": "USD"
}
},
"appliedPromotions": [
{
"promotionId": "promo-987654",
"description": "ROLLER5"
}
]
}
description and writes it to the sale record, establishing unambiguous attribution.The highest-margin transaction occurs when an item is sold directly to a reader, circumventing marketplace commission fees.
roller_form_submission captures customer purchase inquiries, recording the entry_anchor directly. The operator invoices the customer directly (via ACH, check, or Stripe invoice) and records the sale in Stockroom as channel in_person or direct.https://buy.stripe.com/test_123456?client_reference_id=roller_estate_rolleiflex_1A2B3
Stripe's checkout.session.completed webhook delivers the exact client_reference_id to simple-agility-accounting.
Because the reselling business manages unique, non-fungible inventory (e.g., a specific used book, an estate camera, a vintage precision tool), the inventory differs radically from bulk retail:
1A2B3) published in eBay's Custom label.1A2B3, and Umami registers an outbound cta-click for that specific entry anchor, and Stockroom records a sale for SKU 1A2B3 within a configurable conversion window (within 48 hours):To support attribution vectors 2, 3, and 4, the following data model extensions are proposed for future suite phases:
V028__add_attribution_to_sale.sql)-- Migration: V028__add_attribution_to_sale.sql
-- Module: stockroom-persistence
-- Purpose: Support marketing attribution from Roller blog spotlights and promo codes
ALTER TABLE sale
ADD COLUMN attribution_channel varchar(32),
ADD COLUMN attribution_campaign varchar(255),
ADD COLUMN promo_code varchar(64),
ADD COLUMN attribution_confidence numeric(3,2);
COMMENT ON COLUMN sale.attribution_channel IS 'Source of marketing lead: roller_blog, newsletter, direct_inquiry, or null';
COMMENT ON COLUMN sale.attribution_campaign IS 'Originating blog entry_anchor or newsletter campaign ID';
COMMENT ON COLUMN sale.promo_code IS 'Marketplace coupon or voucher code applied at checkout';
COMMENT ON COLUMN sale.attribution_confidence IS 'Attribution confidence score between 0.00 and 1.00 (1.00 = coupon/direct form; 0.90 = single-SKU temporal)';
CREATE INDEX idx_sale_attribution ON sale (attribution_channel, attribution_campaign)
WHERE attribution_channel IS NOT NULL;
ItemSold)In accordance with SimpleAgilityCommerceDataFlow, the immutable ItemSold event payload is expanded to carry optional attribution metadata:
{
"event_id": "evt_01JAZ9876543210ABCDEFGHJK",
"event_type": "ItemSold",
"occurred_at": "2026-10-17T14:32:00Z",
"actor": "system:ebay_sync",
"data": {
"item_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"sku": "1A2B3",
"channel": "ebay",
"gross_proceeds_cents": 30000,
"channel_fees_cents": 4015,
"net_cents": 25985,
"attribution": {
"channel": "roller_blog",
"campaign": "vintage-rolleiflex-28f-review",
"promo_code": "ROLLER5",
"confidence": 1.00
}
}
}
Attribution telemetry is not merely an operational dashboard; it governs the allocation of marketing effort and channel selection.
The financial justification for authoring deep-dive inventory spotlights is governed by the net profit generated above baseline content authoring costs:
Where:
/api/mcp.When an attribution vector successfully steers a customer from an external marketplace to a direct sovereign transaction (Vector 3), the margin expansion is calculated as:
Consider a rare estate camera priced at $300.00:
eBay Marketplace Sale (Vector 1 or 2):
Direct Sovereign Sale via Roller Inquiry / Stripe (Vector 3):
Arbitrage Benefit:
A direct transaction via the Roller blog preserves an additional $31.15 (10.38% of gross sale price) directly to the bottom line.
To preserve development momentum while keeping systems strictly bounded, implementation of this RFC is phased across suite roadmaps:
flowchart TD
P1["Phase 1: Zero-Code Observability (Immediate)"]
P2["Phase 2: EPN & Coupon Operationalization (Near-Term)"]
P3["Phase 3: Schema & Poller Integration (Future Suite Phase)"]
P1 -->|Deploy Umami/Stockroom Grafana View| P2
P2 -->|Blogger Agent generates EPN & Coupons| P3
P3 -->|Stockroom V028 Migration & GL Ingestion| DONE["Closed-Loop Attribution Engine"]
umami.website_event and stockroom.sale. By plotting cta-click timestamps against eBay sale timestamps for featured SKUs, the operator gains immediate directional visibility into blog-assisted conversions without modifying any production application code.campid).blogger-agent / RollerMcp) is instructed to construct outbound links containing EPN tracking parameters and promo codes.ROLLER5) are configured in eBay Seller Hub.V028__add_attribution_to_sale.sql.EbayOrderLineMapper in stockroom-channels is updated to parse appliedPromotions and write the coupon code to sale.promo_code.ItemSold event payloads propagate attribution metadata to simple-agility-accounting.