# OrderStatus field

### Overview

The OrderStatus database field allows you to track the status of an order for each Activation Key.

The possible values of OrderStatus are:

| **Order Status** | **Value** | **DB Field Value** | **Description**             |
| ---------------- | --------- | ------------------ | --------------------------- |
| EUndefined/ENone | 0         | None               | the value was not set       |
| EInProgess       | 1         | In Progress        | the order is in progress    |
| ECompleted       | 2         | Completed          | the order is completed      |
| EUpgraded        | 4         | Upgraded           | the license was upgraded    |
| EReleased        | 8         | Released           | the license was deactivated |
| EArchived        | 16        | Archived           | the license was archived    |

You can set the value of the OrderStatus when creating an activation key by calling [CreateActivationKeyWithExpiryDateEx6](/docs/api-reference/.net-api/qlmlicense/management-methods/createactivationkeywithexpirydateex6.md) or directly by calling the [UpdateOrderStatus](/docs/api-reference/.net-api/qlmlicense/management-methods/updateorderstatus.md) method.

### Rules

When an Activation Key is upgraded, the OrderStatus is automatically changed to *EUpgraded*.

When an Activation Key is archived, the OrderStatus is set to *EArchived*.

When creating an Activation Key if the OrderStatus is set to *EInProgress*, the maintenance plan expiry date is not set until the license is activated. When the license is activated, the expiry date of the maintenance plan is set based on the server property *maintenancePlanPeriodInDays.* Upon successful activation, the orderStatus is set to *EComplete*.

### Searches

Searches created in QLM to query specific values of the Order Status should use the DB Field Name, as per the table above, in order to search for a specific status.&#x20;

![mceclip0.png](https://support.soraco.co/hc/article_attachments/360071818131/mceclip0.png)


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.soraco.co/docs/fundamental-concepts/orderstatus-field.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
