When an order is created by Shopify, and [delivery anchors](/docs/apps/build/purchase-options/subscriptions/selling-plans#anchors) exist, the order contains delayed fulfillment orders for prepaid items. This guide describes how to keep your orders and subscription contracts in sync, and covers some common order management scenarios that relate to fulfillment orders and subscription contracts.
> Warning:
> [Order editing](/docs/apps/build/orders-fulfillment/order-management-apps/edit-orders) in the Shopify admin isn't supported for orders with prepaid subscriptions.
## Keeping orders and subscription contracts in sync
Changes to prepaid subscription contracts aren't automatically reflected on the associated orders. For example, when a customer updates their address for a prepaid subscription in an app, their address isn't automatically updated in the order.
The following diagram shows the required actions that your app must take to sync updates for prepaid subscription contracts:
- If the item hasn't been billed for, then update the information on the subscription contract using the [`subscriptionContract`](/docs/api/admin-graphql/latest/objects/subscriptioncontract) and [`subscriptionDraft`](/docs/api/admin-graphql/latest/objects/subscriptiondraft) objects.
- If the item has been billed for, then update the information on the order using the [`Order`](/docs/api/admin-graphql/latest/objects/order) and [`FulfillmentOrder`](/docs/api/admin-graphql/latest/objects/fulfillmentorder) objects.
> Tip:
> Learn how to interact with the [`SubscriptionDraft`](/docs/api/admin-graphql/latest/objects/subscriptiondraft) object by completing the [Update a subscription contract](/docs/apps/build/purchase-options/subscriptions/contracts/update-a-subscription-contract) tutorial.
### Managing cancellations
The cancellation of orders doesn't automatically cancel related subscription contracts. It's recommended that apps subscribe to the [`orders/cancel`](#order-webhooks) webhook and communicate with merchants when subscription contract orders are cancelled, so that merchants know that the subscription contract hasn't also been cancelled.
#### Subscription cancellation through a customer portal
When a customer cancels a subscription order through the customer portal, apps need to notify the merchant of this cancellation. If the cancellation is initiated through the app, then the app needs to handle the associated [refunds](/docs/apps/build/purchase-options/subscriptions/fulfillments#refunds). This applies to both prepaid and subscribe-and-save subscriptions.
## Order tagging
Merchants often identify and filter subscription orders in the Shopify admin. To tag orders for subscriptions from your app, you can call the [`tagsAdd`](/docs/api/admin-graphql/latest/mutations/tagsadd) mutation. The following example adds tags to a specified order using the order ID:
## Automatic fulfillment
Scheduled fulfillment orders aren't eligible for [automatic fulfillment](https://help.shopify.com/manual/checkout-settings/order-processing#automatically-fulfill-orders). However, if a prepaid subscription order is created with its first fulfillment order set to the `OPEN` state, then the fulfillment order is automatically fulfilled.
## Order CSV export
Apps that use CSV exports to manage fulfillments can rely on the value of `lineItem.fulfillableQuantity` to determine which orders are ready to fulfill. This is because `SCHEDULED` fulfillment orders aren't included in the calculation of the order `lineItem.fulfillableQuantity`.
For example, consider a fulfillment order scheduled to ship on January 15. Before January 15, `lineItem.fulfillableQuantity` is set to 0. After January 15, `lineItem.fulfillableQuantity` is set to 1. Then, after the item is fulfilled, `lineItem.fulfillableQuantity` is set back to 0.
## Order webhooks
Your app can subscribe to order webhooks that are useful for apps that manage fulfillment orders for merchants. The following examples show the JSON responses from each of the available webhooks.
To learn how to set up and consume webhooks, refer to [Webhooks configuration](https://shopify.dev/apps/webhooks/configuration).
> Note:
> To know when items should be fulfilled, apps should query `fulfillmentOrders` when they receive the `orders/create` webhook. If apps don't query `fulfillmentOrders` and submit a request to create fulfillments for items that shouldn't be fulfilled yet, then the request fails.
## Next steps
- Learn about [fulfillments for prepaid subscriptions](/docs/apps/build/purchase-options/subscriptions/fulfillments).