> For the complete documentation index, see [llms.txt](https://docs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.akinon.com/technical-guides/instore/order-channel-and-sales-staff-instore-data.md).

# Order Channel & Sales Staff Instore Data

## <mark style="color:red;">Overview</mark>

`extra_field` is an object returned in the order detail API response. It is populated by the system and is read-only: it cannot be set or updated through the API.

When `extra_field` contains a nested `instore_data` object, the order is associated with an in-store (POS) sale.

{% hint style="info" %}
`extra_field` can carry other data in different contexts. This guide covers only the `instore_data` object.
{% endhint %}

## <mark style="color:red;">Usage</mark>

`extra_field.instore_data` is used on the Customer Order Detail page to display the Order Channel and Sales Staff information.

### <mark style="color:red;">instore\_data Fields</mark>

| Field                     | Type   | Description                                       |
| ------------------------- | ------ | ------------------------------------------------- |
| `staff_retail_store_name` | string | Name of the store where the sale was made.        |
| `staff_first_name`        | string | First name of the staff member who made the sale. |
| `staff_last_name`         | string | Last name of the staff member who made the sale.  |

## <mark style="color:red;">How the Field Is Set</mark>

`extra_field` and its `instore_data` object are set automatically by the system based on the sales channel.

* **In-store (POS) sales:** `extra_field.instore_data` is populated with the store and staff member who made the sale.
* **Online and other channel sales:** `instore_data` is not set. `extra_field` may be empty, contain other data without `instore_data`, or be omitted entirely.

## <mark style="color:red;">Default Value</mark>

`extra_field` has no default value. If the field is `null` or not returned, the Order Channel and Sales Staff section is not displayed.

## <mark style="color:red;">Override Rules</mark>

`extra_field` and `instore_data` cannot be overridden:

* The field cannot be written, modified, or sent back through the API.
* The displayed value always reflects the value returned in the order detail response.
* The value is fixed per order and does not change across different views of the same order.

## <mark style="color:red;">Scenarios and Examples</mark>

The following table summarizes the three possible scenarios and the resulting UI behavior.

| Scenario                         | extra\_field                    | UI Result                                                        |
| -------------------------------- | ------------------------------- | ---------------------------------------------------------------- |
| 1. In-store (POS) order          | Contains `instore_data`         | Store name and staff name are displayed.                         |
| 2. Online or other channel order | Present, without `instore_data` | Generic channel label is displayed; staff information is hidden. |
| 3. No extra data                 | `null` or not returned          | Order Channel and Sales Staff section is hidden.                 |

### <mark style="color:red;">Scenario 1: In-Store (POS) Order</mark>

`instore_data` is populated.

```json
{
  "extra_field": {
    "instore_data": {
      "staff_first_name": "Jane",
      "staff_last_name": "Doe",
      "staff_retail_store_name": "Example Store"
    }
  }
}
```

**UI result:**

* Order Channel: Example Store
* Sales Staff: Jane Doe

### <mark style="color:red;">Scenario 2: Online or Other Channel Order</mark>

`extra_field` is present but does not contain `instore_data`.

```json
{
  "extra_field": {
    "some_other_field": true
  }
}
```

**UI result:**

* Order Channel: Store (generic label)
* Sales Staff information is not displayed.

### <mark style="color:red;">Scenario 3: No extra\_field</mark>

`extra_field` is `null` or not returned.

```json
{
  "extra_field": null
}
```

**UI result:**

* The Order Channel and Sales Staff section is not displayed.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.akinon.com/technical-guides/instore/order-channel-and-sales-staff-instore-data.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
