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

# Order Data

> *Available variables to print order data in messages.*

These variables are available for use **only** in messages related to orders. To use order data in your messages, you **must categorize the message** with the **Type ORDER**. By doing so, our system will read the order data and enable its proper usage.

**General Order Data**

| **Name**                          | **Variables**                                   | **Output**                                                      | **Type** |
| --------------------------------- | ----------------------------------------------- | --------------------------------------------------------------- | -------- |
| Customer name                     | `{{ order.customer_name }}`                     | John Test                                                       | String   |
| Customer email                    | `{{ order.customer_email }}`                    | [test@email.com](mailto:teste@email.com)                        | String   |
| Customer phone                    | `{{ order.customer_phone }}`                    | 15551234567                                                     | String   |
| Customer document                 | `{{ order.customer_document }}`                 | 12345678912                                                     | String   |
| Order number                      | `{{ order.number }}`                            | 11205                                                           | String   |
| Subtotal value                    | `{{ order.subtotal_price }}`                    | 9.90                                                            | Number   |
| Subtotal value (Formatted)        | `{{ order.subtotal_price_formatted }}`          | USD9,90                                                         | String   |
| Total value                       | `{{ order.total_price }}`                       | 210.27                                                          | Number   |
| Total value (Formatted)           | `{{ order.total_price_formatted }}`             | USD210,27                                                       | String   |
| Full address (Formatted)          | `{{ order.shipping_address_formatted }}`        | 456 Flores St, C - Dream District, San Francisco, CA, 94107, US | String   |
| Products (Formatted)              | `{{ order.line_items_formatted }}`              | Product 01 - AB                                                 | Array    |
| Products with variant (Formatted) | `{{ order.line_items_formatted_with_variant }}` | Product 01 - AB - Variant / C                                   | String   |

**`Order Items | order.line_items - Array`**

| **Name**                 | **Variable**                    | **Output**                     | **Type** |
| ------------------------ | ------------------------------- | ------------------------------ | -------- |
| Order items (Full Array) | `{{ order.line_items }}`        | `[{"title": "My Robot"}, ...]` | Array    |
| Title                    | `{{ line_item.title }}`         | My Robot                       | String   |
| Variant name             | `{{ line_item.variant_title }}` | Blue                           | String   |
| Quantity                 | `{{ line_item.quantity }}`      | 1                              | Number   |
| Price                    | `{{ line_item.price }}`         | 210.27                         | Number   |
| Image URL                | `{{ line_item.image_url }}`     | https\://….png                 | String   |

`Shipping Address (Orders)**| order.shipping_address - Object**`

| **Name**         | **Variable**                            | **Output**            | **Type** |
| ---------------- | --------------------------------------- | --------------------- | -------- |
| Shipping address | `{{ order.shipping_address }}`          | `{"zip":"94107", …}`  | Object   |
| ZIP Code         | `{{ order.shipping_address.zip }}`      | 94107                 | Number   |
| City             | `{{ order.shipping_address.city }}`     | San Francisco         | String   |
| State            | `{{ order.shipping_address.province }}` | California            | String   |
| Address 1        | `{{ order.shipping_address.address1 }}` | 456 Flores St, Apt 31 | String   |
| Address 2        | `{{ order.shipping_address.address2 }}` | Downtown              | String   |

`Tracking Data**| order.tracking_numbers - Array**`

| **Name**               | **Variable**                                          | **Output**          | **Type** |
| ---------------------- | ----------------------------------------------------- | ------------------- | -------- |
| Tracking code          | `{{ order.tracking_numbers.code }}`                   | NL0000000000BR      | String   |
| New tracking code      | `{{ order.tracking_numbers.new_code }}`               | NL0000000123BR      | String   |
| Full status            | `{{ order.tracking_numbers.full_status }}`            | DELIVERED           | String   |
| Elapsed time (in days) | `{{ order.tracking_numbers.elapsed_time }}`           | 30                  | Number   |
| Taxed at               | `{{ order.tracking_numbers.tax_at }}`                 | 2024-11-30 11:46:45 | String   |
| Delivered at           | `{{ order.tracking_numbers.delivered_at }}`           | 2024-12-14 11:46:45 | String   |
| Returning to sender at | `{{ order.tracking_numbers.returning_to_sender_at }}` | 2024-11-30 11:46:45 | String   |
| Returned to sender at  | `{{ order.tracking_numbers.returned_to_sender_at }}`  | 2024-11-30 11:46:45 | String   |
| First update at        | `{{ order.tracking_numbers.first_update_at }}`        | 2024-11-14 11:46:45 | String   |
| Last update at         | `{{ order.tracking_numbers.last_update_at }}`         | 2024-12-14 11:46:45 | String   |
| Last request at        | `{{ order.tracking_numbers.last_request_at }}`        | 2024-12-14 11:46:45 | String   |
| Tracking events        | `order.tracking_numbers.events`                       | Event Array         | Array    |

| **Name**          | **Variable**                                      | **Output**                 | **Type** |
| ----------------- | ------------------------------------------------- | -------------------------- | -------- |
| Event type        | `{{ order.tracking_numbers.events.type }}`        | CAINIAO                    | String   |
| Event date        | `{{ order.tracking_numbers.events.date }}`        | 2024-12-14 11:46:45        | String   |
| Event label       | `{{ order.tracking_numbers.events.label }}`       | Delivered                  | String   |
| Event location    | `{{ order.tracking_numbers.events.location }}`    | New York, NY               | String   |
| Event description | `{{ order.tracking_numbers.events.description }}` | Your package was delivered | String   |
