DraftOrders
List of saved draft orders.
View-Specific Information
Select
The driver uses the Shopify API to process WHERE clause conditions built with the following column and operator. The driver processes other filters client-side within the driver.
- Id supports the '=' comparison.
- Status supports the '=' comparison.
- CustomerId supports the '=' comparison.
- CreatedAt supports the '=,>,<,>=,<=' comparison.
- UpdatedAt supports the '=,>,<,>=,<=' comparison.
For example, the following queries are processed server side:
SELECT * FROM DraftOrders
SELECT * FROM DraftOrders WHERE Id='123'
SELECT * FROM DraftOrders WHERE Status='completed'
SELECT * FROM DraftOrders WHERE CreatedAt > '2018-02-05'
SELECT * FROM DraftOrders WHERE UpdatedAt > '2018-02-05'
Columns
| Name | Type | References | Description |
| Id [KEY] | String | Globally unique identifier. | |
| Name | String | Unique identifier for the draft order, which is unique within the store. For example, #D1223. | |
| CreatedAt | Datetime | Date and time when the draft order was created in Shopify. | |
| UpdatedAt | Datetime | Date and time when the draft order was last changed. The format is YYYY-MM-DD HH:mm:ss (for example, 2016-02-05 17:04:01). | |
| CompletedAt | Datetime | Date and time when the draft order converted to a new order, and the draft order's status changed to Completed. | |
| AppliedDiscountAmount | Decimal | The total amount that the customer has spent on orders in their lifetime. | |
| AppliedDiscountCurrency | String | The currency of the total amount that the customer has spent on orders in their lifetime. | |
| AppliedDiscountDescription | String | Description of the order-level discount. | |
| AppliedDiscountTitle | String | Name of the order-level discount. | |
| AppliedDiscountValue | Float | Amount of the order level discount (when value_type is percentage, the value in this field is the percentage discount). | |
| AppliedDiscountValueType | String | Type of the order-level discount. | |
| BillingAddress1 | String | The first line of the address. Typically the street address or PO Box number. | |
| BillingAddress2 | String | The second line of the address. Typically the number of the apartment, suite, or unit. | |
| BillingAddressCity | String | The name of the city, district, village, or town. | |
| BillingAddressCompany | String | The name of the customer's company or organization. | |
| BillingAddressCountry | String | The name of the country. | |
| BillingAddressCountryCodeV2 | String | The two-letter code for the country of the address. For example, US. | |
| BillingAddressFirstName | String | The first name of the customer. | |
| BillingAddressFormattedArea | String | A comma-separated list of the values for city, province, and country. | |
| BillingAddressId | String | Globally unique identifier. | |
| BillingAddressLastName | String | The last name of the customer. | |
| BillingAddressLatitude | Double | The latitude coordinate of the customer address. | |
| BillingAddressLongitude | Double | The longitude coordinate of the customer address. | |
| BillingAddressName | String | The full name of the customer, based on firstName and lastName. | |
| BillingAddressPhone | String | A unique phone number for the customer. Formatted using E.164 standard. For example, +16135551111. | |
| BillingAddressProvince | String | The region of the address, such as the province, state, or district. | |
| BillingAddressProvinceCode | String | The two-letter code for the region. For example, ON. | |
| BillingAddressZip | String | The zip or postal code of the address. | |
| CurrencyCode | String | Three letter code for the currency of the store at the time that the invoice is sent. | |
| CustomerId | String |
Customers.Id | Customer who will be sent an invoice for the draft order, if there is one. |
| String | Email address of the customer, which is used to send notifications to. | ||
| HasTimelineComment | Boolean | Whether the merchant has added timeline comments to the draft order. | |
| InvoiceSentAt | Datetime | Date and time when the invoice was last emailed to the customer. | |
| InvoiceUrl | String | Link to the checkout, which is sent to your customer in the invoice email. | |
| LegacyResourceId | Long | The ID of the corresponding resource in the REST Admin API. | |
| Note2 | String | Text from an optional note attached to the draft order. | |
| OrderId | String |
Orders.Id | Order that was created from this draft order. |
| ShippingAddress1 | String | The first line of the address. Typically the street address or PO Box number. | |
| ShippingAddress2 | String | The second line of the address. Typically the number of the apartment, suite, or unit. | |
| ShippingAddressCity | String | The name of the city, district, village, or town. | |
| ShippingAddressCompany | String | The name of the customer's company or organization. | |
| ShippingAddressCountry | String | The name of the country. | |
| ShippingAddressCountryCodeV2 | String | The two-letter code for the country of the address. For example, US. | |
| ShippingAddressFirstName | String | The first name of the customer. | |
| ShippingAddressFormattedArea | String | A comma-separated list of the values for city, province, and country. | |
| ShippingAddressId | String | Globally unique identifier. | |
| ShippingAddressLastName | String | The last name of the customer. | |
| ShippingAddressLatitude | Double | The latitude coordinate of the customer address. | |
| ShippingAddressLongitude | Double | The longitude coordinate of the customer address. | |
| ShippingAddressName | String | The full name of the customer, based on firstName and lastName. | |
| ShippingAddressPhone | String | A unique phone number for the customer. Formatted using E.164 standard. For example, +16135551111. | |
| ShippingAddressProvince | String | The region of the address, such as the province, state, or district. | |
| ShippingAddressProvinceCode | String | The two-letter code for the region. For example, ON. | |
| ShippingAddressZip | String | The zip or postal code of the address. | |
| Status | String | Status of the draft order. | |
| SubtotalPrice | Decimal | Subtotal of the line items and their discounts (does not contain shipping charges or shipping discounts, or taxes). | |
| TaxExempt | Boolean | Whether the draft order is tax exempt. | |
| TaxesIncluded | Boolean | Whether the line item prices include taxes. | |
| TotalPrice | Decimal | Total amount of the draft order (includes taxes, shipping charges, and discounts). | |
| TotalShippingPrice | Decimal | Total shipping charge for the draft order. | |
| TotalTax | Decimal | Total amount of taxes for the draft order. | |
| TotalWeight | Long | Total weight (grams) of the draft order. |