> For the complete documentation index, see [llms.txt](https://docs.chord.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chord.co/chord-oms/chord-oms-overview/shipping/fulfillment-services.md).

# Fulfillment Services

## Fulfillment Services

A fulfillment service is a third-party organization responsible for fulfilling shipments for orders generated in ChordOMS. Examples of fulfillment services that ChordOMS supports are ShipHero, EasyPost, and OrderDesk.

## Creating a Fulfillment Service

Fulfillment services are enabled by setting specific store variables depending on which fulfillment service is being added. To create a fulfillment service, navigate to **Settings** --> **Stores** and in the E**nvironment Variables** section, scroll down and add your configuration.

Suppose your warehouse is Shipstation, you would type:

* `SHIPSTATION_API_KEY` with a value of your API key found in [Shipstation](https://ship12.shipstation.com/settings/api)
* `SHIPSTATION_API_SECRET` with a value of your API key found in [Shipstation](https://ship12.shipstation.com/settings/api)

Then, click the + to **Save**.

![](https://3559351341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGejRW1RLC9yasX56Xzxu%2Fuploads%2Fgit-blob-a1e46ceee269182191344265b72b4f1669c9bca3%2Ffulfillment-services-1.gif?alt=media)

If, instead, your warehouse is Shiphero, you would set:

* `SHIP_HERO_AUTH_TOKEN` with a value of your API key found in Account Settings in Shiphero
* `SHIP_HERO_REFRESH_TOKEN` with a value of your API key found in Shipstation

Then, click the + to **Save**

## Auto-ship

Some products do not require physical or digital fulfillment. One example would be when a merchant collects donations for a charity. ChordOMS features a special fulfillment service called **Auto-ship** to handle these situations.

When an order is completed, shipments fulfilled by the Auto-ship fulfillment service will be automatically marked as shipped when the scheduled fulfillment job runs. Note that this means that shipment will not be marked as shipped immediately after the order is completed; it will remain in `Ready` state until the fulfillment job has run. Normal fulfillment workflows, such as sending an email notifying the customer that their package has shipped, will be completely bypassed.

The Auto-ship fulfillment service is compatible with all existing shipping methods. Merchants are not required to create a specific shipping method for auto-shipped products unless they wish to prevent customers from being charged the fee associated with the other shipping methods.

### Enable the Auto-ship fulfillment service

1. Set the `AUTO_MARK_AS_SHIPPED_FULFILLMENT_SERVICE`to `enabled`.
2. Click on **Settings > Shipping > Fulfillment Service > New Fulfillment Service.** Choose **auto\_mark\_as\_shipped** from the dropdown box and click **Create**.
3. Click on **Settings > Shipping > Stock Locations > New Stock Location**. Configure the following options then click\*\* Create\*\*:
   * Name: **Auto-ship**
   * Fulfillment service: **auto\_mark\_as\_shipped**
4. Update product inventory so that all products that should be auto-shipped are stocked only in the **Auto-ship** stock location just created.

## Fulfillment Optimization

By default, orders will attempt to fulfill as much of the order as possible from the Primary/Default stock location and then will fulill the remainder from the secondary stock location and so on.

Typically, in cases where the primary stock location does *not* have adequate stock, this means that orders fulfilled from multiple stock locations will contain multpile shipments. This however, is not ideal if perhaps the *secondary* stock location (or any other) contains adequate stock fo fulfille all items within an order, reducing the number of required shipments

The introduction of optimized fulfillment changes this.

After enabling the `SINGLE_SHIPMENT_PRIORITY` store environment variable, the Chord OMS will first look at all availalbe stock locations (regardless of priority) and will determine if any stock locations house all available inventory to fulfill the given order.

If so, a single shipment will be created from the designated stock location (i.e. Could be the primary or any other) and the order will be fulfilled accordingly.

If no stock locations fit this criteria, the order fulfillment logic will return to its default behavior of fulfilling each line item from the first available stock location, with a priority set to the *Default*.

### Example

Let's say there is an order consisting of \***Carnations** \*& \***Dahlias.** \*Here is avilalbe stock and the stock locations.

The \***Carnations** \*are avilable in 2 locations:

![](https://3559351341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGejRW1RLC9yasX56Xzxu%2Fuploads%2Fgit-blob-adcaeea11e36577e4190efce730b0c727228d0b0%2Ffulfillment-services-2.png?alt=media)

The ***Dahlias*** are only available in 1:

![](https://3559351341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGejRW1RLC9yasX56Xzxu%2Fuploads%2Fgit-blob-c81f942ae9167c4230e0e66bb719943b8bf24c98%2Ffulfillment-services-3.png?alt=media)

With `SINGLE_SHIPMENT_PRIORITY`\***enabled,** \*the Chord OMS will only use the *California Warehouse* stock location to fulfill this order and only build one shipment:

![](https://3559351341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGejRW1RLC9yasX56Xzxu%2Fuploads%2Fgit-blob-8ece866b729f8c37afc086945cc123e33e514eed%2Ffulfillment-services-4.png?alt=media)

When ***disabled***, the *HQ* stock location (which set as the default) will first be used and multiple shipments will be created:

![](https://3559351341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGejRW1RLC9yasX56Xzxu%2Fuploads%2Fgit-blob-18d704b986bb5c75b51d9c70921fb6a15d09143f%2Ffulfillment-services-5.png?alt=media)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.chord.co/chord-oms/chord-oms-overview/shipping/fulfillment-services.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
