--- title: Request and accept fulfillment orders description: >- Fulfill orders from your custom backend or ERP, and request fulfillment from suppliers. source_url: html: 'https://shopify.dev/docs/apps/build/collective/orders' md: 'https://shopify.dev/docs/apps/build/collective/orders.md' --- ExpandOn this page * [How it works](https://shopify.dev/docs/apps/build/collective/orders.md#how-it-works) * [Sync Shopify orders with a custom backend](https://shopify.dev/docs/apps/build/collective/orders.md#sync-shopify-orders-with-a-custom-backend) * [Request fulfillment orders](https://shopify.dev/docs/apps/build/collective/orders.md#request-fulfillment-orders) * [Accept fulfillment orders](https://shopify.dev/docs/apps/build/collective/orders.md#accept-fulfillment-orders) * [Next steps](https://shopify.dev/docs/apps/build/collective/orders.md#next-steps) # Request and accept fulfillment orders Once orders are placed on a retailer store, Collective takes care of creating orders on the supplier stores, so suppliers can fulfill orders to the end buyer. In this guide you'll learn: * How can you push orders to a custom backend or ERP * How retailers can programmatically request fulfillment for orders managed by suppliers * How suppliers can drive fulfillments from custom backends such as OMS, WMS *** ## How it works 1. The order is first created on the retailer store. 2. A fulfillment request is sent to the supplier. 3. Collective automatically debits the retailer's `Shopify Payments` account. 4. The supplier fulfills the order. 5. Collective automatically credits the supplier's `Shopify Payments` account. *** ## Sync Shopify orders with a custom backend As a retailer, the orders you receive for Collective products will have a `Shopify Collective` tag. After the order is paid, there's a 2 minute delay to complete [fraud checks](https://help.shopify.com/manual/online-sales-channels/shopify-collective/retailers/managing-collective-orders). If the order isn't on hold, then Collective automatically sends a fulfillment request to the suppliers. This process links the retailer's fulfillment order with the supplier's order. Once the order is created on the supplier side, the retailer order will also be tagged with `{$supplier_name}`. You can see the supplier order number that is linked to your order and the associated shipping cost in the `Additional Notes`. You can retrieve these notes by querying the order [`customAttributes`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderInput#field-customattributes). You can listen to the following webhooks to synchronize orders into your system: * [`orders/create`](https://shopify.dev/docs/api/webhooks?reference=toml#list-of-topics-orders/create) * [`orders/updated`](https://shopify.dev/docs/api/webhooks?reference=toml#list-of-topics-orders/updated) As a retailer you can mark the order as paid using [`orderMarkAsPaid`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/orderMarkAsPaid). If you have `Automatic Payments ON` (configured in your Collective settings), marking the order as paid will also trigger a debit operation on your `Shopify Payments` account that subtracts the funds needed to pay the suppliers. Suppliers are paid once they fulfill the order on their side. As a supplier, you'll see the order on your store once the retailer sends a request for fulfillment. You can listen to the following webhooks to synchronize orders into your system. * [`orders/create`](https://shopify.dev/docs/api/webhooks?reference=toml#list-of-topics-orders/create) * [`orders/updated`](https://shopify.dev/docs/api/webhooks?reference=toml#list-of-topics-orders/updated) Orders created by Collective will have the `Shopify Collective` and `{$retailer_name}` tags associated with them. You can see the retailer order number that is linked to your order in the `Additional Notes`. You can retrieve these notes by querying the order [`customAttributes`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/OrderInput#field-customattributes). *** ## Request fulfillment orders Retailers can programmatically request a fulfillment for the supplier orders using [`fulfillmentOrderSubmitFulfillmentRequest`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fulfillmentOrderSubmitFulfillmentRequest). You can then listen to the following webhooks to know if this has been accepted by the supplier: * [`fulfillment_orders/fulfillment_request_accepted`](https://shopify.dev/docs/api/webhooks?reference=toml#list-of-topics-fulfillment_orders/fulfillment_request_accepted) * [`fulfillment_orders/fulfillment_request_rejected`](https://shopify.dev/docs/api/webhooks?reference=toml#list-of-topics-fulfillment_orders/fulfillment_request_rejected) You can see the order has been fulfilled by checking if the `displayFulfillmentStatus` is `"FULFILLED"`: ## POST https\://{shop}.myshopify.com/api/{api\_version}/graphql.json ## GraphQL query ```graphql query OrderFulfillmentStatus($orderId: ID!) { order(id: $orderId) { displayFulfillmentStatus } } ``` ## JSON response ```json { "order": { "displayFulfillmentStatus": "FULFILLED" } } ``` You can check the status of the automatic payments for a particular order by querying your [`shopifyPaymentsAccount`](https://shopify.dev/docs/api/admin-graphql/latest/queries/shopifyPaymentsAccount) and looking at the adjustments the [`associatedOrder.id`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsBalanceTransaction#field-associatedorder). *** ## Accept fulfillment orders As a supplier, when you are ready to fulfill a specific order, you can do so by invoking [`fulfillmentCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/fulfillmentCreate). If you have `Automatic Payments ON`, Collective will perform a credit operation on your [Shopify Payments](https://help.shopify.com/manual/payments/shopify-payments/getting-paid-with-shopify-payments) account once the order is fulfilled. You can check the status of the automatic payments for a particular order by querying your [`shopifyPaymentsAccount`](https://shopify.dev/docs/api/admin-graphql/latest/queries/shopifyPaymentsAccount) and looking at the adjustments for the [`associatedOrder.id`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ShopifyPaymentsBalanceTransaction#field-associatedorder). *** ## Next steps * Learn how to [request cancellations](https://shopify.dev/docs/apps/build/collective/cancellations). *** * [How it works](https://shopify.dev/docs/apps/build/collective/orders.md#how-it-works) * [Sync Shopify orders with a custom backend](https://shopify.dev/docs/apps/build/collective/orders.md#sync-shopify-orders-with-a-custom-backend) * [Request fulfillment orders](https://shopify.dev/docs/apps/build/collective/orders.md#request-fulfillment-orders) * [Accept fulfillment orders](https://shopify.dev/docs/apps/build/collective/orders.md#accept-fulfillment-orders) * [Next steps](https://shopify.dev/docs/apps/build/collective/orders.md#next-steps)