---
title: Fulfillment Services
slug: oms/fulfillment-services
docTags: 
createdAt: 2024-05-13T20:46:32.227Z
---

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:&#x20;

- `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**.

::Image[]{src="https://api.archbee.com/api/optimize/TmutqdeXiIw-V3gBZXVjd/xrVB6BzLpb1brvQJx2QAk_screen-recording-2-23-2023-at-1014-am.gif" size="84" width="895" height="600" position="flex-start" showCaption="false"}

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.&#x20;

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&#x20;***& ***Dahlias.&#x20;***&#x48;ere is avilalbe stock and the stock locations.

The ***Carnations&#x20;***&#x61;re avilable in 2 locations:

![](https://api.archbee.com/api/optimize/TmutqdeXiIw-V3gBZXVjd/yp50XHDyuBeIB9fVmrt3q_image.png)

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

![](https://api.archbee.com/api/optimize/TmutqdeXiIw-V3gBZXVjd/rAHWSvUGok-BfeJoPYKPk_image.png)

With `SINGLE_SHIPMENT_PRIORITY`***enabled,&#x20;***&#x74;he Chord OMS will only use the *California Warehouse* stock location to fulfill this order and only build one shipment:

![](https://api.archbee.com/api/optimize/TmutqdeXiIw-V3gBZXVjd/DNhS4vYhCQ7OJe_YH8u3H_image.png)

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

![](https://api.archbee.com/api/optimize/TmutqdeXiIw-V3gBZXVjd/67SXzhYDwh_EGcXy8HTdE_image.png)

