Shopify Functions
Shopify Functions development
I write discount, cart validation, line transformation, shipping and payment Functions in JavaScript or Rust, with a tight input query and tests. If your business rule does not fit an App Store app, it fits here.
When a Function is the answer
When the rule is yours. The three cases that reach me most:
- Validations that block checkout. Full cases, order minimums, not mixing price tiers, a product that requires another. The platform ships per-variant minimums, but nothing that looks at the whole cart.
- Discounts no app calculates the same way. Tiered by product family, by company location, mutually exclusive combinations.
- Conditional shipping and payments. Hiding cash on delivery above a value, reordering methods by weight, hiding a carrier for one zone.
If what you need is one of the standard discounts, an App Store app is cheaper and somebody else maintains it. I will tell you if that is the case.
How I write them
What separates a Function that holds up from one that fails on the first large order is not the logic: it is the input.
A Function has an execution budget on the order of 11 million instructions and a 128 kB cap on its input. On a ten-line cart that is invisible. On a 200-line wholesale order pad, every extra field you ask for is multiplied by 200. So the input query asks for exactly the fields the code reads, with aliases so metafields arrive under a readable name.
The second detail, the one that costs two days of support when forgotten: buyerJourney. A validation that blocks at every step stops the buyer from typing 7 on the way to 12. You block at checkout, not while the cart is being edited.
What you can see before hiring me
A complete validation Function, with its input query and its tests, is published in shopify-checkout-lab, and on the home page there is a Checkout Lab where you can change its configuration and watch what stops working. It is the same file that ships to a store.
How we work
First you describe the rule in words, with a real case and an edge case. If the rule can be solved without code (a catalog, some quantity rules), I say so and you save the development. If not, I write the Function with its tests, we deploy it to a development store and we try it against your ugliest cart before touching production.