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

# Draft orders

> Draft orders and quotes by the day they were created: value, how many became orders, days to complete and open value, by status, tag, company and product.

Draft orders and quotes by the day they were created: value, how many became orders, days to complete and open value, by status, tag, company and product.

## Example

```sql theme={null}
FROM draft_orders
  SHOW draft_orders, draft_order_value
  GROUP BY product_title
  SINCE startOfMonth(-1m) UNTIL today
  ORDER BY draft_orders DESC
```

## Metrics

| Metric | Type | Description |
| - | - | - |
| `draft_orders` | Number | Draft orders and quotes created. |
| `draft_order_value` | Currency | The drafts' totals. |
| `completed_draft_orders` | Number | Drafts that became orders. |
| `draft_conversion_rate` | Percent | Drafts that became orders, as a share of drafts created: the quote win rate. |
| `average_days_to_complete` | Number | Days from a draft being created to becoming an order. |
| `open_draft_value` | Currency | The totals of drafts not yet completed. |
| `invoices_sent` | Number | Drafts whose invoice was sent to the customer. |

## Dimensions

| Dimension | Description |
| - | - |
| `draft_status` | open, invoice\_sent or completed. |
| `draft_tag` | Draft tag. A draft with several tags counts under each. |
| `draft_payment_terms` | The draft's payment terms, such as Net 30. |
| `draft_attribute` | Each attribute on the draft as name: value. A draft with several counts under each. |
| `company_name` | The B2B company the draft is for. |
| `product_title` | A product on the draft. A draft with several products counts under each. |

## Filters

| Filter | Type | Description |
| - | - | - |
| `draft_status` | Text | open, invoice\_sent or completed. |
| `draft_payment_terms` | Text | The draft's payment terms, such as Net 30. |
| `company_name` | Text | The B2B company the draft is for. |

## Linked records

Fields of the records this dataset reaches can be shown, grouped by and filtered on, written with a dot after the record (for example `draft_order.name`). Each record's page lists its fields.

| Write | Record | Reached through |
| - | - | - |
| `draft_order.<field>` | [Draft order](https://docs.queryful.app/queryfulql/records/draft_order.md) | Draft order |
| `draft_order.customer.<field>` | [Customer](https://docs.queryful.app/queryfulql/records/customer.md) | Draft order › Customer |
| `draft_order.customer.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Draft order › Customer › Company |
| `draft_order.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Draft order › Company |
| `draft_order.company_location.<field>` | [Company location](https://docs.queryful.app/queryfulql/records/company_location.md) | Draft order › Company location |
| `draft_order.company_location.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Draft order › Company location › Company |
| `draft_order.order.<field>` | [Order](https://docs.queryful.app/queryfulql/records/order.md) | Draft order › Order |
| `draft_order.order.customer.<field>` | [Customer](https://docs.queryful.app/queryfulql/records/customer.md) | Draft order › Order › Customer |
| `draft_order.order.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Draft order › Order › Company |
| `draft_order.order.company_location.<field>` | [Company location](https://docs.queryful.app/queryfulql/records/company_location.md) | Draft order › Order › Company location |
| `draft_order.order.location.<field>` | [Location](https://docs.queryful.app/queryfulql/records/location.md) | Draft order › Order › Location |
| `draft_order.order.market.<field>` | [Market](https://docs.queryful.app/queryfulql/records/market.md) | Draft order › Order › Market |
| `customer.<field>` | [Customer](https://docs.queryful.app/queryfulql/records/customer.md) | Customer |
| `customer.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Customer › Company |
| `company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Company |
| `company_location.<field>` | [Company location](https://docs.queryful.app/queryfulql/records/company_location.md) | Company location |
| `company_location.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Company location › Company |
| `order.<field>` | [Order](https://docs.queryful.app/queryfulql/records/order.md) | Order |
| `order.customer.<field>` | [Customer](https://docs.queryful.app/queryfulql/records/customer.md) | Order › Customer |
| `order.customer.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Order › Customer › Company |
| `order.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Order › Company |
| `order.company_location.<field>` | [Company location](https://docs.queryful.app/queryfulql/records/company_location.md) | Order › Company location |
| `order.company_location.company.<field>` | [Company](https://docs.queryful.app/queryfulql/records/company.md) | Order › Company location › Company |
| `order.location.<field>` | [Location](https://docs.queryful.app/queryfulql/records/location.md) | Order › Location |
| `order.market.<field>` | [Market](https://docs.queryful.app/queryfulql/records/market.md) | Order › Market |
| `shop.<field>` | [Store](https://docs.queryful.app/queryfulql/records/shop.md) | Store |

## Related datasets

* [Discount catalogue](https://docs.queryful.app/queryfulql/datasets/discount_catalog.md)
* [Abandoned checkouts](https://docs.queryful.app/queryfulql/datasets/abandoned_checkouts.md)
* [Discounts](https://docs.queryful.app/queryfulql/datasets/discounts.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.