--- title: About location rules description: >- Learn how to use Shopify Functions to customize how orders are fulfilled during checkout. source_url: html: >- https://shopify.dev/docs/apps/build/orders-fulfillment/order-routing-apps/location-rules md: >- https://shopify.dev/docs/apps/build/orders-fulfillment/order-routing-apps/location-rules.md --- ExpandOn this page * [What you'll learn](https://shopify.dev/docs/apps/build/orders-fulfillment/order-routing-apps/location-rules.md#what-youll-learn) * [Requirements](https://shopify.dev/docs/apps/build/orders-fulfillment/order-routing-apps/location-rules.md#requirements) * [Tutorials](https://shopify.dev/docs/apps/build/orders-fulfillment/order-routing-apps/location-rules.md#tutorials) * [Developer tools and resources](https://shopify.dev/docs/apps/build/orders-fulfillment/order-routing-apps/location-rules.md#developer-tools-and-resources) # About location rules You can use location rules to rank the possible locations for a line item during checkout. In this tutorial series, you'll use [Shopify Functions](https://shopify.dev/docs/api/functions/current) to create a function that prioritizes locations in a particular country defined by the user. Beta Location rules is a new feature that's only available by request. Reach out to [Shopify Plus Support](https://help.shopify.com/en/support/plus) to know more about your eligibility and the requirements for the beta program. *** ## What you'll learn In this tutorial series, you’ll learn how to do the following tasks: * Set up your environment to use functions. * Create a location rule function. * Add configuration options to your location rule function using metafields. * Build a location rule user interface using [Admin UI extensions](https://shopify.dev/docs/api/admin-extensions). *** ## Requirements Plus Only stores on the [Shopify Plus](https://www.shopify.com/plus) plan can use custom order routing location rules. * You're a [user with app development permissions](https://shopify.dev/docs/apps/build/dev-dashboard/user-permissions). * You've created a [development store](https://shopify.dev/docs/api/development-stores#create-a-development-store-to-test-your-app). * You've [created an app](https://shopify.dev/docs/apps/build/scaffold-app) using Shopify CLI. If you previously installed Shopify CLI, then make sure that you're using the [latest version](https://shopify.dev/docs/api/shopify-cli#upgrade). Start with the [React Router app template](https://shopify.dev/docs/api#app-templates) if you plan to make your location rule configurable and create a UI for it. Otherwise, start with an [extension-only app](https://shopify.dev/docs/apps/build/app-extensions/build-extension-only-app) and let Shopify host it for you.If you plan to create a UI for your extension, then start with the [React Router app template](https://shopify.dev/docs/api#app-templates). * You've installed [Node.js](https://nodejs.org/en/download) 16 or higher. * You've [installed your app](https://shopify.dev/docs/apps/build/scaffold-app#step-3-install-your-app-on-your-development-store) on the development store. - You're using API version 2025-07 or higher for your function. ### Rust-specific requirements The following requirements are specific to Rust-based development with Shopify Functions. * You've installed [Rust](https://www.rust-lang.org/tools/install). On Windows, Rust requires the [Microsoft C++ Build Tools](https://docs.microsoft.com/en-us/windows/dev-environment/rust/setup). Make sure to select the **Desktop development with C++** workload when installing the tools. * You've installed the [`wasm32-unknown-unknown` target](https://doc.rust-lang.org/rustc/platform-support/wasm32-unknown-unknown.html): ## Terminal ```terminal rustup target add wasm32-unknown-unknown ``` *** ## Tutorials Follow the tutorial series to go from "Hello World" to a functional location rules experience. [![](https://shopify.dev/images/icons/48/globe.png)![](https://shopify.dev/images/icons/48/globe-dark.png)](https://shopify.dev/docs/apps/build/orders-fulfillment/order-routing-apps/location-rules/build-location-rule-function) [Tutorial 1: Getting started with building location rules](https://shopify.dev/docs/apps/build/orders-fulfillment/order-routing-apps/location-rules/build-location-rule-function) [Create a new location rule function.](https://shopify.dev/docs/apps/build/orders-fulfillment/order-routing-apps/location-rules/build-location-rule-function) [![](https://shopify.dev/images/icons/48/gear.png)![](https://shopify.dev/images/icons/48/gear-dark.png)](https://shopify.dev/docs/apps/build/orders-fulfillment/order-routing-apps/location-rules/add-configuration) [Tutorial 2: Make your location rule function configurable](https://shopify.dev/docs/apps/build/orders-fulfillment/order-routing-apps/location-rules/add-configuration) [Add configuration to your location rule function using metafields.](https://shopify.dev/docs/apps/build/orders-fulfillment/order-routing-apps/location-rules/add-configuration) [![](https://shopify.dev/images/icons/48/blocks.png)![](https://shopify.dev/images/icons/48/blocks-dark.png)](https://shopify.dev/docs/apps/build/orders-fulfillment/order-routing-apps/location-rules/build-ui) [Tutorial 3: Build a location rule user interface](https://shopify.dev/docs/apps/build/orders-fulfillment/order-routing-apps/location-rules/build-ui) [Build a new page in your app where merchants can view location rules.](https://shopify.dev/docs/apps/build/orders-fulfillment/order-routing-apps/location-rules/build-ui) *** ## Developer tools and resources Explore the following developer tools and resources to get familiar with building location rules. [![](https://shopify.dev/images/icons/48/graphql.png)![](https://shopify.dev/images/icons/48/graphql-dark.png)](https://shopify.dev/docs/api/functions/reference/order-routing-location-rule) [Order Routing Location Rule API reference](https://shopify.dev/docs/api/functions/reference/order-routing-location-rule) [Consult the GraphQL reference for the Order Routing Location Rule API.](https://shopify.dev/docs/api/functions/reference/order-routing-location-rule) [![](https://shopify.dev/images/icons/48/javascript.png)![](https://shopify.dev/images/icons/48/javascript-dark.png)](https://shopify.dev/docs/apps/build/functions/programming-languages) [Language support](https://shopify.dev/docs/apps/build/functions/programming-languages) [Learn about the language support and tooling that are available in Shopify Functions.](https://shopify.dev/docs/apps/build/functions/programming-languages) *** * [What you'll learn](https://shopify.dev/docs/apps/build/orders-fulfillment/order-routing-apps/location-rules.md#what-youll-learn) * [Requirements](https://shopify.dev/docs/apps/build/orders-fulfillment/order-routing-apps/location-rules.md#requirements) * [Tutorials](https://shopify.dev/docs/apps/build/orders-fulfillment/order-routing-apps/location-rules.md#tutorials) * [Developer tools and resources](https://shopify.dev/docs/apps/build/orders-fulfillment/order-routing-apps/location-rules.md#developer-tools-and-resources)