# Order Attributes

Order attributes let you attach custom data to an entire draft order.

### What are order attributes?

Order attributes are custom key-value fields attached to the draft order itself (not individual line items):

* **Key** - The attribute name (e.g., "PO Number", "Sales Rep")
* **Value** - The attribute data (e.g., "PO-2026-Q2-145", "Jane Smith")

Order attributes are internal by default and don't show to customers on invoices.

### Order attributes vs. line item properties

| Order Attributes             | Line Item Properties       |
| ---------------------------- | -------------------------- |
| Apply to entire order        | Apply to specific products |
| Internal tracking            | Customer-visible details   |
| Not on invoices (by default) | Show on invoices           |

[Learn about line item properties →](https://github.com/horselditty/draft-order-docs/blob/main/product/editor/line-item-properties/README.md)

### Adding order attributes

#### Add an attribute

1. Open a draft order in the editor
2. Scroll to the **Order attributes** section
3. Click **Add attribute**
4. Enter the **Key** (attribute name)
5. Enter the **Value** (attribute data)
6. Press **Enter** or click **Save**

#### Edit existing attributes

1. Click on the attribute's key or value
2. Edit the text
3. Press **Enter** or click outside to save

#### Remove attributes

1. Find the attribute in the order attributes section
2. Click the **trash icon** or **X** next to it
3. The attribute is removed immediately

### Using attribute templates

#### Apply a template

1. In the order attributes section, click **Apply template**
2. Select a saved attribute template
3. All attributes from the template are added at once

[Learn more about attribute templates →](https://github.com/horselditty/draft-order-docs/blob/main/product/templates/attribute-templates/README.md)

### Where attributes appear

#### In Draft Order Magic

Attributes show in the order attributes section of the editor.

#### In Shopify Admin

Attributes appear in the draft order details under "Additional details" or "Custom attributes" section.

#### In Shopify APIs

Attributes are accessible via Shopify's APIs for integrations and automation.

#### Customer visibility

By default, order attributes don't show to customers on invoices, order confirmation pages, or packing slips.

### Troubleshooting

#### Attributes not showing in Shopify

* Attributes should appear under "Additional details" in draft order details
* Refresh the Shopify page
* Make sure you saved the draft order in Draft Order Magic

#### Can't edit attribute

* Make sure you're clicking directly on the attribute field
* Try refreshing the page
* Completed orders may have read-only attributes

#### Attribute key or value truncated

* Keep keys under 50 characters
* Keep values under 500 characters
* For longer data, consider using Shopify order notes instead


---

# 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://responsive-media.gitbook.io/draft-order-magic/draft-order-editor/order-attributes.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.
