Fulfillment Constraints Function API overview
The Fulfillment Constraints API enables you to have a higher degree of customization when defining fulfillment and delivery strategies. With this API, checkout won't return any shipping rates if the configured constraints can't be met.
Example use cases
Anchor link to section titled "Example use cases"- Ensure that
n
cart line items are fulfilled from the same location. - Ensure that
n
cart line items are fulfilled from any of the locations in a list.
Currently supported constraint types
Anchor link to section titled "Currently supported constraint types"MustFulfillFrom
: Specifies a list of locations where cart items must be fulfilled from. If the cart items with constraints are not stocked at any of the locations in the list, then checkout won't return any shipping rates and completion of checkout will be blocked.MustFulfillFromSameLocation
: Specifies that cart items must be fulfilled from the same location. If the cart items with constraints aren't stocked at the same location, then checkout won't return any shipping rates and completion of checkout will be blocked.
Developer tools and resources
Anchor link to section titled "Developer tools and resources"Limitations and considerations
Anchor link to section titled "Limitations and considerations"- The Fulfillment Constraints API doesn't currently support local pickup.
- Customized constraint types aren't currently supported.
- The Function's title and description are merchant-facing values, and are rendered as part of the user interface in the Shopify admin settings under Shipping and delivery > Order routing.
Shopify plans
Anchor link to section titled "Shopify plans"All plans: Stores on any plan can use public apps that are distributed through the Shopify App Store and contain Shopify Functions.
Shopify Plus: Only stores on a Shopify Plus plan can use custom apps that contain Shopify Function APIs.
- Learn how to use Shopify Functions by building fulfillment constraints.