About the Delivery Customization Function API
The Delivery Customization API enables you to rename, reorder, and sort the delivery options available to buyers during checkout.
Example use cases
Anchor link to section titled "Example use cases"- Hide delivery options for certain products or customers
- Reorder delivery options according to user preference
- Hide delivery options for PO Box addresses
- Add messaging to delivery option titles
Developer tools and resources
Anchor link to section titled "Developer tools and resources"Migrating from scripts to functions
Anchor link to section titled "Migrating from scripts to functions"If you want to migrate an existing shipping script to Shopify Functions, then you can use the following mappings:
Shopify Scripts method | Description | Shopify Functions object | Additional context |
---|---|---|---|
change_name |
Changes the name of a delivery option | RenameOperation | |
sort |
Sorts the delivery options based on some criteria, typically to place one delivery option at the top or bottom of a list | MoveOperation | Instead of sorting, you can move individual delivery methods. |
delete_if |
Removes a delivery option from checkout | HideOperation |
Limitations and considerations
Anchor link to section titled "Limitations and considerations"The Delivery Customization API doesn't currently support draft orders.
In the Delivery Customization API, the carrier name is automatically prepended to the shipping method title at checkout when using the RenameOperation, and cannot be altered or omitted through the API. For example, if the carrier name is
UPS
and the method isStandard
, you could changeUPS Standard
toUPS Standard Shipping
, but you couldn't changeUPS Standard
toStandard Shipping
.
- Learn how to use Shopify Functions to rename a delivery option.