Generate a delivery customization Function extension via the Shopify CLI.
Query the available delivery options and their handles in `run.graphql`, along with any cart or buyer fields needed for your logic.
In the Function `run` body, build a `FunctionRunResult` with an `operations` array — use move, hide, or rename operations on delivery option handles to adjust what buyers see at checkout.
Register the Function as a delivery customization via the Admin GraphQL API (verify the mutation name against current Shopify docs), providing the Function ID and a descriptive title.
Test by checking out with different cart configurations on a dev store and confirming the delivery option list changes as expected.
Handle the case where an expected delivery option handle is absent (carrier not applicable for the address) by making hide/rename operations conditional on handle presence.
Known gotchas
Delivery customization Functions can only operate on delivery options that Shopify's shipping engine has already returned; they cannot inject new rates. For custom rate injection, use a carrier service API endpoint instead.
The order of operations in the `operations` array matters — if you move an option and then hide it, the hide applies to the post-move position. Test operation ordering carefully.
If multiple delivery customization Functions are active on a store, they run in sequence and each sees the output of the previous. Ensure your Function is idempotent and does not conflict with other active customizations.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp