fabric's Order Management System (OMS), also referred to as fabric Orders, is a distributed order management (DOM) platform that helps retailers manage the order fulfillment process and provide inventory details, order fulfillment, and customer service. As retailers, not only can you receive, track, and fulfill customer orders across sales channels, you can allow customers to track their orders, route orders through warehouses based on the customer’s location, and more.

This document provides details related to inventory creation, management, rules to configure inventory that suits your business needs, order orchestration, order exchange logic, and more information about fabric's Orders service.

Note: In this document, the terms 'fabric Orders' and 'fabric OMS' are used interchangeably.

The following workflow diagram illustrates how fabric's Order Management System (also called fabric Orders) works:

OMS Workflow Diagram

Getting Started

fabric's Orders service supports modern distributed commerce models, including buy-online-pickup-in-store (BOPIS), ship-to-store (for store pick up or replenishment), and store fulfillment (as mini distribution centers) models. It not only offers network aggregation for enterprise-level inventory visibility but also enables retailers to modify order fulfillment logic without the need for coding, thereby reducing the burden on developer resources.

Core Concepts

fabric OMS consists of two independent data orchestration modules: Inventory and Orders. The following are some of the other core concepts that are used while creating or updating inventory:


Create a location, using location APIs, for which you want to create an inventory or update inventory. You must provide a unique location number while creating a location. Use this location number to manage inventory.

You can also create custom location attributes for a location by location number while creating or updating inventories. The following are two examples of location attributes:

  • BOPIS- to enable buy online and pick up in-store policy for a specific location.
  • Return- to enable inventory return policy for a warehouse in a specific location.


Inventory refers to the goods and products for sale. Inventory endpoints let you:

  • Bulk import inventory from other sources to fabric OMS using the bulk import feature on Copilot or using the bulk import endpoint.
  • Create or update inventory records, set up inventory availability rules, and set inventory quantities (using the counter object) to display an accurate available-to-purchase quantity using copilot UI or by using API. See Create Inventory section for more information.
  • You can query the inventory of a specific item (by itemId), and in a specific region by SKU and postal code.

For details, refer to the Inventory endpoints.


A Network is a group of locations that share inventory. Using network APIs, you can create custom networks (for example, ‘shipToHome’) to manage inventory within a specified set of locations. Use network endpoints to aggregate the quantity of the SKU in the “On Hand” and “Reserved” counter for a specified set of locations (warehouses or stores). You can specify “Safety Stock” inventory values for a network.


Counter refers to the position of the inventory, such as on-hand, allocated, shipped, etc. Using counter APIs, you can create any custom counter to suit your business needs. As per the on-hand counter quantity you pass in the request body while creating or updating inventory, availableToPurchase virtual-counter quantity is calculated based on the formula onHand-allocated-shipped. If you create a custom counter and mention it while creating or updating inventory, those custom counter quantities are also subtracted to calculate the availableToPurchase virtual counter quantity.

From the left-side navigation pane, refer to Orders > Developer Guide > Inventory Setup > Rules for Updating Counter Quantity for more information on how to use counters while creating or updating inventory.

Virtual Counter

Virtual Counter refers to the inventory quantity that is available to sell by calculating the difference between available inventory and reserved for-purchase inventory. It helps prevent over-promising of inventory by subtracting the reserved-for-purchase inventory count from the in-warehouse inventory count.

Use the “availableToPurchase” virtual counter with the formula On Hand - Reserved - Backordered - Ordered - Acknowledged - Safety Stock so that the virtual counter returns your physical inventory minus the reserved quantity.

Inventory Features

The inventory module of fabric OMS lets merchants:

  • Bulk imports inventory from all external sources of truth such as Warehouse Management System (WMS), Inventory Management System (IMS), or any other Point of Sale (POS).
  • Get the real-time quantity that is readily available to sell.
  • Create a network (group of locations) to aggregate inventory at different locations for a group of SKUs.
  • Create location attributes, such as isReturn (indicates if the location supports the return of sold items) or BOPIS (indicates if shoppers can buy the item online and pick it up in-store). These attributes represent inventory availability at a location level for omnichannel use cases.
  • Create safety stock to prevent overselling.
  • Flag stock levels of the item on the Product Description Page (PDP).
  • Set a backorder date that indicates the expected date of restocking.
  • Set a pre-order date that indicates the expected product launch date.

Order Features

Using fabric's Orders service, merchants can:

  • Integrate the order creation with any external 3rd party checkout service or POS.
  • Validate the order using integrated product and fraud services. Uses fraud endpoints to validate orders.
  • Automatically reserve products for the created order, and decrements inventory as orders are updated.
  • Allocate orders to locations (warehouses) that are nearest to the customer location.
  • Allocate orders to facilities in the order of the assigned facility rank.
  • Check if the order is a gift card or donation type, based on how merchants configure orders during the order creation.
  • Create shipment using POST /api/v3/shipments endpoint to write split allocations into distributed records for each parcel fulfilling the order.
  • Create invoices related to shipments capturing the payment at the time of order shipment and recording the transaction details.
  • Cancel orders to release the payment intent authorization for order lines in eligible statuses.
  • Return the order and refund the payment capture for order lines that are returned, excluding fees and shipment.
  • Create order appeasements, by manually refunding an arbitrary amount less than the captured amount per order line.
  • Exchange orders, by creating a zero-dollar order for a sku variant related to the return of an order line.
  • Audit Trails, by recording all actions (updates) on each of the 4 records- order, allocation, shipment, and invoice.
  • Set up webhooks, by subscribing to event types for third-party workflow triggering.
  • Create notifications, by triggering 18 different customer notification event types from order events.
  • Track packages, by posting updates from shipment tracking services to fabric OMS.

Using fabric OMS


  1. Authorization token: You must provide an access token while making an API request. fabric OMS supports both Identity v1 and Identity v2 approaches to getting access tokens. See the Generate Authorization Token section to generate an authorization token using copilot.
  2. Product data(optional): You must provide product details if you are using a 3rd party product management system other than fabric’s PIM, also referred to as fabric Products. fabric OMS needs product details such as name, description, image, and other related details for which you want to create inventory.
  3. Inventory data: You must provide sku, itemId, location, channelId, and counters indicating factual quantities of products across all locations. Location includes physical stores, warehouses, in transit, and any third-party suppliers.

Generate Authorization Token

To generate an authorization token:

  1. Log in to Copilot with your fabric credentials.
  2. Navigate to Orders.
  3. Right-click, and then click Inspect.
  4. Navigate to the Application tab.
  5. Under Session Storage, click the copilot URL and find a value for accessToken.
  6. This accessToken value is the authorization token you must use while calling fabric Offers APIs.

curl example:

curl --location --request POST 'https://api.fabric.inc/v3/locations' \
--header 'x-site-context: {"date":"2021-11-11T21:48:47.769Z","channel":12,"account":"5f689caa4216e7000750d1ef","stage":"stg02"}' \
--header 'Authorization: eyJraWQiOiItOWxOcTZVcmR3bl9tNFJ2bDd1a2RMN0NUOUNndXIya3VJXzNjUnhnaG…' \
--data-raw ‘’

Note: In the above example, account refers to the copilot accountId.