Completions

Build pillar · Inventory-aware-marketing agent · Inventory-aware per-location PDP variation · Published September 20, 2026

How to build inventory-aware per-location PDP variation at multi-location scale

An implementation architecture for a 14-axis variation matrix, a rendering-strategy spec, A/B testing plus multi-arm bandit, personalization, and a per-PDP compliance gate covering the FTC Mail Order Rule, Robinson-Patman, MAP/ Colgate, FDA OPDP, ADA Title III, ECOA Reg B, CPSC Section 15(b), Lanham Act, Magnuson-Moss, state lemon law, California Prop 65, and the state-vertical and international frameworks — on the inventory-aware-marketing agent, above the operator storefront, OMS, tax, framework-and-edge, experimentation, personalization, and LLM-as-judge stack.

Or take the 3-question shape diagnostic first — no email required.

What you will build

  • A 14-axis variation matrix covering stock state, pricing, shipping, promotion, warranty, return window, tax, location availability, store pickup, curbside pickup, vehicle fitment where automotive applies, personalization, bundle, and subscription. The matrix integrates with the operator OMS (Manhattan Active Omni, Brightpearl, Cin7, Linnworks, NetSuite OMS, Salesforce Order Management, Shopify POS, Square for Retail, ChannelAdvisor, Pacejet) and tax layer (Avalara, TaxJar, Vertex, Sovos). Operator counsel approves which axes apply per vertical and per jurisdiction.
  • A rendering-strategy spec per page type choosing across SSR (Next.js Pages Router, Remix, SvelteKit, Nuxt, Astro SSR, Express, Fastify), SSG (Next. js getStaticProps, Gatsby, Hugo, Jekyll, 11ty, Astro static), ISR (Next.js revalidate, on-demand revalidate, Vercel Edge Network), ESR (Cloudflare Workers, Vercel Edge Functions, Fastly Compute@Edge, AWS Lambda@Edge, Akamai EdgeWorkers, Netlify Edge Functions), CSR, hybrid React Server Components (Next.js App Router), streaming with Suspense, progressive hydration, partial hydration (Astro, Qwik), tag-based revalidation, on-demand ISR, and Cache-Control stale-while-revalidate. Operator engineering picks the right strategy per page type.
  • An A/B testing layer plus multi-arm banditthrough Optimizely, VWO, AB Tasty, Convert, LaunchDarkly, Statsig, Eppo, Split, or GrowthBook with proper sample- size calculation, statistical-significance testing (Bayesian or frequentist), multiple-comparisons correction (Bonferroni, Holm-Bonferroni, Benjamini- Hochberg FDR, Benjamini-Yekutieli, Tukey HSD, Dunnett, Scheffe), SPRT, Always Valid Inference, and mSPRT for sequential testing. Multi-arm bandit policies (Thompson sampling, UCB1, EXP3, EXP4, LinUCB, LinTS, contextual bandit, deep contextual bandit, Vowpal Wabbit, Gaussian Process bandit) run online learning where operator data- science approves.
  • A personalization layer through Bluecore, Dynamic Yield, Algolia Recommend, Constructor.io, Klevu, or Coveo with segment, cohort, LTV tier, loyalty tier, purchase history, browse history, cart history, wishlist, affinity score, RFM, collaborative filtering, content- based filtering, hybrid recommender, an LLM personalization ensemble (OpenAI GPT-5, Anthropic Claude Opus 4.7, Google Gemini Ultra, Mistral Large, Cohere Command R+, Meta Llama-3.1-405B), real-time vs pre-computed signals, cold-start handling, and causal-uplift CATE (T/S/X/DR- learner, CausalML, DoubleML, EconML).
  • A per-PDP compliance gate as policy-as- code (OPA Rego, AWS Cedar, Casbin, Cerbos, or Oso) with operator-counsel approval covering the ten operationally distinctive anchors (FTC Mail Order Rule, Robinson-Patman, MAP/Colgate, FDA OPDP, ADA Title III, ECOA Reg B, CPSC Section 15(b), Lanham Act, Magnuson-Moss, California Prop 65) plus the rest of the federal, state, state-vertical, and international frameworks.
  • An audit trail and end-to-end replaypersisting every PDP render decision to operator- controlled WORM storage at per-statute retention windows (CPSC 7 years, FDA recall 10 years, NHTSA 10 years, Robinson-Patman 7 years, Lanham 7 years, Magnuson-Moss 7 years, Prop 65 7 years, ADA Title III 3 years, PCI DSS 4.0 7 years, plus per-state lemon law), with deterministic replay so the operator catalog-ops and counsel teams can audit changes against historical state.

How the architecture is built

  1. Variation matrix definition. Author the 14-axis matrix with operator merchandising, supply chain, CX, finance, and counsel. Each axis carries a definition, the data signals that resolve it, the rendering decisions it triggers, and the operator-counsel-approved jurisdiction constraints.
  2. OMS and tax integration. Wire live OMS state (Manhattan Active Omni, Brightpearl, Cin7, Linnworks, NetSuite OMS, Salesforce Order Management, Shopify POS, Square for Retail, ChannelAdvisor, Pacejet) for stock, fulfillment-node, and pickup signals. Wire tax (Avalara, TaxJar, Vertex, Sovos) for state and local calculation including Wayfair economic nexus.
  3. Rendering-strategy decision. Pick SSR, SSG, ISR, ESR, CSR, hybrid RSC, streaming, or hybrid hydration per page type based on inventory-state volatility, traffic shape, cache hit rate, and edge- compute budget.
  4. A/B testing scaffold. Stand up the experimentation layer with proper statistical-significance testing and multi-arm bandit where operator data-science approves. Run against the operator catalog-ops-graded ground truth.
  5. Personalization wiring. Tie segments, cohorts, LTV and loyalty tiers, purchase and browse and cart history, wishlist, affinity, RFM, and recommender outputs to the variation matrix. Apply the LLM ensemble for content adaptation. Apply causal-uplift CATE for action-conditional lift estimation.
  6. Per-PDP compliance gate. Stand up the policy-as-code library with operator-counsel-approved rules per framework. Outputs that pass ship; outputs in a borderline confidence tier route to operator counsel; outputs that violate block with a counsel-readable explanation citing the rule, jurisdiction, and effective date. Recall states (CPSC Section 15(b), FDA recall, USDA FSIS, NHTSA) trigger immediate Add-to-Cart pause and recall-notice surfacing within the operator-counsel- approved disclosure window.
  7. ECOA Reg B + Fair Housing audit. Where personalization drives offer eligibility, BNPL credit terms, store-card pre-approval, or subscription credit, run disparate-impact analysis with operator-counsel and operator-data-science alignment.
  8. Accessibility audit. Run WCAG 2.2 AA, ARIA, EAA EN 301 549, Section 508 checks on every variant; run California Unruh Act and the multi-state accessibility statutes per shipping state.
  9. Audit trail and WORM retention. Persist every PDP render decision to operator-controlled WORM storage at per-statute retention windows.
  10. End-to-end replay and cross-skill handoffs. Build deterministic replay; coordinate with the 30+ sibling skills enumerated in the FAQ above.

Frequently asked questions

What does inventory-aware per-location PDP variation do that an off-the-shelf storefront PDP template does not?

Shopify, BigCommerce, WooCommerce, Magento (Adobe Commerce), Salesforce Commerce Cloud, commercetools, Spryker, Saleor, Vendure, MedusaJS, Swell, Sylius, Wix Stores, and Squarespace Commerce ship strong PDP-template primitives. Inventory-aware per-location PDP variation adds a layer on top: the same PDP route renders differently per location based on the operator OMS state (Manhattan Active Omni, Brightpearl, Cin7, Linnworks, NetSuite OMS, Salesforce Order Management, Shopify POS, Square for Retail, ChannelAdvisor, Pacejet) and the visitor's nearest store. When a SKU goes out of stock at the visitor's nearest store, the Add-to-Cart action swaps for Notify-When-Back, Reserve-at-Next-Closest-Store, Ship-from-Another-Store, or Pre-Order with operator-counsel-approved ETA. When the visitor enters a state where the SKU is restricted (cannabis state-board boundary, alcohol shipping restriction, FDA-regulated product, DEA-Scheduled product, ITAR/EAR-controlled product), the PDP gates accordingly. When the SKU enters a CPSC, FDA, USDA FSIS, or NHTSA recall state, the PDP immediately pauses Add-to-Cart and shows the recall notice within the operator-counsel-approved disclosure window. The variation logic runs through the operator framework-and-edge layer (Next.js, Remix, SvelteKit, Nuxt, Astro, Gatsby; Cloudflare Workers, Vercel Edge Functions, Fastly Compute@Edge, AWS Lambda@Edge, Akamai EdgeWorkers, Netlify Edge Functions) at request time, not at next batch ETL refresh. Experimentation runs through the operator A/B testing stack (Optimizely, VWO, AB Tasty, Convert, LaunchDarkly, Statsig, Eppo, Split, GrowthBook) with proper statistical significance and multi-arm bandit policies layered for online learning. Personalization runs through the operator personalization stack (Bluecore, Dynamic Yield, Algolia Recommend, Constructor.io, Klevu, Coveo) with operator-data-science-team-aligned causal-uplift CATE. The per-PDP compliance gate covers FTC Mail Order Rule (16 CFR 435 30-day shipping), Robinson-Patman Act, MAP and Colgate doctrine, FDA OPDP (21 CFR 202.1), FDA DSHEA, ADA Title III with WCAG 2.2 AA, ECOA Reg B disparate-impact when personalization drives offer eligibility or credit, CPSC Section 15(b) 24-hour reporting, FDA recall (21 CFR Part 7), USDA FSIS, NHTSA, Lanham Act false advertising, Magnuson-Moss Warranty Act, state lemon law, state UCC Article 2, state UDTPA, FTC Made in USA Labeling Rule, FTC Cooling-Off Rule, FTC Endorsement Guides, FTC fake-review rule, FTC substantiation doctrine, California Prop 65, CARB Phase 2, state-vertical rules (cannabis, alcohol, tobacco, DEA, FINRA, SEC, state bar), CCPA/CPRA, GDPR (including Article 22 automated-decisionmaking), COPPA, EU AI Act, EU Digital Services Act, EU Digital Markets Act, state privacy and biometric law (Illinois BIPA, Texas CUBI, Washington MHMDA), PCI DSS 4.0, NIST AI RMF, ISO 42001 and 27001, and SOC 2 Type II.

What 14 variation axes does the operator counsel-approved matrix cover?

The variation matrix is operator-counsel-approved and lives in operator-counsel-approved policy-as-code (OPA Rego, AWS Cedar, Casbin, Cerbos, or Oso). The 14 axes commonly cover: (1) stock state — in-stock, low-stock, out-of-stock, backorder, pre-order, discontinued, new-arrival. (2) Pricing — regular, sale, clearance, member, bulk-discount-tier, promotional, coupon-applied, loyalty-points-discount. (3) Shipping — standard, expedited, overnight, free-shipping-threshold, click-and-collect, BOPIS, curbside, locker pickup, ship-from-store. (4) Promotion — sitewide promo, category promo, brand promo, SKU promo, bundle promo, BOGO, cross-sell banner, flash-sale countdown. (5) Warranty — manufacturer warranty, extended warranty, store warranty. (6) Return window — 30-day, 60-day, 90-day, holiday extended, clearance final-sale, electronics restocking fee. (7) Tax — state sales tax, local sales tax, Wayfair economic nexus, Streamlined Sales and Use Tax Agreement, tax-exempt customer, routed through Avalara, TaxJar, Vertex, or Sovos. (8) Location availability — per-store inventory snapshot from OMS. (9) Store pickup. (10) Curbside pickup. (11) Vehicle fitment (year, make, model, trim, engine, VIN lookup where automotive). (12) Personalization — driven from the operator CDP and customer state. (13) Bundle — cross-sell and bundle configuration per location. (14) Subscription — subscribe-and-save, auto-ship cadence, skip/pause, discount tier. Operator counsel approves which axes apply per vertical and per jurisdiction.

How does the rendering-strategy layer work, and where do A/B testing and multi-arm bandit fit?

Rendering choices are operator-data-engineering-team decisions tied to the operator framework stack. Server-side rendering (Next.js Pages Router, Remix, SvelteKit, Nuxt, Astro SSR, Express, Fastify) suits frequently-changing inventory state where per-request rendering is acceptable cost. Static site generation (Next.js getStaticProps, Gatsby, Hugo, Jekyll, 11ty, Astro static) suits stable PDPs with infrequent change. Incremental static regeneration (Next.js revalidate, on-demand revalidate, Vercel Edge Network) lets PDPs cache aggressively while still updating on attribute changes. Edge-side rendering (Cloudflare Workers, Vercel Edge Functions, Fastly Compute@Edge, AWS Lambda@Edge, Akamai EdgeWorkers, Netlify Edge Functions) pushes per-location variation logic close to the visitor. Client-side rendering, hybrid React Server Components (Next.js App Router), streaming with Suspense, progressive hydration, partial hydration (Astro, Qwik), tag-based revalidation, on-demand ISR, and Cache-Control stale-while-revalidate all fit specific cases. Operator engineering picks the right strategy per page type. A/B testing runs through the operator experimentation stack (Optimizely, VWO, AB Tasty, Convert, LaunchDarkly, Statsig, Eppo, Split, GrowthBook) with proper sample-size calculation, statistical-significance testing (Bayesian or frequentist), multiple-comparisons correction (Bonferroni, Holm-Bonferroni, Benjamini-Hochberg FDR, Benjamini-Yekutieli, Tukey HSD, Dunnett, Scheffe), Sequential Probability Ratio Test (SPRT), Always Valid Inference, and mSPRT for sequential testing. Multi-arm bandit policies (Thompson sampling, UCB1, EXP3, EXP4, LinUCB, LinTS, contextual bandit, deep contextual bandit, Vowpal Wabbit, Gaussian Process bandit) run online learning across the variation axes where the operator data-science team approves bandit-style allocation; regret minimization plus FBC feedback close the loop. Personalization runs through customer segment, cohort, LTV tier, loyalty tier, purchase history, browse history, cart history, wishlist, affinity score, RFM, collaborative filtering, content-based filtering, hybrid recommender, an LLM personalization ensemble (OpenAI GPT-5, Anthropic Claude Opus 4.7, Google Gemini Ultra, Mistral Large, Cohere Command R+, Meta Llama-3.1-405B), real-time vs pre-computed signals, cold-start handling, and causal-uplift CATE (T/S/X/DR-learner, CausalML, DoubleML, EconML).

What does the per-PDP compliance gate cover, and what are the operationally distinctive anchors?

The compliance gate runs before any PDP variant ships and is operator-counsel-approved. Ten anchors are operationally distinctive for inventory-aware PDPs. (1) FTC Mail Order Rule (16 CFR 435 30-day shipping): showing Add-to-Cart for an OOS SKU without a prompt-cancellation right triggers FTC enforcement risk (recent enforcement examples illustrate the surface). (2) Robinson-Patman Act (15 USC 13): per-customer or per-channel PDP pricing differential without functional discount justification is operator-counsel territory and FTC enforcement activity has reinvigorated in 2024-2025. (3) MAP and Colgate doctrine: supplier-imposed Minimum Advertised Price policies plus unilateral pricing policy enforcement; sale price below MAP risks supplier termination and downstream supply disruption. (4) FDA OPDP (21 CFR 202.1) one-click-to-risk balanced presentation for Rx drug PDPs; FDA DSHEA no-disease-claim for supplements. (5) ADA Title III, the 9th Circuit Robles v. Domino's Pizza (2019) accessibility line, DOJ ADA Title III 2024 rulemaking, WCAG 2.2 AA, ARIA, EAA EN 301 549, Section 508, the California Unruh Act, and the multi-state accessibility statutes. (6) ECOA Reg B (12 CFR 1002) disparate-impact analysis when personalization drives offer eligibility, BNPL credit terms, store-card pre-approval, or subscription credit; CFPB enforcement; the Fair Housing Act and HUD v. Facebook (2022) Special Ad Audiences precedent. (7) CPSC Section 15(b) (15 USC 2064(b)) substantial-hazard reporting and the obligation to pause Add-to-Cart and show recall notice when a SKU enters a recall state; FDA recall (21 CFR Part 7 Class I/II/III); USDA FSIS (9 CFR Part 390); NHTSA (49 CFR Part 573 and 577). (8) Lanham Act (15 USC 1125) false-advertising exposure when In-Stock or Add-to-Cart language appears against an OOS SKU. (9) Magnuson-Moss Warranty Act (15 USC 2301): written warranty disclosure before sale, full vs limited classification, tie-in prohibition; 50-state lemon law matrix; state UCC Article 2; state UDTPA. (10) California Prop 65 (Cal Health & Safety Code 25249.5) warning when product contains listed chemicals; CARB Phase 2 formaldehyde; OEHHA enforcement; private right of action. Beyond the ten anchors the gate also covers FTC Made in USA Labeling Rule, FTC Cooling-Off Rule, FTC Endorsement Guides, FTC fake-review rule (16 CFR Part 465) where AggregateRating renders, FTC substantiation doctrine, Massachusetts AG Copley Advertising 2017 line, state-vertical rules (cannabis state boards, alcohol DISCUS tied-house, tobacco FDA, DEA Schedule II-V, FINRA Rule 2210 when investment product, SEC Rule 206(4)-1, state bar when legal services), CCPA/CPRA, CCPA right-to-opt-out-of-automated-decisionmaking when personalization drives eligibility, GDPR Article 22, COPPA, EU AI Act Articles 5/13/14/15/22/50, EU DSA Article 26 and 30 trader identity, EU DMA, state US privacy laws (Connecticut CTDPA, Texas DPSA, Virginia CDPA, Colorado CPA, Utah UCPA, plus others), Tennessee ELVIS Act when AI voice product demos appear, Illinois BIPA, Texas CUBI, Washington MHMDA, PCI DSS 4.0 at the payment step, NIST AI RMF, ISO 42001, ISO 27001, and SOC 2 Type II. The gate runs as policy-as-code in OPA Rego, AWS Cedar, Casbin, Cerbos, or Oso, operator-counsel-approved per vertical and per jurisdiction.

What does the audit trail and end-to-end replay look like, and how does this skill hand off to other operator skills?

Every PDP render decision persists to operator-controlled WORM storage (AWS S3 Object Lock, Google Cloud Storage retention, Azure Blob immutable, or Snowflake Time Travel) with the SKU and location and visitor context, the 14-axis variation snapshot, the rendering-strategy snapshot, the A/B-test snapshot, the multi-arm-bandit snapshot, the personalization snapshot, the compliance-gate snapshot per framework, and the routing outcome. Retention windows are operator-counsel-policy and typically include 7 years for CPSC product safety defense, 10 years for FDA and NHTSA recall defense, 7 years for Robinson-Patman defense, 7 years for Lanham Act defense, 7 years for Magnuson-Moss defense, 7 years for California Prop 65 defense, 3 years for ADA Title III defense, 7 years for PCI DSS 4.0 incident-response records, plus per-statute state lemon law retention. End-to-end replay rewinds any past PDP render to its source snapshots and re-runs with the current variation, rendering, experimentation, personalization, and compliance versions so the operator catalog-ops and counsel teams can audit changes. Cross-skill handoffs route into the inventory-aware-marketing agent (live inventory and fulfillment-node state), the per-state action decisioning skill, the BOPIS friction detection skill, the real-time multi-location inventory state monitoring skill, the cause-aware cart abandonment recovery skill, the per-channel product description orchestration skill, the SKU-by-channel bulk description orchestration skill, the multi-source catalog ingestion skill, the catalog conflict resolution and golden-record emission skill, the real-time catalog change-event emission skill, the per-marketplace policy validation skill, the per-channel policy validation skill, the versioned product history for recall traceability skill, the 17-schema-class JSON-LD generation skill, the schema auto-remediation skill, the canonical-tag management skill, the rich-result eligibility scoring skill, the per-vertical catalog schema validation skill, the multi-vendor receipt joining and offline attribution skill, the multi-vendor call tracking integration skill, the per-location visitor intent enrichment skill, the master record canonicalization skill, the runtime-readable behavioral cohorts skill, the cross-touchpoint identity resolution skill, the deterministic-probabilistic hybrid identity resolution skill, the versioned customer history for DSAR skill, the versioned-history regulatory defense skill, the anomaly detection skill, the false-positive suppression skill, the per-platform compliance gating skill, the per-jurisdiction compliance for multi-state franchise skill, the per-vertical compliance overlay skill, and the marketing compliance overlay for regulated industries skill.

Engage Completions

Completions builds and operates the inventory-aware PDP variation bundle on the inventory-aware-marketing agent end- to-end. Operator owns the variation matrix, the rendering- strategy spec, the A/B test and bandit configuration, the personalization stack, the compliance overlay rule library, the orchestration code, the LLM prompts, and the audit trail. Operator can in-house at any time.