The board / Operating

Plyco discount app

Live · January 2026 Shopify app for a timber retailer plyco.com.au

Quantity breaks, trade tiers and flash sales, settled at checkout by one rule: best price wins.

Rails

  • aloneReadsProducts, customers and carts from Shopify.
  • aloneWritesPrice rules, the audit log, and the discount on every checkout.
  • aloneMoneySets the price the customer pays.
  • alonePublicQuantity breaks show on product pages and in Google Shopping.
  • aloneUnattendedThe checkout function runs on every order, alone.
  • a person, on exceptionsDecidesStaff set the rules and can roll an import back.

Problem

Off-the-shelf discount apps stack rules in surprising ways and hide quantity pricing from Google Shopping. A timber retailer needs public price breaks, trade tiers and the odd flash sale without three apps fighting at the till.

One rule had to settle every argument at checkout, and it had to run inside Shopify's sandbox, fast.

System

Staff set rules in the admin. Rules and an audit log feed a Shopify Function written in Rust and compiled to WASM, which runs at checkout. By default the best price is applied and nothing stacks. A bad CSV import sits in staging and can be rolled back in one click.

Decisions

  1. The checkout function is Rust compiled to a 127 KB WASM module. JavaScript through Javy failed first, so the pricing logic moved to Rust.
  2. Best price wins and discounts never stack. Easy to explain to staff, harder to game.
  3. CSV imports land in a staging table with one-click rollback and an audit line for every change.
  4. Quantity breaks render through Theme App Extensions, so they show on the product page and in the Google Shopping feed.

Stack

Shopify Functions, Rust, WebAssembly, React Router 7, Polaris, Postgres (Neon), Inngest, Theme App Extensions