> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onelox.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Delivery Notes

> Working with Delivery Notes in ONELOX

## Introduction

A Delivery Note is a list of products to be packed and shipped to a specified recipient.

A Delivery Note may be created by a Source system directly -- this is usually the case for ERP systems -- or derived from a customer's order in an e-commerce system.

## Lifecycle of a Delivery Note

A Delivery Note passes at least three states in a lifecycle.

1. `Open`: The Delivery Note has been successfully imported into ONELOX
2. `Pending`: The Delivery Note has been successfully transferred to the target Fulfiller integration
3. `Shipped`: The Delivery Note has been at least partially shipped by the Fulfiller

Additionally, a Delivery Note may change into one of the following states:

* `Cancelled`: The Delivery Note has been cancelled (see: <a href="/basics/delivery-notes#cancelling-delivery-notes">Cancelling Delivery Notes</a>)
* `Error`: An error has occurred after the Delivery Note has been imported. This usually means the Delivery Note could not
  be transmitted to its designated Fulfiller, e.g. due to data validation failing in the Fulfiller's system

\
<Note>All Delivery Note states are updated automatically and cannot be set through a regular update
operation.</Note>

## Creating Delivery Notes

<a href="/integrations/introduction">ONELOX integrations</a> always create Delivery Notes in the correct format.

### Requirements and limitations

There are a few requirements and limitations that apply when a Delivery Note is attempted to be created.

1. the `Number` must be unique within the Source's integration

<Tip>
  While ONELOX allows duplicate Delivery Note numbers across multiple integrations within a Client,
  it is highly recommended to always ensure uniqueness, e.g. by assigning prefixes in your own systems, before
  importing Delivery Notes into ONELOX.
</Tip>

2. at least one position must be present
3. basic Customer and Address data must be provided

While <a href="/integrations/introduction">ONELOX integrations</a> take care of properly preparing and formatting data before
importing a Delivery Note into ONELOX, errors might still occur due to necessary data missing in the Source system.\
In such a case, an error ("Incident") is recorded that will contain information about data validation errors.\
The data must then be corrected in the Source system before it can be imported into ONELOX.

## Updating Delivery Notes

A Delivery Note may be updated (e.g. its delivery Address changed) until it has been transmitted to its designated Fulfiller
(see: <a href="/basics/delivery-notes#lifecycle-of-a-delivery-note">Lifecycle of a Delivery Note</a>).\
Any attempts to update a Delivery Note afterward will result in an error.

## Cancelling Delivery Notes

A Delivery Note may be cancelled as long as it has not yet been shipped.\
Many ONELOX integrations handle cancellations automatically, but you may also cancel a Delivery Note manually.

<Note>
  Not all Fulfillers allow automated cancellations. Consult your fulfillment partner to ensure you follow their
  process for cancellations.
</Note>

## Routing Delivery Notes

A Delivery Note should be routed to a <a href="/basics/warehouses">Warehouse</a> that is used to fulfill the requested items.\
If no Warehouse has been assigned to a Delivery Note, it will not be processed and will remain as `Open`.

## Fulfilling Delivery Notes

A Delivery Note will automatically be marked as `Shipped` when Shipment information has been received from the Fulfiller integration.\
There may be one or many different Shipments -- or packages -- for a single Delivery Note.

<Tip>
  Whenever possible, ONELOX integrations will handle multiple packages for a single Delivery Note and transfer the
  received
  data accordingly. However, some systems are not able to process multiple Shipments -- in those cases, ONELOX will
  combine data as necessary.
</Tip>

### Manually fulfilling Delivery Notes

You may manually fulfill a Delivery Note and add tracking information as well as detailed item information.

### Keeping track of fulfilled items

ONELOX will automatically update fulfilled quantities on a Delivery Note whenever a new Shipment is created.

### Keeping track of shipped batches, sell by dates and serial numbers

ONELOX allows adding a shipped batch, sell by date and multiple serial numbers to a Shipment line.\
If multiple batches for a single requested item have been shipped, a separate Shipment line must be created for each batch.

<Tip>
  Whenever possible, ONELOX integrations will transmit batch, sell by date and serial number information to the
  Delivery Note's Source system.
</Tip>
