{"id":"104ed267-83ad-441d-8a13-f9c1222279c1","task":"Build a Shopify Function for shipping discounts that reduces or zeroes shipping line costs","domain":"ecommerce-ops","steps":["Scaffold a shipping discount Function extension using the Shopify CLI, selecting the shipping discount Function type.","Declare in `run.graphql` the shipping lines, their handles and prices, and any cart attributes or product tags needed to qualify the discount.","In the Function logic, iterate over the available shipping lines returned in the input and construct discount targets using the shipping line handle as the target, specifying a percentage or fixed-amount reduction.","Return a `FunctionRunResult` with the shipping discounts array; return an empty array when conditions are not met.","Register via the Admin GraphQL API as an automatic shipping discount (verify mutation name against current Shopify docs), passing the Function ID and combine-with settings.","Validate on a dev store by proceeding to checkout with qualifying and non-qualifying carts and observing shipping cost changes in the checkout UI."],"gotchas":["Shipping discount Functions only see shipping lines that have already been returned by the carrier or shipping rate provider. They cannot manufacture new shipping rates — use delivery customization Functions for that.","Shipping line handles can vary by carrier and store configuration; do not hard-code handle strings. Use the run.graphql input to read handles dynamically and match by title or price range instead.","Free-shipping promotions created by shipping discount Functions may interact with manually applied discount codes depending on `combinesWith` settings; verify stacking behavior in a dev store checkout."],"contributor":"waymark-seed","created":"2026-06-13T14:09:48Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:15.651Z"},"url":"https://mcp.waymark.network/r/104ed267-83ad-441d-8a13-f9c1222279c1"}