SalesOrders
Handles QuickBooks Sales Orders, supporting creation, updates, deletion, and queries for tracking customer orders.
Table Specific Information
SalesOrders may be inserted, queried, or updated via the SalesOrders or SalesOrderLineItems table. SalesOrders may be deleted by using the SalesOrders table.
This table has a Custom Fields column. See the Custom Fields page for more information.
Select
By default, SupportEnhancedSQL is set to true, and the following will be honored if present. Other filters will be executed client side. If SupportEnhancedSQL is set to false, only the following filters will be honored.
QuickBooks allows only a small subset of columns to be used in the WHERE clause of a SELECT query. These columns can only be used with the equals or = comparison. The available columns for SalesOrders are Id, Date, TimeModified, ReferenceNumber, CustomerName, and CustomerId. TimeModified and Date may be used with the >, >=, <, <=, or = conditions and may be used twice to specify a range. ReferenceNumber may be used with the = or LIKE conditions to establish a starts-with, ends-with, or contains syntax. For example:
SELECT * FROM SalesOrders WHERE TimeModified > '1/1/2011' AND TimeModified < '2/1/2011' AND ReferenceNumber LIKE '%12345%'
Insert
To add a SalesOrder, specify the Customer and at least one Line Item. The ItemAggregate column may be used to specify an XML aggregate of Line Item data. The columns that may be used in these aggregates are defined in the SalesOrderLineItems tables and it starts with Item. For example, the following will insert a new SalesOrder with two Line Items:
INSERT INTO SalesOrders (CustomerName, ItemAggregate) VALUES ('Cook, Brian', '<SalesOrderLineItems> <Row><ItemName>Repairs</ItemName><ItemQuantity>1</ItemQuantity></Row> <Row><ItemName>Removal</ItemName><ItemQuantity>2</ItemQuantity></Row> </SalesOrderLineItems>')
To insert subitems, set the ItemName field to the FullName of the item; for example, '<Row><ItemName>Subs:Carpet</ItemName><ItemQuantity>0</ItemQuantity></Row>'
Columns
Name | Type | ReadOnly | References | ColumnSize | Description |
ID [KEY] | String | True | 255 |
A unique identifier for the sales order, used to track and manage the transaction within QuickBooks. | |
ReferenceNumber | String | False | 21 |
The sales order reference number, which can be used for tracking and customer communication. | |
TxnNumber | Integer | True |
A unique transaction number within QuickBooks, distinct from the system-generated ID, for referencing purposes. | ||
CustomerName | String | False | 1000 |
The name of the customer associated with this sales order. This field is required when CustomerId is not provided. | |
CustomerId | String | False |
Customers.ID | 255 |
The QuickBooks ID of the customer linked to this sales order. This field is required when CustomerName is not provided. |
Date | Date | False |
The date the sales order was created, used for recordkeeping and reporting purposes. | ||
ShipMethod | String | False | 1000 |
The method of shipping chosen for the order, such as FedEx, UPS, or DHL. | |
ShipMethodId | String | False | 255 |
The QuickBooks ID for the shipping method associated with this sales order. | |
ShipDate | Date | False |
The date the items in the sales order are expected to ship. | ||
Memo | String | False | 5000 |
An internal note or message regarding the sales order, not visible to customers. | |
Class | String | False | 1000 |
The class assigned to the sales order for categorization and tracking purposes. | |
ClassId | String | False |
Class.ID | 255 |
The QuickBooks ID of the class associated with the sales order. |
TotalAmount | Decimal | False |
The total monetary value of the sales order, including all line items and applicable taxes. | ||
DueDate | Date | False |
The date by which payment for the sales order is expected, if applicable. | ||
Message | String | False | 101 |
A note or message intended for the customer, often displayed on the printed or emailed sales order. | |
MessageId | String | False | 255 |
The QuickBooks ID of the customer-facing message included in the sales order. | |
SalesRep | String | False | 5 |
The initials or identifier of the sales representative responsible for this sales order. | |
SalesRepId | String | False |
SalesReps.ID | 255 |
The QuickBooks ID of the sales representative associated with this sales order. |
Template | String | False | 100 |
The name of the template applied to this sales order for layout and formatting purposes. | |
TemplateId | String | False |
Templates.ID | 255 |
The QuickBooks ID of the template used for this sales order. |
CurrencyName | String | False | 64 |
The name of the currency used for this sales order, helpful for international transactions. | |
CurrencyId | String | False |
Currency.ID | 255 |
The QuickBooks ID of the currency applied to this sales order. |
ExchangeRate | Double | False |
The exchange rate applied if the sales order involves foreign currency. | ||
TotalAmountInHomeCurrency | Decimal | False |
The total value of the sales order converted into the home currency. | ||
FOB | String | False | 13 |
The Freight on Board location indicating the point from which the shipment originates. | |
BillingAddress | String | True |
The complete billing address associated with this sales order. | ||
BillingLine1 | String | False | 500 |
The first line of the billing address. | |
BillingLine2 | String | False | 500 |
The second line of the billing address. | |
BillingLine3 | String | False | 500 |
The third line of the billing address. | |
BillingLine4 | String | False | 500 |
The fourth line of the billing address. | |
BillingLine5 | String | False | 41 |
The fifth line of the billing address. | |
BillingCity | String | False | 255 |
The city included in the billing address. | |
BillingState | String | False | 255 |
The state or region in the billing address. | |
BillingPostalCode | String | False | 30 |
The postal code for the billing address. | |
BillingCountry | String | False | 255 |
The country included in the billing address. | |
BillingNote | String | False | 41 |
Additional notes regarding the billing address. | |
ShippingAddress | String | True |
The complete shipping address associated with this sales order. | ||
ShippingLine1 | String | False | 500 |
The first line of the shipping address. | |
ShippingLine2 | String | False | 500 |
The second line of the shipping address. | |
ShippingLine3 | String | False | 500 |
The third line of the shipping address. | |
ShippingLine4 | String | False | 500 |
The fourth line of the shipping address. | |
ShippingLine5 | String | False | 41 |
The fifth line of the shipping address. | |
ShippingCity | String | False | 255 |
The city included in the shipping address. | |
ShippingState | String | False | 255 |
The state or region in the shipping address. | |
ShippingPostalCode | String | False | 30 |
The postal code for the shipping address. | |
ShippingCountry | String | False | 255 |
The country included in the shipping address. | |
ShippingNote | String | False | 41 |
Additional notes regarding the shipping address. | |
Subtotal | Decimal | True |
The gross subtotal of the sales order, excluding taxes or payments already made. | ||
Tax | Double | True |
The total sales tax applied to the sales order. | ||
TaxItem | String | False | 100 |
The name of the sales tax item applied to the sales order. | |
TaxItemId | String | False | 255 |
The QuickBooks ID of the sales tax item applied to the sales order. | |
TaxPercent | Double | True |
The percentage of sales tax applied to the sales order. | ||
PONumber | String | False | 41 |
The purchase order number associated with this sales order, if applicable. | |
Terms | String | False | 100 |
The payment terms agreed upon for this sales order. | |
TermsId | String | False | 255 |
The QuickBooks ID of the payment terms for this sales order. | |
ItemCount | Integer | True |
The total number of line items included in this sales order. | ||
ItemAggregate | String | False | 5000 |
An aggregated view of the line item data for batch processing or reference. | |
TransactionCount | Integer | True |
The number of transactions linked to this sales order. | ||
TransactionAggregate | String | True | 5000 |
An aggregated view of linked transaction data for reference or processing. | |
CustomerTaxCode | String | False | 3 |
The tax code specifically assigned to the customer for this sales order. | |
CustomerTaxCodeId | String | False | 255 |
The QuickBooks ID of the tax code assigned to the customer. | |
IsPrinted | Boolean | True |
Indicates whether the sales order has been printed. | ||
IsManuallyClosed | String | False | 10 |
Indicates whether the sales order has been manually closed. | |
IsFullyInvoiced | Boolean | True |
Indicates whether the entire sales order has been invoiced. | ||
IsTaxIncluded | Boolean | False |
Specifies whether the tax is included in the transaction amount. | ||
IsToBePrinted | Boolean | False |
Specifies whether the sales order is marked for printing. | ||
IsToBeEmailed | Boolean | False |
Specifies whether the sales order is marked for emailing. | ||
Other | String | False | 29 |
A predefined custom field within QuickBooks. | |
CustomFields | String | False |
Custom fields associated with this sales order, formatted in XML. | ||
EditSequence | String | True | 16 |
A unique versioning identifier for this sales order, used to track updates. | |
TimeModified | Datetime | True |
The last time the sales order was updated. | ||
TimeCreated | Datetime | True |
The date and time the sales order was initially created. | ||
ShippingDetailTrackingID | Integer | True |
The tracking ID for the shipped sales order. | ||
ShippingDetailCarrierName | String | True |
The name of the shipping carrier used for the sales order. | ||
ShippingDetailShippingMethod | String | True |
The method of shipping used for the sales order. | ||
ShippingDetailShippingCharges | Decimal | True |
The shipping charges applied to the sales order. | ||
FulfillmentStatus | String | True |
The current fulfillment status of the sales order. | ||
SOChannel | String | True |
The sales channel through which the sales order was generated. | ||
StoreName | String | True |
The name of the store where the sales order was created. | ||
StoreType | String | True |
The type of store (for example, online or physical) where the sales order was created. |
Pseudo-Columns
Pseudo Column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
Item* | String |
All columns specific to line items can be used for insertion, providing details about each item in the sales order. |