# Order flow

A basic illustration of the order process in Closelink, from draft enquiry to delivered order.

```mermaid
graph LR;
  Draft --> Enquiry
  Enquiry --> OfferA
  Enquiry --> OfferB
  Enquiry --> OfferC
  OfferA --> QuotedOfferA
  OfferB --> QuotedOfferB
  OfferC --> Declined
  QuotedOfferB --> Order
  Order --> ConfirmedOrder
  ConfirmedOrder --> DeliveredOrder
```

## Step 0: Draft enquiry (optional)

The customer creates a draft enquiry via the Closelink Web Application, the Closelink vessel client, or the public
API.
It can contain all the information of an enquiry but can be saved with incomplete information. Even if suppliers are
selected, they will not receive the enquiry until it is submitted.

## Step 1: Enquiry

When the draft enquiry is submitted, it is converted into an enquiry. The enquiry is then sent to the selected
suppliers.

details
summary
strong
Try it in the Public API:
## Step 2: Offers

Closelink will automatically initiate offers for all selected suppliers prompting them to quote. Depending on the
supplier and the existence of contracts, closelink might pre-fill prices automatically to speed up the quotation process
for the supplier.

details
summary
strong
Fetch Offers for an Enquiry via the Public API:
## Step 3: Quotes

The offers are then quoted by the suppliers automatically or manually by adding prices, optionally adjusting quantities,
and setting the offer state to `QUOTED`.

## Step 3.5: Approval request

If the value of the offer exceeds a configured threshold, an approval request has to be triggered before the offer can
be ordered.

## Step 4: Order

The customer can then order the offer by setting the offer state to `ORDER`. This will create an order in Closelink.

## Step 5: Confirmation

The order can then be confirmed by the supplier by setting the order state to `CONFIRMED`.

## Step 6: Delivery confirmation

Once the order is delivered and the vessel has confirmed the goods received, the order is set to `DELIVERED`.