In-house Bundle Builder: Requirements & Scope

DogMama (dogmama.cz) · Replacement for the Foxsell build-your-own-box bundle · 25 Nov 2026, updated 26 Nov · Technical claims checked against Shopify, Google Cloud and Railway docs (sources at the end)

1. Summary

We should build it. Most of the builder page already exists as our own theme code: about 80 to 90% of the builder UI can be reused. Foxsell holds the bundle settings, does the pricing and groups the cart behind it. New work is the settings (admin app), the pricing logic (a Shopify Function), the cart grouping and moving the builder into an app block.

2. How Foxsell works for us today

We use one Foxsell feature, the Dynamic Add-on bundle ("Quantity as an option"). Everything the shopper sees is our own theme code.

PartToday (Xmas box 2026)Who does it
Builder pagexmas-box template: hero, builder, info and the store's standard FAQ section. Tier pick (2 or 4, switches automatically as items are added), category tabs (e.g. "Vitamlsky & další doplňky"), slots, progress bar, price summary, mobile bottom sheet. Sold-out variants hidden.Our theme
Bundle settingsTiers 2 and 4 at 20% / 25%, eligible products and variants, categories. Stored by Foxsell in metafield app--67872686081.dynamic_add_ons_bundle; the builder reads the % from there.Foxsell
Parent product"Vánoční balíček" with one variant per tier. Two Foxsell bundles: CZ and SK (vianocny-balicek, unlisted). None for PL / ES.Foxsell + admin
Gift boxFree box product per tier (box-of-2 / box-of-4, CZ and SK variants), linked by variant metafield custom.bundle and added as an add-on. Our builder picks the right box; Foxsell does not check it.Our theme + admin
CartOne parent line per box with __foxsell properties and _box_no. Foxsell's Cart Transform expands it into item lines with _Bundle.Foxsell
DiscountFoxsell applies it on the CZK base price. In SK it is converted at the daily rate, so the charged price differs from what we show, in both directions (most combos cheaper, some more expensive). Foxsell confirmed fixed market prices are not on their roadmap.Foxsell
Warehouse (Supply.do)Since 24 Nov every item in a box has Box: Box N. "+" on a box in the cart adds a new box, remove takes out the whole box. Our theme sets the label; Foxsell's Cart Transform copies it onto the order lines. Supply.do (Jan) has not yet confirmed they read it.Our theme + Foxsell
MarketsCZ live since 16 Nov. SK on hold commercially. PL and ES not offered.Our theme + admin

3. Feature requirements

v1 = needed to switch off Foxsell. later = after launch.

3.1 Bundle setup (admin app)

Requirement
v1Several bundles (each new offer is its own bundle on its own product), each with name, status (draft / active / paused), optional start and end dates.
v1Tiers per bundle: box size (2, 3, 4…) and % off per size, or a fixed amount off.
v1Eligible products by product, variant or collection. Categories (tabs) with name and order.
v1Markets per bundle (CZ, SK, PL, ES) with the eligible variant per market, because the store uses separate market variants.
v1Gift box per tier and per market, added free and automatically.
v1Rules: same product more than once yes/no, max per product, sold-out items hidden or greyed.
v1Discount combinations: shipping discounts only. The box discount does not combine with 2+1 offers or with product or order codes.
laterReport: boxes sold, revenue, most picked products per market and month (needs order access).
laterDuplicate a bundle (e.g. copy last year's Xmas box). Gift note per box (built once, removed at the client's request).

3.2 Storefront builder

Requirement
v1Builder as an app block (theme app extension). It works on any Online Store 2.0 theme, and theme updates don't break it. After a switch to a new theme, the block is added again in the theme editor.
v1Starts from the approved Xmas builder UI: tier picker, tabs, product cards with + / −, slots, progress bar, summary (was / discount / now), mobile bottom sheet. Built so any design the client asks for can be applied.
v1Prices in the shopper's market currency, matching checkout to the cent (SK fixed EUR included).
v1Texts in CS, SK, PL, ES, EN. Fixed UI texts ship with the app (we change them). Headings, banners, colours and images are block settings in the theme editor. Whether Translate & Adapt picks up app block settings is not documented; we test it on the dev store.
v1"Not available in your country" message for markets without the bundle.
v1Fast on mobile (no call to our server), keyboard and screen reader friendly, add-to-cart and purchase analytics events.

3.3 Cart, checkout and orders

Requirement
v1"Add box" puts the whole box in the cart in one go, with a unique hidden box id (_bundle_id, not shown to customers) and Box: Box N (shown in cart and checkout, as today).
v1Discount applied by Shopify through our Function, only for complete boxes. The Function re-checks every box (size, eligible variants, market) and trusts nothing sent from the browser.
v1Cart drawer and cart page show the box as a group: "+" adds a new box, remove takes out the whole box, item quantities inside a box are locked. The drawer is theme code, so this part is redone if the theme changes.
v1Orders keep Box: Box N on each line for Supply.do, plus an order tag (via Shopify Flow, included in Plus).
v1Defined behaviour when an item sells out while in the cart, when the shopper switches market with a full cart, and for express checkout (Shop Pay, Apple Pay).
v1Stock, shipping profiles and invoicing work as today, since items stay real product variants.

3.4 Migration

4. How the app will work

The design keeps our server out of the shopper's path. Bundle settings are saved inside Shopify, the builder reads them on the page, and the price is calculated by Shopify itself.

Shoppers only ever touch Shopify; our server serves the admin only Google Cloud Bundle app (Cloud Run) Admin screens, login, webhooks Firestore Login sessions + API tokens Secret Manager Shopify (runs even if our server is down) Bundle settings Metaobjects + a JSON copy on the discount Builder (app block) On the product page; adds the box to the cart Cart / checkout Lines tagged Box N Shopify Function 20% / 25% per complete box Order → Supply.do saves reads rules Only the "saves" arrow crosses to Google Cloud, and only when the team edits a bundle.
  1. Setup: the team creates a bundle in the app inside Shopify admin. The app saves it as Shopify metaobjects, and saves a compact JSON copy on the discount, because a Function can read metafields but not metaobjects.
  2. Page: the app block reads the metaobjects directly in Liquid, with no call to our server. Lists over 50 products need pagination, which is built in.
  3. Add to cart: the builder adds the box with a unique box id and Box: Box N.
  4. Price: on every cart change, Shopify runs our Function. It finds complete boxes and takes the tier % off, using the price in the shopper's currency (confirmed in Shopify's docs).
  5. Order: items, stock and shipping work as normal variants. Supply.do sees which box each line belongs to.

One choice to settle in the first build day

Shopify offers two ways to price the box. Both run on Shopify, and the rest of the plan is the same.

A. Discount FunctionB. Cart Transform (what Foxsell uses)
Cart / checkoutSeparate lines per item, discount on eachOne "Box" line that expands to its items
SK fixed EUR priceExact: confirmed in Shopify's docsLikely exact, to be proven in the test
Cart drawer workMore: our own grouping, locked quantitiesLess: one line per box, "+" and remove are native
Order shape for Supply.doNormal lines with Box NSame shape as today
NeedsNothing extraA parent "Box" variant per tier and market (these exist today); Foxsell's transform removed first

Plan: a 1-day test on the dev store (SK EUR price, Box N on the order, a Supply.do test order). If B passes, we use B; if not, A, which is proven. The ETA below covers A, the larger of the two.

Tech: Shopify app template (React Router, the successor of the Remix template Stockline uses), Shopify Functions in Rust or JS, theme app extension. The store is on Shopify Plus, which is required for a custom app with Functions.

5. Roughly how it will look

The storefront starts from the look the client approved for the Xmas box. Design stays flexible, so a new client design can be applied later. Step 2 shows it properly.

Storefront (desktop): banner · step 1 "Choose your box": cards for Box of 2 (−20%) and Box of 4 (−25%) · step 2: category tabs over a product grid, each card with image, name, price, + / − · right column (bottom sheet on mobile): box slots, progress bar, price summary (was / discount / now), free gift box line, "Add box to cart" · below: "How it works" in 3 steps and the FAQ.
Admin app: (1) Bundles list: name, status, markets, dates. (2) Bundle editor: General (name, dates, status), Tiers (size + %), Products & categories (Shopify product picker), Markets & boxes (variant per market, box per tier), Rules & combinations. Built with Shopify's own admin components, so it looks like the rest of Shopify admin.

6. What we need from you

ItemWhy / detail
Google Cloud projectA project with billing on, Owner or Editor access for me, and a budget alert owner.
Foxsell plan and renewal dateTo time the switch-off after Christmas and know the saving.
Supply.do (Jan)Confirm they read Box: Box N from order lines (not confirmed yet), and whether they also use the cart note Box_of_2 / Box_of_4 that the cart drawer writes today.

Decided (26 Nov 2026)

ItemDecision
GitHub orgGrow-with-CRO. We already have access.
Dev storeWe have one.
New offersBundles work as in Foxsell. A new offer is a new bundle on a new product; nothing is tied to a season.
DesignFlexible: whatever design the client asks for, we can apply it. The builder starts from the Xmas UI, and texts, colours and images are theme editor settings. A new layout from the client is a design change on the app block, quoted per request.
Discount combinationsThe box has its own offer price, so it combines only with shipping discounts. No 2+1, no product or order discount codes on box items.

7. ETA by step

Working days, one developer. The clock pauses while we wait for answers or approvals. Estimates were reviewed independently against the current theme code.

Step / taskDaysOutput
Step 1. Requirements doc: 1 to 2 days
Draft (this doc) + revision after your answers1–2Final requirements
Step 2. Front-end mockup: about 3 days
Storefront builder, desktop + mobile, cart drawer1.5–2Static HTML/CSS, local
Admin screens: bundle list + editor1Static HTML/CSS
Step 3. Full build: about 37 days + 15–20% buffer
Repo, app scaffold, Google Cloud project, CI/CD, secrets, session storage; Discount vs Cart Transform test (1 day)4App installs on dev store; approach decided
Metaobject definitions, access scopes1Data model
Admin: bundle list and editor4Team can create bundles
Admin: per-market variants and gift box per tier per market2Market mapping
Sync settings to the automatic discount on save1.5Function config in place
Function + automated tests3.5Correct % in all markets
Checkout validation (partial boxes, lone gift box, tampered data)1.5Optional; not needed with Cart Transform
Builder app block (port of the Xmas builder, new data layer, own translations)5.5Works on any 2.0 theme
Cart drawer and cart page: grouping, Box N, "+" = new box, remove whole box3.5About 1 day with Cart Transform
Markets CZ / SK / PL / ES2+1–2 days if PL / ES variants must be set up
Order tag via Shopify Flow, Supply.do test orders1Supply.do-ready orders
Analytics events, accessibility, mobile performance1.5
Monitoring: uptime check, log alerts, budget alert0.5
QA: tiers × markets × discount combinations, sold-out item, express checkout, Foxsell overlap3.5Test report
Migrate Xmas settings, switch rehearsal on test theme, rollback plan1.5
Go-live, 2 days of watching, handover notes2Live + docs
Buffer for client feedback and waits (15–20%)5–7
Total, all three steps≈ 47–51About 9 to 10 weeks

If the Cart Transform test passes, the build drops by about 3 to 4 days.

8. Hosting: Google Cloud vs Railway

My take: yes to Google Cloud, using Cloud Run. But uptime matters less than it seems. Shoppers never hit our server. If it goes down, only the admin screens stop; the builder, the pricing and checkout keep working.

Google Cloud (Cloud Run)Railway
Uptime99.95% monthly uptime SLA; each service runs across several zones by defaultNo contractual SLA below Enterprise; published targets 99.9% (Hobby), 99.99% (Pro). Fine for Stockline so far
CLIgcloud: deploy, logs, secrets, IAMrailway: deploy, logs, variables, ssh. The CLI alone is no reason to move
Cost (approximate)Close to €0 with scale to zero (free tiers of Cloud Run, Firestore, Secret Manager). One always-warm instance: about €8–12 a monthHobby $5/month incl. $5 usage (one small service + Postgres); Pro $20/month
Setup effortMore: project, billing, IAM, deploy keys (in the ETA)Less, and we already know it
DownsideTwo platforms to look after while Stockline stays on Railway

How I would set it up

  1. One GCP project (e.g. dogmama-bundles) in europe-west3 (Frankfurt). Warsaw and Berlin cost the same; Belgium is about 30% cheaper. Latency doesn't matter for an admin-only app.
  2. Cloud Run for the app, request-based billing, scale to zero. Optionally 1 warm instance (about €8–12 a month) so the admin opens without a cold start.
  3. Firestore for login sessions and API tokens. Shopify has no ready-made Firestore adapter, so we write a small one (about half a day, in the ETA). It is needed because Shopify's API tokens for new apps now expire every hour and must be refreshed safely. The alternative is Cloud SQL Postgres with Shopify's standard adapter, at about €8–10 a month.
  4. Secret Manager for the Shopify keys (free up to 6 secret versions). No secrets in the repo; gitleaks scan in CI.
  5. Deploy: merge to main → GitHub Action with Workload Identity Federation (no key files) → Cloud Run. A manual deploy is one command, gcloud run deploy --source .. Functions, the app block and app settings deploy separately with shopify app deploy.
  6. Uptime check with email alert (free at this volume) and a budget alert. A budget alert only emails; it does not stop spending.

9. Risks and open questions

Sources

Shopify: Functions (Plus requirement) · Discount Function API · Functions and currencies · Cart Transform API · Discount combinations · API versioning · Theme app extensions · Metaobject limits · App template · Session storage adapters · Expiring tokens
Google Cloud: Cloud Run SLA · Cloud Run pricing · Firestore pricing · Secret Manager pricing · Locations · deploy-cloudrun
Railway: Pricing · Plans · CLI
Internal: Xmas_Box_GoLive_Plan.md, Xmas_Box_SupplyDo_Task.md, live theme code (24 Nov 2026), Foxsell support replies 13–17 Nov 2026.