SalesOrderQuery

Returns the SalesOrders specified in the filter criteria.


Request

Response

XMLOPS

VB.NET

C#

Tag Type Max length Implementation Required

ISalesOrderQuery

Returns the SalesOrders specified in the filter criteria.
       

metaData

This is used in a query to cause a count of query objects to be returned. You can specify that the count of query objects is to be returned with the returned objects, or you can specify that only a count and no data is returned. (The default is that no count is returned.) A common use of this feature is to specify a count with no data in order to determine how many objects to expect from the actual query. If you don’t want a query to return a count, either don’t use this feature, or specify the value NoMetaData. If you want only a count, specify the value MetaDataOnly. If you want data and a count, specify MetaDataAndResponseData. You should be aware that the count returned via this setting is not guaranteed to be exact: it could be off slightly due to new object creation or deletions.
IQBENmetaDataType   4.0|us.png|  

iterator

The iterator attribute provided with most query types also allows you to break down query results in smaller and more manageable chunks of data. An iterator results in responses that contain only the specified number of objects. Iterators are only valid for the application that starts them, and they are only valid for the current QuickBooks session.
IQBENiteratorType   5.0|us.png|  

iteratorID

The iterator query attribute is provided with most query types to allow you to break down query results into smaller and more manageable chunks of data. An iterator results in responses that contain only the specified number of objects. The iterator is created when a query contains the iterator attribute set to Start, along with a MaxReturn value specifying how many records are to be returned in each iteration. The response to that first query iteration contains, along with the response data, an IteratorID value that uniquely identifies that iterator. This is important because you can have many iterators active at the same time. Accordingly, in subsequent iterations of that query, you need to supply that returned iteratorID so the SDK knows where to resume the iteration.
IQBUUIDType   5.0|us.png|  

MaxReturned

This element is used for limiting the number of objects returned in the query to the number specified in MaxReturned. It is required if you use the Iterator attribute to iterate through large or potentially large query returns. When used with the Iterator, MaxReturned specifies the number of records returned in each iteration. It can be modified during the iteration. For details on the Iterator, please refer to the QBPOS SDK Programming Guide. A less optimal, but still possible way to use this element is as follows. You can use this element by itself to chunk up data, by initially using a range filter with the desired starting (From range) and ending range (To range). Then, in subsequent queries, leave the To range alone, but change the From range to coincide with the last object from the previous query.
IQBIntType      

OwnerIDList

The list of Owner IDs in the requests. An ownerID refers to the owner of a data extension:If OwnerID is 0, this is a public data extension. For example, if you intend to use this with a custom field that is supported in the UI, you must use an owner ID of 0.If OwnerID is a GUID, for example {6B063959-81B0-4622-85D6-F548C8CCB517}, this field is a private data extension defined by an integrated application. Note that OwnerID values are not case-sensitive, meaning that if you enter an OwnerID value with lower-case letters, the value will be saved and returned with upper-case letters. When you share a private data extension with another application, the other application must know both the OwnerID and the DataExtName, as these together form a data extension’s unique name.
IGUIDList      

TxnID

QuickBooks generates a unique TxnID for each transaction that is added to QuickBooks. A TxnID returned from a request can be used to refer to the transaction in subsequent requests. Notice that you cannot supply the TxnID of a TimeTracking transaction to TransactionQueryRq requests. If you do, you get an error stating that no such record could be found, even though the transaction is in QuickBooks. This behavior reflects the behavior in the QuicKBooks UI in the Find window.
IQBIDType      

ORTimeCreatedFilters

IORTimeCreatedFilters   1.1  

TimeCreatedFilter

Filters by the object’s time created value.
ITimeCreatedFilter      

MatchNumericCriterion

Specifies how the specified numeric value will filter the target objects, that is, specifies the the comparison that will be used.
IQBENMatchNumericCriterionType     Y

TimeCreated

The timestamp indicating the time when this object was created in QBPOS.
IQBDateTimeType     Y

TimeCreatedRangeFilter

Filters by a range of time created values.
ITimeCreatedRangeFilter      

FromTimeCreated

The beginning of the range.
IQBDateTimeType     Y

ToTimeCreated

The end of the range.
IQBDateTimeType     Y

ORTimeModifiedFilters

IORTimeModifiedFilters      

TimeModifiedFilter

Searches for objects that were modified before, at, or after the specified time.
ITimeModifiedFilter      

MatchNumericCriterion

Specifies how the specified numeric value will filter the target objects, that is, specifies the the comparison that will be used.
IQBENMatchNumericCriterionType     Y

TimeModified

The time when the object was modified by QBPOS.
IQBDateTimeType     Y

TimeModifiedRangeFilter

Searches for objects that were modified within the specified time range.
ITimeModifiedRangeFilter      

FromTimeModified

First time value possible in the range.
IQBDateTimeType     Y

ToTimeModified

Last time value of the range.
IQBDateTimeType     Y

ORAssociateFilters

IORAssociateFilters      

AssociateFilter

Filters by the specified associate name string or substring.
IAssociateFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

Associate

The employee making the adjustment transaction.
IQBStringType 40 chars   Y

AssociateRangeFilter

Filters by the specified range of name values.
IAssociateRangeFilter      

FromAssociate

Starting value in the range filter.
IQBStringType 40 chars   Y

ToAssociate

Ending value in the specified range.
IQBStringType 40 chars   Y

ORBalanceDueFilters

IORBalanceDueFilters      

BalanceDueFilter

Filters orders by the balance due.
IBalanceDueFilter      

MatchNumericCriterion

Specifies how the specified numeric value will filter the target objects, that is, specifies the the comparison that will be used.
IQBENMatchNumericCriterionType     Y

BalanceDue

The balance remaining on the order. Balance Due = (Total – Deposit Balance)
IQBAmountType     Y

BalanceDueRangeFilter

Filters orders by a range of balance-due values.
IBalanceDueRangeFilter      

FromBalanceDue

Start of the range.
IQBAmountType     Y

ToBalanceDue

End of the range.
IQBAmountType     Y

ORCashierFilters

IORCashierFilters      

CashierFilter

Filters SalesOrders by their Cashier value.
ICashierFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

Cashier

Name of the employee taking the sales order. Notice that this value is auto-filled with the logged-in employee name if logins are required.
IQBStringType 16 chars   Y

CashierRangeFilter

Filters SalesOrders by a range of Cashier values.
ICashierRangeFilter      

FromCashier

Start of the range.
IQBStringType 16 chars   Y

ToCashier

End of the range.
IQBStringType 16 chars   Y

CustomerListID

Unique QBPOS ID value identifying the customer being referenced.
IQBIDType      

ORDiscountFilters

IORDiscountFilters      

DiscountFilter

Filters vouchers by their discount value.
IDiscountFilter      

MatchNumericCriterion

Specifies how the specified numeric value will filter the target objects, that is, specifies the the comparison that will be used.
IQBENMatchNumericCriterionType     Y

Discount

Discount amount: Enter the amount of any discount applicable to the PO. Discounts are applied to the PO subtotal. Entering an amount causes the Disc % field to be automatically calculated.
IQBAmountType     Y

DiscountRangeFilter

Filters vouchers by a range of Discount values.
IDiscountRangeFilter      

FromDiscount

Start of the Discount range.
IQBAmountType     Y

ToDiscount

End of the Discount range.
IQBAmountType     Y

ORDiscountPercentFilters

IORDiscountPercentFilters      

DiscountPercentFilter

Filters vouchers by their discountpercent values.
IDiscountPercentFilter      

MatchNumericCriterion

Specifies how the specified numeric value will filter the target objects, that is, specifies the the comparison that will be used.
IQBENMatchNumericCriterionType     Y

DiscountPercent

Enter a percentage discount applicable to the PO. Discounts are applied to the PO subtotal. Entering a discount percentage causes the Disc $ field to be automatically calculated.
IQBFloatType     Y

DiscountPercentRangeFilter

Filters vouchers by a range of discountpercent values.
IDiscountPercentRangeFilter      

FromDiscountPercent

Start of the DiscountPercent range.
IQBFloatType     Y

ToDiscountPercent

End of the DiscountPercent range.
IQBFloatType     Y

ORInstructionsFilters

IORInstructionsFilters      

InstructionsFilter

Filters PurchaseOrders by their Instructions field.
IInstructionsFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

Instructions

You can use this optional field to provide instructions to the vendor regarding the order. You can add up to two lines of text. This text prints on PurchaseOrders, but are not displayed on-screen.
IQBStringType 2000 chars   Y

InstructionsRangeFilter

Filters PurchaseOrders by a range of Instruction field values date.
IInstructionsRangeFilter      

FromInstructions

Start of the range.
IQBStringType 2000 chars   Y

ToInstructions

End of the range.
IQBStringType 2000 chars   Y

ORItemsCountFilters

IORItemsCountFilters      

ItemsCountFilter

Filters adjustments by those with a specified number of line items.
IItemsCountFilter      

MatchNumericCriterion

Specifies how the specified numeric value will filter the target objects, that is, specifies the the comparison that will be used.
IQBENMatchNumericCriterionType     Y

ItemsCount

The number of line items in the adjustment add request that added the adjustment to QBPOS.
IQBIntType     Y

ItemsCountRangeFilter

Specifies a range of adjustment line items to search for.
IItemsCountRangeFilter      

FromItemsCount

Specifies the start of the range.
IQBIntType     Y

ToItemsCount

Specifies the end of the range.
IQBIntType     Y

PriceLevelNumber

If you are giving a price level discount to this customer, rather than discount percent, you need to specify which of the four supported levels you want to apply.
IQBENPriceLevelNumberType      

ORPromoCodeFilters

IORPromoCodeFilters      

PromoCodeFilter

Filters SalesOrders by their PromoCode value.
IPromoCodeFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

PromoCode

This field is used to record a miscellaneous note on a SalesOrder, normally identifying a special sale. An entry in this field may be required depending on settings in the company preferences.
IQBStringType 10 chars   Y

PromoCodeRangeFilter

Filters SalesOrders by a range of PromoCode values.
IPromoCodeRangeFilter      

FromPromoCode

Start of the range.
IQBStringType 10 chars   Y

ToPromoCode

End of the range.
IQBStringType 10 chars   Y

ORQtyFilters

IORQtyFilters      

QtyFilter

Filters SalesOrders by quantity.
IQtyFilter      

MatchNumericCriterion

Specifies how the specified numeric value will filter the target objects, that is, specifies the the comparison that will be used.
IQBENMatchNumericCriterionType     Y

Qty

The quantity of the line item being ordered or transferred.
IQBQuanType     Y

QtyRangeFilter

Filters SalesOrders by a range of quantities.
IQtyRangeFilter      

FromQty

Start of the range.
IQBQuanType     Y

ToQty

End of the range.
IQBQuanType     Y

ORSalesOrderNumberFilters

IORSalesOrderNumberFilters      

SalesOrderNumberFilter

Filters PurchaseOrders by the SalesOrder that generated them.
ISalesOrderNumberFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

SalesOrderNumber

This is a unique number automatically assigned to the SalesOrder at creation time by QBPOS. If a SalesOrder was used to generate a PurchaseOrder, the SalesOrderNumber is returned in the PurchaseOrder Ret object.
IQBStringType     Y

SalesOrderNumberRangeFilter

Filters PurchaseOrders by a range of SalesOrders.
ISalesOrderNumberRangeFilter      

FromSalesOrderNumber

Start of the range.
IQBStringType     Y

ToSalesOrderNumber

End of the range.
IQBStringType     Y

SalesOrderStatusDesc

Current status of the order: OPEN, CLOSED, or a custom status you have defined in the company preferences. Used to track and filter the progression of orders for viewing and reporting.
IQBStringType      

SalesOrderType

Available for Pro and greater versions of QBPOS. The type of the customer order document: Sales orders, which are customer orders of out-of-stock merchandise Work orders, which are quotes for services Layaways, which are sales of in-stock items, but paid for via a series of deposits prior to customer receiving the items.
IQBENSalesOrderTypeType      

StoreExchangeStatus

In multi store configurations, if the customer’s information has changed, this information is updated at the headquarters store. This response field indicates whether the information was successfully updated or not.
IQBENStoreExchangeStatusType      

ORSubtotalFilters

IORSubtotalFilters      

SubtotalFilter

Filters vouchers by their Subtotal value.
ISubtotalFilter      

MatchNumericCriterion

Specifies how the specified numeric value will filter the target objects, that is, specifies the the comparison that will be used.
IQBENMatchNumericCriterionType     Y

Subtotal

The total cost (sum of extended item costs) of the PO before applying any discounts or fees. This value is updated when a voucher that references the PO is updated.
IQBAmountType     Y

SubtotalRangeFilter

Filters vouchers by a range of Subtotal values.
ISubtotalRangeFilter      

FromSubtotal

Start of the Subtotal range.
IQBAmountType     Y

ToSubtotal

End of the Subtotal range.
IQBAmountType     Y

ORTaxAmountFilters

IORTaxAmountFilters      

TaxAmountFilter

Filters SalesOrders by their total tax.
ITaxAmountFilter      

MatchNumericCriterion

Specifies how the specified numeric value will filter the target objects, that is, specifies the the comparison that will be used.
IQBENMatchNumericCriterionType     Y

TaxAmount

By default, a tax code is assigned to individual items, and the tax is calculated when the sale is made. The tax that is actually assessed depends on the tax location (tax category) that is in effect. Notice that the tax amount is returned in the response to a non-held SalesReceiptAdd request: you do not specify or set this tax amount. To change the tax, you have to set up tax category in company preferences that has the tax rate that you need. If you don’t want any taxes to be applied, for example, the sale is to a government agency or some other tax exempt entity, specify the value “Exempt” for the TaxCategory when you build your SalesReceiptAdd request.
IQBAmountType     Y

TaxAmountRangeFilter

Filters SalesOrders by a range of total tax values.
ITaxAmountRangeFilter      

FromTaxAmount

Start of the tax amount range.
IQBAmountType     Y

ToTaxAmount

End of the tax amount range.
IQBAmountType     Y

ORTaxCategoryFilters

IORTaxCategoryFilters      

TaxCategoryFilter

Filters customers by their tax category.
ITaxCategoryFilter      

MatchStringCriterion

This specifies which part of the string is being looked at.
IQBENMatchStringCriterionType     Y

TaxCategory

In the QBPOS UI, you specify sales tax behavior by creating sales tax locations and tax codes. (What the QBPOS UI calls a “tax location” is what the SDK calls a “tax category”.) The tax code and its name is shared between all tax categories (locations): that is, all tax categories will have the same set of tax codes. However, the actual tax rate(s) that are used in a given tax code can vary from one tax category to the next. The tax code rates that are actually applied at transaction time are those that are in the tax category that is currently specified as the default tax category (location) in sales tax preferences. You create and modify tax categories and tax codes using the TaxCategoryAdd/Mod and TaxCodeAdd/Mod requests respectively. You assign tax code rates to a tax code within a tax category using the TaxRecordMod request. You query for the tax preference information (tax rate information for each tax code under each tax category) using the CompanyQuery. However, currently the default tax category (location) can be specified only within the QBPOS UI. When you create or modify an inventory item in QBPOS, you apply a tax code to it, but not a tax category. At sales transaction time, the actual sales tax is calculated for each item, based on the tax code assigned to that item and the tax code rate(s) for that tax code under the tax category currently specified as the default tax category (location).
IQBStringType 20 chars   Y

TaxCategoryRangeFilter

Filters customers by a range of tax categories.
ITaxCategoryRangeFilter      

FromTaxCategory

Start of the tax category range.
IQBStringType 20 chars   Y

ToTaxCategory

Start of the tax category range.
IQBStringType 20 chars   Y

ORTaxPercentageFilters

IORTaxPercentageFilters      

TaxPercentageFilter

Filters SalesOrders by the tax percentage value.
ITaxPercentageFilter      

MatchNumericCriterion

Specifies how the specified numeric value will filter the target objects, that is, specifies the the comparison that will be used.
IQBENMatchNumericCriterionType     Y

TaxPercentage

You can specify either a tax amount or a tax percentage, but not both. The other value and the document total tax amounts will be recomputed to reflect the value you specify. Note that the Tax % field in the receipt totals area is disabled if multiple tax rates apply to sold items.
IQBFloatType     Y

TaxPercentageRangeFilter

Filters SalesOrders by a range of tax percentage values.
ITaxPercentageRangeFilter      

FromTaxPercentage

Start of the range.
IQBFloatType     Y

ToTaxPercentage

End of the range.
IQBFloatType     Y

ORTotalFilters

IORTotalFilters      

TotalFilter

Filters vouchers by their Total value.
ITotalFilter      

MatchNumericCriterion

Specifies how the specified numeric value will filter the target objects, that is, specifies the the comparison that will be used.
IQBENMatchNumericCriterionType     Y

Total

The total PO amount after discounts and fees are applied.Total = Subtotal - Disc $ + Fee This value is updated when a voucher that references the PO is updated.
IQBAmountType     Y

TotalRangeFilter

Filters vouchers by a range of Total values.
ITotalRangeFilter      

FromTotal

Start of the Total range.
IQBAmountType     Y

ToTotal

End of the Total range.
IQBAmountType     Y

ORTxnDateFilters

IORTxnDateFilters      

TxnDateFilter

The ITxnDateFilter group object allows you to filter by transaction creation date.
ITxnDateFilter      

MatchNumericCriterion

Specifies how the specified numeric value will filter the target objects, that is, specifies the the comparison that will be used.
IQBENMatchNumericCriterionType     Y

TxnDate

The date of the transaction. In some cases, if you leave TxnDate out of an -Add message, QuickBooks will prefill TxnDate with the date of the last-saved transaction of the same type.
IQBDateType     Y

TxnDateRangeFilter

Filters according to the original transaction dates.
ITxnDateRangeFilter      

FromTxnDate

Selects transactions created on or after this date. Both FromTxnDate and ToTxnDate must be between 01/01/1901 and 12/31/9999.If you omit FromTxnDate, it will be set to 1970-01-01 (1969-12-31 PST).
IQBDateType     Y

ToTxnDate

Selects transactions created on or before this date. Both ToTxnDate and FromTxnDate must be between 01/01/1901 and 12/31/9999. If you omit ToTxnDate, it will be set to 2038-01-19 (2038-01-18 PST).
IQBDateType     Y

ORUnfilledPercentFilters

IORUnfilledPercentFilters      

UnfilledPercentFilter

Filters PurchaseOrders by their UnfilledPercent value.
IUnfilledPercentFilter      

MatchNumericCriterion

Specifies how the specified numeric value will filter the target objects, that is, specifies the the comparison that will be used.
IQBENMatchNumericCriterionType     Y

UnfilledPercent

The percentage of the total PO quantity that has not yet been received. This value is updated when a voucher that references the PO is updated.
IQBFloatType     Y

UnfilledPercentRangeFilter

Filters PurchaseOrders by a range of UnfilledPercent values.
IUnfilledPercentRangeFilter      

FromUnfilledPercent

Start of the range.
IQBFloatType     Y

ToUnfilledPercent

End of the range.
IQBFloatType     Y

IncludeRetElementList

You can use the IncludeRetElement feature to restrict the data returned in the response to the specified qbposXML field here. If you do this, only those elements specified will be returned. To use this feature, you simply add the qbposXML element name to the IncludeRetElementList. The following example shows how to do this, specifying that only the CreatedBy and ClockOutTime elements are to be returned in the TimeEntryAdd response: Dim MyTimeEntry As ITimeEntryAdd Set MyTimeEntry = requestMsgSet.AppendTimeEntryAddRq MyTimeEntry.IncludeRetElementList.Add “CreatedBy” MyTimeEntry.IncludeRetElementList.Add “ClockOutTime” ‘ set the other properties as desired…
IBSTRList 50 chars 2.0  
Tag Type Max length Implementation Required

IResponse

Returns the SalesOrders specified in the filter criteria.
       

StatusCode

A number that corresponds to a statusSeverity and statusMessage. Five status codes relate directly to signon messages: 2000, 2010, 2020, 2030, and 2040. For details about these and other statusCode values that can be returned, see the statusCode table on the Error Codes page.
IQBIntType     Y

StatusSeverity

One of the following values: INFO The request was completed, and the results are consistent with what your application expected. WARNING The request was completed, but the results might not be consistent with what you expected. ERROR The request was not completed. No data will appear in the server’s response after the statusMessage.
IQBStringType     Y

StatusMessage

A user-readable explanation of the success or error condition that is indicated by the statusCode. For details about the statusMessage values that can be returned, see the “Explanation” column of the statusCode table on the Error Codes page.
IQBStringType     Y

retCount

The retCount is returned in a query if in the query request you specified the metaData attribute with a value of MetaDataOnly (in which case the retCount is the only data returned in the query response) or MetaDataAndResponseData (the query response contains object data AND the approximate count). The retCount value contains the approximate count of the objects that could be expected to be returned from the query. A common use of this feature is to specify a count with no data in order to determine how many objects to expect from the actual query. You should be aware that the count returned in retCount is not guaranteed to be exact: it could be off slightly due to new object creation or deletions.
IQBIntType   4.0|us.png| Y

iteratorRemainingCount

This attribute is provided in the response in a query using iterators, indicating the number of objects remaining in the iteration. This can help you specify a MaxReturn value tailored to the number of objects still to be iterated through in your query.
IQBIntType   5.0|us.png| Y

iteratorID

The iterator query attribute is provided with most query types to allow you to break down query results into smaller and more manageable chunks of data. An iterator results in responses that contain only the specified number of objects. The iterator is created when a query contains the iterator attribute set to Start, along with a MaxReturn value specifying how many records are to be returned in each iteration. The response to that first query iteration contains, along with the response data, an IteratorID value that uniquely identifies that iterator. This is important because you can have many iterators active at the same time. Accordingly, in subsequent iterations of that query, you need to supply that returned iteratorID so the SDK knows where to resume the iteration.
IQBUUIDType   5.0|us.png| Y

Detail

ISalesOrderRetList      

(List of ISalesOrderRet Objects)

       

TxnID

QuickBooks generates a unique TxnID for each transaction that is added to QuickBooks. A TxnID returned from a request can be used to refer to the transaction in subsequent requests. Notice that you cannot supply the TxnID of a TimeTracking transaction to TransactionQueryRq requests. If you do, you get an error stating that no such record could be found, even though the transaction is in QuickBooks. This behavior reflects the behavior in the QuicKBooks UI in the Find window.
IQBIDType      

TimeCreated

The timestamp indicating the time when this object was created in QBPOS.
IQBDateTimeType   1.1  

TimeModified

The time when the object was modified by QBPOS.
IQBDateTimeType      

Associate

The employee making the adjustment transaction.
IQBStringType 40 chars    

BalanceDue

The balance remaining on the order. Balance Due = (Total – Deposit Balance)
IQBAmountType      

Cashier

Name of the employee taking the sales order. Notice that this value is auto-filled with the logged-in employee name if logins are required.
IQBStringType 16 chars    

CustomerListID

Unique QBPOS ID value identifying the customer being referenced.
IQBIDType      

DepositBalance

The sum of all deposits received, less any deposits already used.
IQBAmountType      

Discount

Discount amount: Enter the amount of any discount applicable to the PO. Discounts are applied to the PO subtotal. Entering an amount causes the Disc % field to be automatically calculated.
IQBAmountType      

DiscountPercent

Enter a percentage discount applicable to the PO. Discounts are applied to the PO subtotal. Entering a discount percentage causes the Disc $ field to be automatically calculated.
IQBFloatType      

Instructions

You can use this optional field to provide instructions to the vendor regarding the order. You can add up to two lines of text. This text prints on PurchaseOrders, but are not displayed on-screen.
IQBStringType 2000 chars    

ItemsCount

The number of line items in the adjustment add request that added the adjustment to QBPOS.
IQBIntType      

PriceLevelNumber

If you are giving a price level discount to this customer, rather than discount percent, you need to specify which of the four supported levels you want to apply.
IQBENPriceLevelNumberType      

PromoCode

This field is used to record a miscellaneous note on a SalesOrder, normally identifying a special sale. An entry in this field may be required depending on settings in the company preferences.
IQBStringType 10 chars    

Qty

The quantity of the line item being ordered or transferred.
IQBQuanType      

SalesOrderNumber

This is a unique number automatically assigned to the SalesOrder at creation time by QBPOS. If a SalesOrder was used to generate a PurchaseOrder, the SalesOrderNumber is returned in the PurchaseOrder Ret object.
IQBStringType 32 chars    

SalesOrderStatusDesc

Current status of the order: OPEN, CLOSED, or a custom status you have defined in the company preferences. Used to track and filter the progression of orders for viewing and reporting.
IQBStringType      

SalesOrderType

Available for Pro and greater versions of QBPOS. The type of the customer order document: Sales orders, which are customer orders of out-of-stock merchandise Work orders, which are quotes for services Layaways, which are sales of in-stock items, but paid for via a series of deposits prior to customer receiving the items.
IQBENSalesOrderTypeType      

StoreExchangeStatus

In multi store configurations, if the customer’s information has changed, this information is updated at the headquarters store. This response field indicates whether the information was successfully updated or not.
IQBENStoreExchangeStatusType      

Subtotal

The total cost (sum of extended item costs) of the PO before applying any discounts or fees. This value is updated when a voucher that references the PO is updated.
IQBAmountType      

TaxAmount

By default, a tax code is assigned to individual items, and the tax is calculated when the sale is made. The tax that is actually assessed depends on the tax location (tax category) that is in effect. Notice that the tax amount is returned in the response to a non-held SalesReceiptAdd request: you do not specify or set this tax amount. To change the tax, you have to set up tax category in company preferences that has the tax rate that you need. If you don’t want any taxes to be applied, for example, the sale is to a government agency or some other tax exempt entity, specify the value “Exempt” for the TaxCategory when you build your SalesReceiptAdd request.
IQBAmountType      

TaxCategory

In the QBPOS UI, you specify sales tax behavior by creating sales tax locations and tax codes. (What the QBPOS UI calls a “tax location” is what the SDK calls a “tax category”.) The tax code and its name is shared between all tax categories (locations): that is, all tax categories will have the same set of tax codes. However, the actual tax rate(s) that are used in a given tax code can vary from one tax category to the next. The tax code rates that are actually applied at transaction time are those that are in the tax category that is currently specified as the default tax category (location) in sales tax preferences. You create and modify tax categories and tax codes using the TaxCategoryAdd/Mod and TaxCodeAdd/Mod requests respectively. You assign tax code rates to a tax code within a tax category using the TaxRecordMod request. You query for the tax preference information (tax rate information for each tax code under each tax category) using the CompanyQuery. However, currently the default tax category (location) can be specified only within the QBPOS UI. When you create or modify an inventory item in QBPOS, you apply a tax code to it, but not a tax category. At sales transaction time, the actual sales tax is calculated for each item, based on the tax code assigned to that item and the tax code rate(s) for that tax code under the tax category currently specified as the default tax category (location).
IQBStringType 20 chars    

TaxPercentage

You can specify either a tax amount or a tax percentage, but not both. The other value and the document total tax amounts will be recomputed to reflect the value you specify. Note that the Tax % field in the receipt totals area is disabled if multiple tax rates apply to sold items.
IQBFloatType      

Total

The total PO amount after discounts and fees are applied.Total = Subtotal - Disc $ + Fee This value is updated when a voucher that references the PO is updated.
IQBAmountType      

TxnDate

The date of the transaction. In some cases, if you leave TxnDate out of an -Add message, QuickBooks will prefill TxnDate with the date of the last-saved transaction of the same type.
IQBDateType      

UnfilledPercent

The percentage of the total PO quantity that has not yet been received. This value is updated when a voucher that references the PO is updated.
IQBFloatType      

BillingInformation

As in the QBPOS UI, this information is supplied to the SalesOrder form automatically when a customer is selected from the customer list. However, if the customer has a new address or if the customer does not yet exist in QBPOS, the required information can be supplied in these data fields.
IBillingInformation      

City

The city name in the address.
IQBStringType 31 chars    

CompanyName

The name of the business.
IQBStringType 41 chars    

Country

The country of residence of this employee.
IQBStringType 32 chars 1.1  

FirstName

The first name.
IQBStringType 30 chars    

LastName

The last name.
IQBStringType 30 chars    

Phone

Primary Telephone number of this person or entity.
IQBStringType 40 chars    

Phone2

Alternate phone number or fax number for this person or entity. This maps to Phone 2 in the QBPOS UI.
IQBStringType 40 chars    

Phone3

Alternate phone number or fax number for this person or entity. This maps to Alt. Phone in the QBPOS UI.
IQBStringType 40 chars 1.1  

Phone4

Alternate phone number, fax number, or other contact information for this person or entity. This maps to Alt. Contact in the QBPOS UI.
IQBStringType 40 chars 1.1  

PostalCode

The postal code used in the address.
IQBStringType 10 chars    

Salutation

A formal reference, such as Mr. or Dr., that precedes a name.
IQBStringType 15 chars    

State

The state name in the address.
IQBStringType 21 chars    

Street

Street Address of the vendor, customer, or other addressee.
IQBStringType 41 chars    

Street2

Street Address of the vendor, customer, or other addressee.
IQBStringType 41 chars 3.0  

WebNumber

Number used on a web site.
IQBStringType 32 chars 3.0  

ShippingInformation

Indicates destination address and shipping method to be used to deliver the ordered merchandise.
IShippingInformation      

AddressName

Name of the ship adddress.
IQBStringType 32 chars 2.5  

City

The city name in the address.
IQBStringType 31 chars    

CompanyName

The name of the business.
IQBStringType 41 chars    

Country

The country of residence of this employee.
IQBStringType 32 chars 1.1  

FullName

Full name of the entity, for example customer or vendor fullname.
IQBStringType      

Phone

Primary Telephone number of this person or entity.
IQBStringType 40 chars    

Phone2

Alternate phone number or fax number for this person or entity. This maps to Phone 2 in the QBPOS UI.
IQBStringType 40 chars    

Phone3

Alternate phone number or fax number for this person or entity. This maps to Alt. Phone in the QBPOS UI.
IQBStringType 40 chars 1.1  

Phone4

Alternate phone number, fax number, or other contact information for this person or entity. This maps to Alt. Contact in the QBPOS UI.
IQBStringType 40 chars 1.1  

PostalCode

The postal code used in the address.
IQBStringType 10 chars    

ShipBy

The shipping method used to send merchandise to a customer.
IQBStringType 50 chars    

Shipping

Indicates the amount to be paid for shipping.
IQBAmountType      

State

The state name in the address.
IQBStringType 21 chars    

Street

Street Address of the vendor, customer, or other addressee.
IQBStringType 41 chars    

Street2

Street Address of the vendor, customer, or other addressee.
IQBStringType 41 chars 3.0  

SalesOrderItemRetList

The list of line items in the sales order.
ISalesOrderItemRetList      

(List of ISalesOrderItemRet Objects)

       

ListID

The unique ID returned by QBPOS for this object. If supplied in a request, the ListID is a reference to an object required in the request. For example, in a SalesOrder or PurchaseOrder line item, the ListID that is required is an Item list ID.
IQBIDType      

TxnLineID

Identification number of the transaction line. (TxnLineID is supported as of v2.0 of the SDK. With qbXML v1.0 and v1.1, TxnLineID is always returned as zero.) If you need to add a new transaction line in a transaction Mod request, you can do so by setting the TxnLineID to -1.
IQBIntType      

ALU

Alternate Lookup. A user-defined identifier to be used to look up an item. Typically, this field contains such as the manufacturer’s part number, but it can contain any text descriptions, catalog numbers, etc. Duplicate Alternate Lookups are not allowed. Do not duplicate the Item # or UPC in this field. This will adversely affect performance for item lookups.
IQBStringType 20 chars    

Associate

The employee making the adjustment transaction.
IQBStringType 40 chars    

Attribute

A field used to describe an item characteristic, typically color, pattern, material, or a second size. One to eight characters.
IQBStringType 12 chars    

Commission

The commission amount for the item, based on the item price and the Associates commission percent, if item eligible for commissions.
IQBAmountType      

Desc1

The principal item description field. This description is printed on receipts. For some versions of QBPOS, (Pro), this must be the same for all members of a style. Changes to this field can be applied to an item or to an entire style.
IQBStringType 30 chars    

Desc2

Secondary description field usually used for any additional information to describe this particular item, such as a vendor’s catalog number. Also can be used for additional information at the point of sale.
IQBStringType      

Discount

Discount amount: Enter the amount of any discount applicable to the PO. Discounts are applied to the PO subtotal. Entering an amount causes the Disc % field to be automatically calculated.
IQBAmountType      

DiscountPercent

Enter a percentage discount applicable to the PO. Discounts are applied to the PO subtotal. Entering a discount percentage causes the Disc $ field to be automatically calculated.
IQBFloatType      

DiscountType

Allows you to specify the reason for an item discount. Discount types can be customized in company preferences and used to filter reports.
IQBStringType 32 chars    

DiscountSource

DiscountSource may have one of the following values: None, Pricing, Manual, Reward
IQBENDiscountSourceType   2.5  

ExtendedPrice

The extended price of a line item, which is item Quantity X item Price.
IQBAmountType      

ExtendedTax

Total tax per line item in the order. Per item Tax X item Quantity
IQBAmountType      

ItemNumber

Unique number assigned to the item when it is added to QBPOS.
IQBIntType      

NumberOfBaseUnits

If you use multiple units of measure, rather than a single UOM, you need to select one of the UOMs as the base unit. This base unit should be the smallest unit that you sell by. Inventory quantities are always expressed in terms of this base unit.
IQBQuanType   2.0  

Price

The purchase price or sales price of this item.
IQBAmountType      

PriceLevelNumber

If you are giving a price level discount to this customer, rather than discount percent, you need to specify which of the four supported levels you want to apply.
IQBENPriceLevelNumberType      

Qty

The quantity of the line item being ordered or transferred.
IQBQuanType      

QtySold

The quantity of the ordered item that is sold to the customer.
IQBQuanType   1.2  

SerialNumber

Item serial numbers can be recorded in QBPOS for purposes of warranty tracking or meeting legal requirements. Once recorded, former documents can be quickly located by searching by serial number. To use serial number tracking: 1. In inventory, specify those items for which you want to record serial numbers by selecting PROMPT in the Serial # Tracking field. 2. When listing these items on documents (except purchase orders and cost memos), the QBPOS user is prompted to enter a unique serial number for each unit being processed. If listing several items on a document for which you have set the serial number requirement, the user is prompted to enter serial numbers for each unit of each of those items in sequence.
IQBStringType 25 chars    

Size

The size of an item; 1 to 8 characters. This field can also be used to describe a second item attribute other than size if desired.
IQBStringType 12 chars    

TaxAmount

By default, a tax code is assigned to individual items, and the tax is calculated when the sale is made. The tax that is actually assessed depends on the tax location (tax category) that is in effect. Notice that the tax amount is returned in the response to a non-held SalesReceiptAdd request: you do not specify or set this tax amount. To change the tax, you have to set up tax category in company preferences that has the tax rate that you need. If you don’t want any taxes to be applied, for example, the sale is to a government agency or some other tax exempt entity, specify the value “Exempt” for the TaxCategory when you build your SalesReceiptAdd request.
IQBAmountType      

TaxCode

In the QBPOS UI, you specify sales tax behavior by creating sales tax locations and tax codes. (What the QBPOS UI calls a “tax location” is what the SDK calls a “tax category”.) The tax code and its name is shared between all tax categories (locations): that is, all tax categories will have the same set of tax codes. However, the actual tax rate(s) that are used in a given tax code can vary from one tax category to the next. The tax code rates that are actually applied at transaction time are those that are in the tax category that is currently specified as the default tax category (location) in sales tax preferences. You create and modify tax categories and tax codes using the TaxCategoryAdd/Mod and TaxCodeAdd/Mod requests respectively. You assign tax code rates to a tax code within a tax category using the TaxRecordMod request. You query for the tax preference information (tax rate information for each tax code under each tax category) using the CompanyQuery. However, currently the default tax category (location) can be specified only within the QBPOS UI. When you create or modify an inventory item in QBPOS, you apply a tax code to it, but not a tax category. At sales transaction time, the actual sales tax is calculated for each item, based on the tax code assigned to that item and the tax code rate(s) for that tax code under the tax category currently specified as the default tax category (location).
IQBStringType      

TaxPercentage

You can specify either a tax amount or a tax percentage, but not both. The other value and the document total tax amounts will be recomputed to reflect the value you specify. Note that the Tax % field in the receipt totals area is disabled if multiple tax rates apply to sold items.
IQBFloatType      

UnitOfMeasure

If the company is using only a single unit of measure, this specifies the unit of measure for the item. If the company is using multiple units of measure, this specifies the base unit of measure for the item. Inventory quantities are tracked and reported in terms of this base unit.
IQBStringType 20 chars 2.0  

UPC

Universal Product Code. The item’s unique UPC/EAN/ISBN identifier. This field must be 13 characters. If a shorter number is entered, QBPOS uses an appropriate algorithm to lengthen the entry to fill the 13-character field.
IQBStringType 18 chars    

WebDesc

Description of item on the web.
IQBStringType   3.0  

Manufacturer

Manufacturer of item.
IQBStringType 50 chars 3.0  

Weight

Weight of item.
IQBFloatType   3.0  

WebSKU

SKU of item on the web.
IQBStringType 20 chars 3.0  

DataExtRetList

If you specify any custom fields/private data extensions to be returned in the query request (in the OwnerIDList), then this Ret List will contain all of the data extensions that belong to each specified OwnerID. For example, if you specify an OwnerID value of 0 (custom fields), then the query will return all custom data for the returned records.
IDataExtRetList   1.2  

(List of IDataExtRet Objects)

       

OwnerID

OwnerID refers to the owner of a data extension, and must be 0 or a valid GUID. (Custom fields, which are visible in the QuickBooks UI, always have an OwnerID of 0. ) Usually you would keep your application’s GUID confidential to prevent other applications from accessing your data extensions. But if you want to share data extensions with another application, the applications need to use the same GUID. In this case, each application could use two GUIDs, one for shared data extensions and one for confidential data extensions. (An application can have any number of GUIDs.) When you share a data extension with another application, the other application must know both the OwnerID and the DataExtName, as these together form a data extension’s unique name.
IQBGUIDType     Y

DataExtName

The name of the data extension. If this is a custom field, DataExtName will be visible as a label in the QuickBooks user interface. Also because OwnerID and DataExtName together make the data extension unique, and because custom fields all have the same OwnerID of zero, the DataExtName must be a unique value among existing custom fields. In contrast, the DataExtName for private data extensions must be unique only for the specified OwnerID GUID.
IQBStringType     Y

DataExtType

b>DataExtType The type of the data extension.
IQBENDataExtTypeType     Y

DataExtValue

The data in this field. The maximum length of DataExtValue will depend on the DataExtType of this data extension. For example, if DataExtType is STR255TYPE, the maximum length of DataExtValue is 255 characters. If DataExtType is STR1024TYPE, the maximum size of DataExtValue is 1KB.
IQBStringType     Y

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
<?xml version="1.0" encoding="utf-8"?>
<?qbposxml version="4.0"?>
<QBPOSXML>
        <QBPOSXMLMsgsRq onError="stopOnError">
                <SalesOrderQueryRq metaData="ENUMTYPE" iterator="ENUMTYPE" iteratorID="UUIDTYPE">
                        <MaxReturned >INTTYPE</MaxReturned> <!-- optional -->
                        <OwnerID >GUIDTYPE</OwnerID> <!-- optional, may repeat -->
                        <TxnID >IDTYPE</TxnID> <!-- optional -->
                        <!-- BEGIN OR -->
                                <TimeCreatedFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <TimeCreated >DATETIMETYPE</TimeCreated> <!-- required -->
                                </TimeCreatedFilter>
                        <!-- OR -->
                                <TimeCreatedRangeFilter> <!-- optional -->
                                        <FromTimeCreated >DATETIMETYPE</FromTimeCreated> <!-- required -->
                                        <ToTimeCreated >DATETIMETYPE</ToTimeCreated> <!-- required -->
                                </TimeCreatedRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <TimeModifiedFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <TimeModified >DATETIMETYPE</TimeModified> <!-- required -->
                                </TimeModifiedFilter>
                        <!-- OR -->
                                <TimeModifiedRangeFilter> <!-- optional -->
                                        <FromTimeModified >DATETIMETYPE</FromTimeModified> <!-- required -->
                                        <ToTimeModified >DATETIMETYPE</ToTimeModified> <!-- required -->
                                </TimeModifiedRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <AssociateFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <Associate >STRTYPE</Associate> <!-- required -->
                                </AssociateFilter>
                        <!-- OR -->
                                <AssociateRangeFilter> <!-- optional -->
                                        <FromAssociate >STRTYPE</FromAssociate> <!-- required -->
                                        <ToAssociate >STRTYPE</ToAssociate> <!-- required -->
                                </AssociateRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <BalanceDueFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <BalanceDue >AMTTYPE</BalanceDue> <!-- required -->
                                </BalanceDueFilter>
                        <!-- OR -->
                                <BalanceDueRangeFilter> <!-- optional -->
                                        <FromBalanceDue >AMTTYPE</FromBalanceDue> <!-- required -->
                                        <ToBalanceDue >AMTTYPE</ToBalanceDue> <!-- required -->
                                </BalanceDueRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <CashierFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <Cashier >STRTYPE</Cashier> <!-- required -->
                                </CashierFilter>
                        <!-- OR -->
                                <CashierRangeFilter> <!-- optional -->
                                        <FromCashier >STRTYPE</FromCashier> <!-- required -->
                                        <ToCashier >STRTYPE</ToCashier> <!-- required -->
                                </CashierRangeFilter>
                        <!-- END OR -->
                        <CustomerListID >IDTYPE</CustomerListID> <!-- optional -->
                        <!-- BEGIN OR -->
                                <DiscountFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <Discount >AMTTYPE</Discount> <!-- required -->
                                </DiscountFilter>
                        <!-- OR -->
                                <DiscountRangeFilter> <!-- optional -->
                                        <FromDiscount >AMTTYPE</FromDiscount> <!-- required -->
                                        <ToDiscount >AMTTYPE</ToDiscount> <!-- required -->
                                </DiscountRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <DiscountPercentFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <DiscountPercent >FLOATTYPE</DiscountPercent> <!-- required -->
                                </DiscountPercentFilter>
                        <!-- OR -->
                                <DiscountPercentRangeFilter> <!-- optional -->
                                        <FromDiscountPercent >FLOATTYPE</FromDiscountPercent> <!-- required -->
                                        <ToDiscountPercent >FLOATTYPE</ToDiscountPercent> <!-- required -->
                                </DiscountPercentRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <InstructionsFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <Instructions >STRTYPE</Instructions> <!-- required -->
                                </InstructionsFilter>
                        <!-- OR -->
                                <InstructionsRangeFilter> <!-- optional -->
                                        <FromInstructions >STRTYPE</FromInstructions> <!-- required -->
                                        <ToInstructions >STRTYPE</ToInstructions> <!-- required -->
                                </InstructionsRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <ItemsCountFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <ItemsCount >INTTYPE</ItemsCount> <!-- required -->
                                </ItemsCountFilter>
                        <!-- OR -->
                                <ItemsCountRangeFilter> <!-- optional -->
                                        <FromItemsCount >INTTYPE</FromItemsCount> <!-- required -->
                                        <ToItemsCount >INTTYPE</ToItemsCount> <!-- required -->
                                </ItemsCountRangeFilter>
                        <!-- END OR -->
                        <!-- PriceLevelNumber may have one of the following values: 1, 2, 3, 4, 5 -->
                        <PriceLevelNumber >ENUMTYPE</PriceLevelNumber> <!-- optional -->
                        <!-- BEGIN OR -->
                                <PromoCodeFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <PromoCode >STRTYPE</PromoCode> <!-- required -->
                                </PromoCodeFilter>
                        <!-- OR -->
                                <PromoCodeRangeFilter> <!-- optional -->
                                        <FromPromoCode >STRTYPE</FromPromoCode> <!-- required -->
                                        <ToPromoCode >STRTYPE</ToPromoCode> <!-- required -->
                                </PromoCodeRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <QtyFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <Qty >QUANTYPE</Qty> <!-- required -->
                                </QtyFilter>
                        <!-- OR -->
                                <QtyRangeFilter> <!-- optional -->
                                        <FromQty >QUANTYPE</FromQty> <!-- required -->
                                        <ToQty >QUANTYPE</ToQty> <!-- required -->
                                </QtyRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <SalesOrderNumberFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <SalesOrderNumber >STRTYPE</SalesOrderNumber> <!-- required -->
                                </SalesOrderNumberFilter>
                        <!-- OR -->
                                <SalesOrderNumberRangeFilter> <!-- optional -->
                                        <FromSalesOrderNumber >STRTYPE</FromSalesOrderNumber> <!-- required -->
                                        <ToSalesOrderNumber >STRTYPE</ToSalesOrderNumber> <!-- required -->
                                </SalesOrderNumberRangeFilter>
                        <!-- END OR -->
                        <SalesOrderStatusDesc >STRTYPE</SalesOrderStatusDesc> <!-- optional -->
                        <!-- SalesOrderType may have one of the following values: SalesOrder, Layaway, WorkOrder, WebOrder -->
                        <SalesOrderType >ENUMTYPE</SalesOrderType> <!-- optional -->
                        <!-- StoreExchangeStatus may have one of the following values: Modified, Sent, Acknowledged -->
                        <StoreExchangeStatus >ENUMTYPE</StoreExchangeStatus> <!-- optional -->
                        <!-- BEGIN OR -->
                                <SubtotalFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <Subtotal >AMTTYPE</Subtotal> <!-- required -->
                                </SubtotalFilter>
                        <!-- OR -->
                                <SubtotalRangeFilter> <!-- optional -->
                                        <FromSubtotal >AMTTYPE</FromSubtotal> <!-- required -->
                                        <ToSubtotal >AMTTYPE</ToSubtotal> <!-- required -->
                                </SubtotalRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <TaxAmountFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <TaxAmount >AMTTYPE</TaxAmount> <!-- required -->
                                </TaxAmountFilter>
                        <!-- OR -->
                                <TaxAmountRangeFilter> <!-- optional -->
                                        <FromTaxAmount >AMTTYPE</FromTaxAmount> <!-- required -->
                                        <ToTaxAmount >AMTTYPE</ToTaxAmount> <!-- required -->
                                </TaxAmountRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <TaxCategoryFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <TaxCategory >STRTYPE</TaxCategory> <!-- required -->
                                </TaxCategoryFilter>
                        <!-- OR -->
                                <TaxCategoryRangeFilter> <!-- optional -->
                                        <FromTaxCategory >STRTYPE</FromTaxCategory> <!-- required -->
                                        <ToTaxCategory >STRTYPE</ToTaxCategory> <!-- required -->
                                </TaxCategoryRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <TaxPercentageFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <TaxPercentage >FLOATTYPE</TaxPercentage> <!-- required -->
                                </TaxPercentageFilter>
                        <!-- OR -->
                                <TaxPercentageRangeFilter> <!-- optional -->
                                        <FromTaxPercentage >FLOATTYPE</FromTaxPercentage> <!-- required -->
                                        <ToTaxPercentage >FLOATTYPE</ToTaxPercentage> <!-- required -->
                                </TaxPercentageRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <TotalFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <Total >AMTTYPE</Total> <!-- required -->
                                </TotalFilter>
                        <!-- OR -->
                                <TotalRangeFilter> <!-- optional -->
                                        <FromTotal >AMTTYPE</FromTotal> <!-- required -->
                                        <ToTotal >AMTTYPE</ToTotal> <!-- required -->
                                </TotalRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <TxnDateFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <TxnDate >DATETYPE</TxnDate> <!-- required -->
                                </TxnDateFilter>
                        <!-- OR -->
                                <TxnDateRangeFilter> <!-- optional -->
                                        <FromTxnDate >DATETYPE</FromTxnDate> <!-- required -->
                                        <ToTxnDate >DATETYPE</ToTxnDate> <!-- required -->
                                </TxnDateRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <UnfilledPercentFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <UnfilledPercent >FLOATTYPE</UnfilledPercent> <!-- required -->
                                </UnfilledPercentFilter>
                        <!-- OR -->
                                <UnfilledPercentRangeFilter> <!-- optional -->
                                        <FromUnfilledPercent >FLOATTYPE</FromUnfilledPercent> <!-- required -->
                                        <ToUnfilledPercent >FLOATTYPE</ToUnfilledPercent> <!-- required -->
                                </UnfilledPercentRangeFilter>
                        <!-- END OR -->
                        <IncludeRetElement >STRTYPE</IncludeRetElement> <!-- optional, may repeat -->
                </SalesOrderQueryRq>

                <SalesOrderQueryRs statusCode="INTTYPE" statusSeverity="STRTYPE" statusMessage="STRTYPE" retCount="INTTYPE" iteratorRemainingCount="INTTYPE" iteratorID="UUIDTYPE">
                        <SalesOrderRet> <!-- optional, may repeat -->
                                <TxnID >IDTYPE</TxnID> <!-- optional -->
                                <TimeCreated >DATETIMETYPE</TimeCreated> <!-- optional -->
                                <TimeModified >DATETIMETYPE</TimeModified> <!-- optional -->
                                <Associate >STRTYPE</Associate> <!-- optional -->
                                <BalanceDue >AMTTYPE</BalanceDue> <!-- optional -->
                                <Cashier >STRTYPE</Cashier> <!-- optional -->
                                <CustomerListID >IDTYPE</CustomerListID> <!-- optional -->
                                <DepositBalance >AMTTYPE</DepositBalance> <!-- optional -->
                                <Discount >AMTTYPE</Discount> <!-- optional -->
                                <DiscountPercent >FLOATTYPE</DiscountPercent> <!-- optional -->
                                <Instructions >STRTYPE</Instructions> <!-- optional -->
                                <ItemsCount >INTTYPE</ItemsCount> <!-- optional -->
                                <!-- PriceLevelNumber may have one of the following values: 1, 2, 3, 4, 5 -->
                                <PriceLevelNumber >ENUMTYPE</PriceLevelNumber> <!-- optional -->
                                <PromoCode >STRTYPE</PromoCode> <!-- optional -->
                                <Qty >QUANTYPE</Qty> <!-- optional -->
                                <SalesOrderNumber >STRTYPE</SalesOrderNumber> <!-- optional -->
                                <SalesOrderStatusDesc >STRTYPE</SalesOrderStatusDesc> <!-- optional -->
                                <!-- SalesOrderType may have one of the following values: SalesOrder, Layaway, WorkOrder, WebOrder -->
                                <SalesOrderType >ENUMTYPE</SalesOrderType> <!-- optional -->
                                <!-- StoreExchangeStatus may have one of the following values: Modified, Sent, Acknowledged -->
                                <StoreExchangeStatus >ENUMTYPE</StoreExchangeStatus> <!-- optional -->
                                <Subtotal >AMTTYPE</Subtotal> <!-- optional -->
                                <TaxAmount >AMTTYPE</TaxAmount> <!-- optional -->
                                <TaxCategory >STRTYPE</TaxCategory> <!-- optional -->
                                <TaxPercentage >FLOATTYPE</TaxPercentage> <!-- optional -->
                                <Total >AMTTYPE</Total> <!-- optional -->
                                <TxnDate >DATETYPE</TxnDate> <!-- optional -->
                                <UnfilledPercent >FLOATTYPE</UnfilledPercent> <!-- optional -->
                                <BillingInformation> <!-- optional -->
                                        <City >STRTYPE</City> <!-- optional -->
                                        <CompanyName >STRTYPE</CompanyName> <!-- optional -->
                                        <Country >STRTYPE</Country> <!-- optional -->
                                        <FirstName >STRTYPE</FirstName> <!-- optional -->
                                        <LastName >STRTYPE</LastName> <!-- optional -->
                                        <Phone >STRTYPE</Phone> <!-- optional -->
                                        <Phone2 >STRTYPE</Phone2> <!-- optional -->
                                        <Phone3 >STRTYPE</Phone3> <!-- optional -->
                                        <Phone4 >STRTYPE</Phone4> <!-- optional -->
                                        <PostalCode >STRTYPE</PostalCode> <!-- optional -->
                                        <Salutation >STRTYPE</Salutation> <!-- optional -->
                                        <State >STRTYPE</State> <!-- optional -->
                                        <Street >STRTYPE</Street> <!-- optional -->
                                        <Street2 >STRTYPE</Street2> <!-- optional -->
                                        <WebNumber >STRTYPE</WebNumber> <!-- optional -->
                                </BillingInformation>
                                <ShippingInformation> <!-- optional -->
                                        <AddressName >STRTYPE</AddressName> <!-- optional -->
                                        <City >STRTYPE</City> <!-- optional -->
                                        <CompanyName >STRTYPE</CompanyName> <!-- optional -->
                                        <Country >STRTYPE</Country> <!-- optional -->
                                        <FullName >STRTYPE</FullName> <!-- optional -->
                                        <Phone >STRTYPE</Phone> <!-- optional -->
                                        <Phone2 >STRTYPE</Phone2> <!-- optional -->
                                        <Phone3 >STRTYPE</Phone3> <!-- optional -->
                                        <Phone4 >STRTYPE</Phone4> <!-- optional -->
                                        <PostalCode >STRTYPE</PostalCode> <!-- optional -->
                                        <ShipBy >STRTYPE</ShipBy> <!-- optional -->
                                        <Shipping >AMTTYPE</Shipping> <!-- optional -->
                                        <State >STRTYPE</State> <!-- optional -->
                                        <Street >STRTYPE</Street> <!-- optional -->
                                        <Street2 >STRTYPE</Street2> <!-- optional -->
                                </ShippingInformation>
                                <SalesOrderItemRet> <!-- optional, may repeat -->
                                        <ListID >IDTYPE</ListID> <!-- optional -->
                                        <TxnLineID >INTTYPE</TxnLineID> <!-- optional -->
                                        <ALU >STRTYPE</ALU> <!-- optional -->
                                        <Associate >STRTYPE</Associate> <!-- optional -->
                                        <Attribute >STRTYPE</Attribute> <!-- optional -->
                                        <Commission >AMTTYPE</Commission> <!-- optional -->
                                        <Desc1 >STRTYPE</Desc1> <!-- optional -->
                                        <Desc2 >STRTYPE</Desc2> <!-- optional -->
                                        <Discount >AMTTYPE</Discount> <!-- optional -->
                                        <DiscountPercent >FLOATTYPE</DiscountPercent> <!-- optional -->
                                        <DiscountType >STRTYPE</DiscountType> <!-- optional -->
                                        <!-- DiscountSource may have one of the following values: None, Pricing, Manual, Reward -->
                                        <DiscountSource >ENUMTYPE</DiscountSource> <!-- optional -->
                                        <ExtendedPrice >AMTTYPE</ExtendedPrice> <!-- optional -->
                                        <ExtendedTax >AMTTYPE</ExtendedTax> <!-- optional -->
                                        <ItemNumber >INTTYPE</ItemNumber> <!-- optional -->
                                        <NumberOfBaseUnits >QUANTYPE</NumberOfBaseUnits> <!-- optional -->
                                        <Price >AMTTYPE</Price> <!-- optional -->
                                        <!-- PriceLevelNumber may have one of the following values: 1, 2, 3, 4, 5 -->
                                        <PriceLevelNumber >ENUMTYPE</PriceLevelNumber> <!-- optional -->
                                        <Qty >QUANTYPE</Qty> <!-- optional -->
                                        <QtySold >QUANTYPE</QtySold> <!-- optional -->
                                        <SerialNumber >STRTYPE</SerialNumber> <!-- optional -->
                                        <Size >STRTYPE</Size> <!-- optional -->
                                        <TaxAmount >AMTTYPE</TaxAmount> <!-- optional -->
                                        <TaxCode >STRTYPE</TaxCode> <!-- optional -->
                                        <TaxPercentage >FLOATTYPE</TaxPercentage> <!-- optional -->
                                        <UnitOfMeasure >STRTYPE</UnitOfMeasure> <!-- optional -->
                                        <UPC >STRTYPE</UPC> <!-- optional -->
                                        <WebDesc >STRTYPE</WebDesc> <!-- optional -->
                                        <Manufacturer >STRTYPE</Manufacturer> <!-- optional -->
                                        <Weight >FLOATTYPE</Weight> <!-- optional -->
                                        <WebSKU >STRTYPE</WebSKU> <!-- optional -->
                                </SalesOrderItemRet>
                                <DataExtRet> <!-- optional, may repeat -->
                                        <OwnerID >GUIDTYPE</OwnerID> <!-- required -->
                                        <DataExtName >STRTYPE</DataExtName> <!-- required -->
                                        <!-- DataExtType may have one of the following values: INTTYPE, AMTTYPE, PRICETYPE, QUANTYPE, PERCENTTYPE, DATETIMETYPE, STR255TYPE, STR1024TYPE -->
                                        <DataExtType >ENUMTYPE</DataExtType> <!-- required -->
                                        <DataExtValue >STRTYPE</DataExtValue> <!-- required -->
                                </DataExtRet>
                        </SalesOrderRet>
                </SalesOrderQueryRs>
        </QBPOSXMLMsgsRq>
</QBPOSXML>

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
'The following sample code is generated as an illustration of
'Creating requests and parsing responses ONLY
'This code is NOT intended to show best practices or ideal code
'Use at your most careful discretion

imports System
imports System.Net
imports System.Drawing
imports System.Collections
imports System.ComponentModel
imports System.Windows.Forms
imports System.Data
imports System.IO
imports Interop.qbposfc4

        Public Class SampleSalesOrderQuery
                Public Sub  DoSalesOrderQuery()
                        Dim sessionBegun as Boolean
                        sessionBegun = False
                        Dim connectionOpen as Boolean
                        connectionOpen = False
                        Dim sessionManager as QBPOSSessionManager
                        sessionManager = nothing

                        Try
                                'Create the session Manager object
                                sessionManager = new QBPOSSessionManager

                                'Create the message set request object to hold our request
                                Dim requestMsgSet as IMsgSetRequest
                                requestMsgSet = sessionManager.CreateMsgSetRequest(4,0)
                                requestMsgSet.Attributes.OnError = ENRqOnError.roeContinue

                                BuildSalesOrderQueryRq(requestMsgSet)

                                'Connect to QuickBooks and begin a session
                                sessionManager.OpenConnection("","Sample Code from OSR")
                                connectionOpen = True
                                sessionManager.BeginSession("")
                                sessionBegun = True

                                'Send the request and get the response from QuickBooks
                                Dim responseMsgSet as IMsgSetResponse
                                responseMsgSet = sessionManager.DoRequests(requestMsgSet)

                                'End the session and close the connection to QuickBooks
                                sessionManager.EndSession()
                                sessionBegun = False
                                sessionManager.CloseConnection()
                                connectionOpen = False

                                WalkSalesOrderQueryRs(responseMsgSet)
                        Catch e as Exception
                                MessageBox.Show(e.Message, "Error")
                                if (sessionBegun) then
                                        sessionManager.EndSession()
                                End If
                                if (connectionOpen) then
                                        sessionManager.CloseConnection()
                                End If
                        End Try
                End Sub
                Public Sub BuildSalesOrderQueryRq(requestMsgSet as IMsgSetRequest)
                        Dim SalesOrderQueryRq as ISalesOrderQuery
                        SalesOrderQueryRq= requestMsgSet.AppendSalesOrderQueryRq()
                        'Set field value for MaxReturned
                        SalesOrderQueryRq.MaxReturned.SetValue(6)
                        'Set field value for OwnerIDList
                        'May create more than one of these if needed
                        SalesOrderQueryRq.OwnerIDList.Add(System.Guid.NewGuid().ToString())
                        'Set field value for TxnID
                        SalesOrderQueryRq.TxnID.SetValue("200000-1011023419")
                        Dim ORTimeCreatedFiltersElementType3391 as String
                        ORTimeCreatedFiltersElementType3391 = "TimeCreatedFilter"
                        if (ORTimeCreatedFiltersElementType3391 = "TimeCreatedFilter") then
                                'Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for TimeCreated
                                SalesOrderQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.TimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                        End If
                        if (ORTimeCreatedFiltersElementType3391 = "TimeCreatedRangeFilter") then
                                'Set field value for FromTimeCreated
                                SalesOrderQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.FromTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                                'Set field value for ToTimeCreated
                                SalesOrderQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.ToTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                        End If
                        Dim ORTimeModifiedFiltersElementType3392 as String
                        ORTimeModifiedFiltersElementType3392 = "TimeModifiedFilter"
                        if (ORTimeModifiedFiltersElementType3392 = "TimeModifiedFilter") then
                                'Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for TimeModified
                                SalesOrderQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.TimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                        End If
                        if (ORTimeModifiedFiltersElementType3392 = "TimeModifiedRangeFilter") then
                                'Set field value for FromTimeModified
                                SalesOrderQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.FromTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                                'Set field value for ToTimeModified
                                SalesOrderQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.ToTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                        End If
                        Dim ORAssociateFiltersElementType3393 as String
                        ORAssociateFiltersElementType3393 = "AssociateFilter"
                        if (ORAssociateFiltersElementType3393 = "AssociateFilter") then
                                'Set field value for MatchStringCriterion
                                SalesOrderQueryRq.ORAssociateFilters.AssociateFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for Associate
                                SalesOrderQueryRq.ORAssociateFilters.AssociateFilter.Associate.SetValue("ab")
                        End If
                        if (ORAssociateFiltersElementType3393 = "AssociateRangeFilter") then
                                'Set field value for FromAssociate
                                SalesOrderQueryRq.ORAssociateFilters.AssociateRangeFilter.FromAssociate.SetValue("ab")
                                'Set field value for ToAssociate
                                SalesOrderQueryRq.ORAssociateFilters.AssociateRangeFilter.ToAssociate.SetValue("ab")
                        End If
                        Dim ORBalanceDueFiltersElementType3394 as String
                        ORBalanceDueFiltersElementType3394 = "BalanceDueFilter"
                        if (ORBalanceDueFiltersElementType3394 = "BalanceDueFilter") then
                                'Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORBalanceDueFilters.BalanceDueFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for BalanceDue
                                SalesOrderQueryRq.ORBalanceDueFilters.BalanceDueFilter.BalanceDue.SetValue(10.01)
                        End If
                        if (ORBalanceDueFiltersElementType3394 = "BalanceDueRangeFilter") then
                                'Set field value for FromBalanceDue
                                SalesOrderQueryRq.ORBalanceDueFilters.BalanceDueRangeFilter.FromBalanceDue.SetValue(10.01)
                                'Set field value for ToBalanceDue
                                SalesOrderQueryRq.ORBalanceDueFilters.BalanceDueRangeFilter.ToBalanceDue.SetValue(10.01)
                        End If
                        Dim ORCashierFiltersElementType3395 as String
                        ORCashierFiltersElementType3395 = "CashierFilter"
                        if (ORCashierFiltersElementType3395 = "CashierFilter") then
                                'Set field value for MatchStringCriterion
                                SalesOrderQueryRq.ORCashierFilters.CashierFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for Cashier
                                SalesOrderQueryRq.ORCashierFilters.CashierFilter.Cashier.SetValue("ab")
                        End If
                        if (ORCashierFiltersElementType3395 = "CashierRangeFilter") then
                                'Set field value for FromCashier
                                SalesOrderQueryRq.ORCashierFilters.CashierRangeFilter.FromCashier.SetValue("ab")
                                'Set field value for ToCashier
                                SalesOrderQueryRq.ORCashierFilters.CashierRangeFilter.ToCashier.SetValue("ab")
                        End If
                        'Set field value for CustomerListID
                        SalesOrderQueryRq.CustomerListID.SetValue("200000-1011023419")
                        Dim ORDiscountFiltersElementType3396 as String
                        ORDiscountFiltersElementType3396 = "DiscountFilter"
                        if (ORDiscountFiltersElementType3396 = "DiscountFilter") then
                                'Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORDiscountFilters.DiscountFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for Discount
                                SalesOrderQueryRq.ORDiscountFilters.DiscountFilter.Discount.SetValue(10.01)
                        End If
                        if (ORDiscountFiltersElementType3396 = "DiscountRangeFilter") then
                                'Set field value for FromDiscount
                                SalesOrderQueryRq.ORDiscountFilters.DiscountRangeFilter.FromDiscount.SetValue(10.01)
                                'Set field value for ToDiscount
                                SalesOrderQueryRq.ORDiscountFilters.DiscountRangeFilter.ToDiscount.SetValue(10.01)
                        End If
                        Dim ORDiscountPercentFiltersElementType3397 as String
                        ORDiscountPercentFiltersElementType3397 = "DiscountPercentFilter"
                        if (ORDiscountPercentFiltersElementType3397 = "DiscountPercentFilter") then
                                'Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORDiscountPercentFilters.DiscountPercentFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for DiscountPercent
                                SalesOrderQueryRq.ORDiscountPercentFilters.DiscountPercentFilter.DiscountPercent.SetValue(12.34)
                        End If
                        if (ORDiscountPercentFiltersElementType3397 = "DiscountPercentRangeFilter") then
                                'Set field value for FromDiscountPercent
                                SalesOrderQueryRq.ORDiscountPercentFilters.DiscountPercentRangeFilter.FromDiscountPercent.SetValue(12.34)
                                'Set field value for ToDiscountPercent
                                SalesOrderQueryRq.ORDiscountPercentFilters.DiscountPercentRangeFilter.ToDiscountPercent.SetValue(12.34)
                        End If
                        Dim ORInstructionsFiltersElementType3398 as String
                        ORInstructionsFiltersElementType3398 = "InstructionsFilter"
                        if (ORInstructionsFiltersElementType3398 = "InstructionsFilter") then
                                'Set field value for MatchStringCriterion
                                SalesOrderQueryRq.ORInstructionsFilters.InstructionsFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for Instructions
                                SalesOrderQueryRq.ORInstructionsFilters.InstructionsFilter.Instructions.SetValue("ab")
                        End If
                        if (ORInstructionsFiltersElementType3398 = "InstructionsRangeFilter") then
                                'Set field value for FromInstructions
                                SalesOrderQueryRq.ORInstructionsFilters.InstructionsRangeFilter.FromInstructions.SetValue("ab")
                                'Set field value for ToInstructions
                                SalesOrderQueryRq.ORInstructionsFilters.InstructionsRangeFilter.ToInstructions.SetValue("ab")
                        End If
                        Dim ORItemsCountFiltersElementType3399 as String
                        ORItemsCountFiltersElementType3399 = "ItemsCountFilter"
                        if (ORItemsCountFiltersElementType3399 = "ItemsCountFilter") then
                                'Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORItemsCountFilters.ItemsCountFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for ItemsCount
                                SalesOrderQueryRq.ORItemsCountFilters.ItemsCountFilter.ItemsCount.SetValue(6)
                        End If
                        if (ORItemsCountFiltersElementType3399 = "ItemsCountRangeFilter") then
                                'Set field value for FromItemsCount
                                SalesOrderQueryRq.ORItemsCountFilters.ItemsCountRangeFilter.FromItemsCount.SetValue(6)
                                'Set field value for ToItemsCount
                                SalesOrderQueryRq.ORItemsCountFilters.ItemsCountRangeFilter.ToItemsCount.SetValue(6)
                        End If
                        'Set field value for PriceLevelNumber
                        SalesOrderQueryRq.PriceLevelNumber.SetValue(ENPriceLevelNumber.pln1)
                        Dim ORPromoCodeFiltersElementType3400 as String
                        ORPromoCodeFiltersElementType3400 = "PromoCodeFilter"
                        if (ORPromoCodeFiltersElementType3400 = "PromoCodeFilter") then
                                'Set field value for MatchStringCriterion
                                SalesOrderQueryRq.ORPromoCodeFilters.PromoCodeFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for PromoCode
                                SalesOrderQueryRq.ORPromoCodeFilters.PromoCodeFilter.PromoCode.SetValue("ab")
                        End If
                        if (ORPromoCodeFiltersElementType3400 = "PromoCodeRangeFilter") then
                                'Set field value for FromPromoCode
                                SalesOrderQueryRq.ORPromoCodeFilters.PromoCodeRangeFilter.FromPromoCode.SetValue("ab")
                                'Set field value for ToPromoCode
                                SalesOrderQueryRq.ORPromoCodeFilters.PromoCodeRangeFilter.ToPromoCode.SetValue("ab")
                        End If
                        Dim ORQtyFiltersElementType3401 as String
                        ORQtyFiltersElementType3401 = "QtyFilter"
                        if (ORQtyFiltersElementType3401 = "QtyFilter") then
                                'Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORQtyFilters.QtyFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for Qty
                                SalesOrderQueryRq.ORQtyFilters.QtyFilter.Qty.SetValue(2)
                        End If
                        if (ORQtyFiltersElementType3401 = "QtyRangeFilter") then
                                'Set field value for FromQty
                                SalesOrderQueryRq.ORQtyFilters.QtyRangeFilter.FromQty.SetValue(2)
                                'Set field value for ToQty
                                SalesOrderQueryRq.ORQtyFilters.QtyRangeFilter.ToQty.SetValue(2)
                        End If
                        Dim ORSalesOrderNumberFiltersElementType3402 as String
                        ORSalesOrderNumberFiltersElementType3402 = "SalesOrderNumberFilter"
                        if (ORSalesOrderNumberFiltersElementType3402 = "SalesOrderNumberFilter") then
                                'Set field value for MatchStringCriterion
                                SalesOrderQueryRq.ORSalesOrderNumberFilters.SalesOrderNumberFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for SalesOrderNumber
                                SalesOrderQueryRq.ORSalesOrderNumberFilters.SalesOrderNumberFilter.SalesOrderNumber.SetValue("ab")
                        End If
                        if (ORSalesOrderNumberFiltersElementType3402 = "SalesOrderNumberRangeFilter") then
                                'Set field value for FromSalesOrderNumber
                                SalesOrderQueryRq.ORSalesOrderNumberFilters.SalesOrderNumberRangeFilter.FromSalesOrderNumber.SetValue("ab")
                                'Set field value for ToSalesOrderNumber
                                SalesOrderQueryRq.ORSalesOrderNumberFilters.SalesOrderNumberRangeFilter.ToSalesOrderNumber.SetValue("ab")
                        End If
                        'Set field value for SalesOrderStatusDesc
                        SalesOrderQueryRq.SalesOrderStatusDesc.SetValue("ab")
                        'Set field value for SalesOrderType
                        SalesOrderQueryRq.SalesOrderType.SetValue(ENSalesOrderType.sotSalesOrder)
                        'Set field value for StoreExchangeStatus
                        SalesOrderQueryRq.StoreExchangeStatus.SetValue(ENStoreExchangeStatus.sesModified)
                        Dim ORSubtotalFiltersElementType3403 as String
                        ORSubtotalFiltersElementType3403 = "SubtotalFilter"
                        if (ORSubtotalFiltersElementType3403 = "SubtotalFilter") then
                                'Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORSubtotalFilters.SubtotalFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for Subtotal
                                SalesOrderQueryRq.ORSubtotalFilters.SubtotalFilter.Subtotal.SetValue(10.01)
                        End If
                        if (ORSubtotalFiltersElementType3403 = "SubtotalRangeFilter") then
                                'Set field value for FromSubtotal
                                SalesOrderQueryRq.ORSubtotalFilters.SubtotalRangeFilter.FromSubtotal.SetValue(10.01)
                                'Set field value for ToSubtotal
                                SalesOrderQueryRq.ORSubtotalFilters.SubtotalRangeFilter.ToSubtotal.SetValue(10.01)
                        End If
                        Dim ORTaxAmountFiltersElementType3404 as String
                        ORTaxAmountFiltersElementType3404 = "TaxAmountFilter"
                        if (ORTaxAmountFiltersElementType3404 = "TaxAmountFilter") then
                                'Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORTaxAmountFilters.TaxAmountFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for TaxAmount
                                SalesOrderQueryRq.ORTaxAmountFilters.TaxAmountFilter.TaxAmount.SetValue(10.01)
                        End If
                        if (ORTaxAmountFiltersElementType3404 = "TaxAmountRangeFilter") then
                                'Set field value for FromTaxAmount
                                SalesOrderQueryRq.ORTaxAmountFilters.TaxAmountRangeFilter.FromTaxAmount.SetValue(10.01)
                                'Set field value for ToTaxAmount
                                SalesOrderQueryRq.ORTaxAmountFilters.TaxAmountRangeFilter.ToTaxAmount.SetValue(10.01)
                        End If
                        Dim ORTaxCategoryFiltersElementType3405 as String
                        ORTaxCategoryFiltersElementType3405 = "TaxCategoryFilter"
                        if (ORTaxCategoryFiltersElementType3405 = "TaxCategoryFilter") then
                                'Set field value for MatchStringCriterion
                                SalesOrderQueryRq.ORTaxCategoryFilters.TaxCategoryFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for TaxCategory
                                SalesOrderQueryRq.ORTaxCategoryFilters.TaxCategoryFilter.TaxCategory.SetValue("ab")
                        End If
                        if (ORTaxCategoryFiltersElementType3405 = "TaxCategoryRangeFilter") then
                                'Set field value for FromTaxCategory
                                SalesOrderQueryRq.ORTaxCategoryFilters.TaxCategoryRangeFilter.FromTaxCategory.SetValue("ab")
                                'Set field value for ToTaxCategory
                                SalesOrderQueryRq.ORTaxCategoryFilters.TaxCategoryRangeFilter.ToTaxCategory.SetValue("ab")
                        End If
                        Dim ORTaxPercentageFiltersElementType3406 as String
                        ORTaxPercentageFiltersElementType3406 = "TaxPercentageFilter"
                        if (ORTaxPercentageFiltersElementType3406 = "TaxPercentageFilter") then
                                'Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORTaxPercentageFilters.TaxPercentageFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for TaxPercentage
                                SalesOrderQueryRq.ORTaxPercentageFilters.TaxPercentageFilter.TaxPercentage.SetValue(12.34)
                        End If
                        if (ORTaxPercentageFiltersElementType3406 = "TaxPercentageRangeFilter") then
                                'Set field value for FromTaxPercentage
                                SalesOrderQueryRq.ORTaxPercentageFilters.TaxPercentageRangeFilter.FromTaxPercentage.SetValue(12.34)
                                'Set field value for ToTaxPercentage
                                SalesOrderQueryRq.ORTaxPercentageFilters.TaxPercentageRangeFilter.ToTaxPercentage.SetValue(12.34)
                        End If
                        Dim ORTotalFiltersElementType3407 as String
                        ORTotalFiltersElementType3407 = "TotalFilter"
                        if (ORTotalFiltersElementType3407 = "TotalFilter") then
                                'Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORTotalFilters.TotalFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for Total
                                SalesOrderQueryRq.ORTotalFilters.TotalFilter.Total.SetValue(10.01)
                        End If
                        if (ORTotalFiltersElementType3407 = "TotalRangeFilter") then
                                'Set field value for FromTotal
                                SalesOrderQueryRq.ORTotalFilters.TotalRangeFilter.FromTotal.SetValue(10.01)
                                'Set field value for ToTotal
                                SalesOrderQueryRq.ORTotalFilters.TotalRangeFilter.ToTotal.SetValue(10.01)
                        End If
                        Dim ORTxnDateFiltersElementType3408 as String
                        ORTxnDateFiltersElementType3408 = "TxnDateFilter"
                        if (ORTxnDateFiltersElementType3408 = "TxnDateFilter") then
                                'Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORTxnDateFilters.TxnDateFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for TxnDate
                                SalesOrderQueryRq.ORTxnDateFilters.TxnDateFilter.TxnDate.SetValue(DateTime.Parse("12/15/2007"))
                        End If
                        if (ORTxnDateFiltersElementType3408 = "TxnDateRangeFilter") then
                                'Set field value for FromTxnDate
                                SalesOrderQueryRq.ORTxnDateFilters.TxnDateRangeFilter.FromTxnDate.SetValue(DateTime.Parse("12/15/2007"))
                                'Set field value for ToTxnDate
                                SalesOrderQueryRq.ORTxnDateFilters.TxnDateRangeFilter.ToTxnDate.SetValue(DateTime.Parse("12/15/2007"))
                        End If
                        Dim ORUnfilledPercentFiltersElementType3409 as String
                        ORUnfilledPercentFiltersElementType3409 = "UnfilledPercentFilter"
                        if (ORUnfilledPercentFiltersElementType3409 = "UnfilledPercentFilter") then
                                'Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORUnfilledPercentFilters.UnfilledPercentFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for UnfilledPercent
                                SalesOrderQueryRq.ORUnfilledPercentFilters.UnfilledPercentFilter.UnfilledPercent.SetValue(12.34)
                        End If
                        if (ORUnfilledPercentFiltersElementType3409 = "UnfilledPercentRangeFilter") then
                                'Set field value for FromUnfilledPercent
                                SalesOrderQueryRq.ORUnfilledPercentFilters.UnfilledPercentRangeFilter.FromUnfilledPercent.SetValue(12.34)
                                'Set field value for ToUnfilledPercent
                                SalesOrderQueryRq.ORUnfilledPercentFilters.UnfilledPercentRangeFilter.ToUnfilledPercent.SetValue(12.34)
                        End If
                        'Set field value for IncludeRetElementList
                        'May create more than one of these if needed
                        SalesOrderQueryRq.IncludeRetElementList.Add("ab")
                End Sub




                Public Sub WalkSalesOrderQueryRs( responseMsgSet as IMsgSetResponse)
                        if (responseMsgSet is nothing) then
                                Exit Sub
                        End If

                        Dim responseList as IResponseList
                        responseList = responseMsgSet.ResponseList
                        if (responseList is nothing) then
                                Exit Sub
                        End If

                        'if we sent only one request, there is only one response, we'll walk the list for this sample
                        for j=0 to responseList.Count-1
                                Dim response as IResponse
                                response = responseList.GetAt(j)
                                'check the status code of the response, 0=ok, >0 is warning
                                if (response.StatusCode >= 0) then
                                        'the request-specific response is in the details, make sure we have some
                                        if (not response.Detail is nothing) then
                                                'make sure the response is the type we're expecting
                                                Dim responseType as ENResponseType
                                                responseType = CType(response.Type.GetValue(),ENResponseType)
                                                if (responseType = ENResponseType.rtSalesOrderQueryRs) then
                                                        'upcast to more specific type here, this is safe because we checked with response.Type check above
                                                        Dim SalesOrderRet as ISalesOrderRetList
                                                        SalesOrderRet = CType(response.Detail,ISalesOrderRetList)
                                                        for z=0 to SalesOrderRet.Count-1
                                                                WalkSalesOrderRet(SalesOrderRet.GetAt(z))
                                                        Next z
                                                End If
                                        End If
                                End If
                        Next j
                End Sub




                Public Sub WalkSalesOrderRet(SalesOrderRet as ISalesOrderRet)
                        if (SalesOrderRet is nothing) then
                                Exit Sub
                        End If

                        'Go through all the elements of ISalesOrderRetList
                        'Get value of TxnID
                        if ( not SalesOrderRet.TxnID is nothing) then
                                Dim TxnID3410 as String
                                TxnID3410 = SalesOrderRet.TxnID.GetValue()
                        End If
                        'Get value of TimeCreated
                        if ( not SalesOrderRet.TimeCreated is nothing) then
                                Dim TimeCreated3411 as DateTime
                                TimeCreated3411 = SalesOrderRet.TimeCreated.GetValue()
                        End If
                        'Get value of TimeModified
                        if ( not SalesOrderRet.TimeModified is nothing) then
                                Dim TimeModified3412 as DateTime
                                TimeModified3412 = SalesOrderRet.TimeModified.GetValue()
                        End If
                        'Get value of Associate
                        if ( not SalesOrderRet.Associate is nothing) then
                                Dim Associate3413 as String
                                Associate3413 = SalesOrderRet.Associate.GetValue()
                        End If
                        'Get value of BalanceDue
                        if ( not SalesOrderRet.BalanceDue is nothing) then
                                Dim BalanceDue3414 as Double
                                BalanceDue3414 = SalesOrderRet.BalanceDue.GetValue()
                        End If
                        'Get value of Cashier
                        if ( not SalesOrderRet.Cashier is nothing) then
                                Dim Cashier3415 as String
                                Cashier3415 = SalesOrderRet.Cashier.GetValue()
                        End If
                        'Get value of CustomerListID
                        if ( not SalesOrderRet.CustomerListID is nothing) then
                                Dim CustomerListID3416 as String
                                CustomerListID3416 = SalesOrderRet.CustomerListID.GetValue()
                        End If
                        'Get value of DepositBalance
                        if ( not SalesOrderRet.DepositBalance is nothing) then
                                Dim DepositBalance3417 as Double
                                DepositBalance3417 = SalesOrderRet.DepositBalance.GetValue()
                        End If
                        'Get value of Discount
                        if ( not SalesOrderRet.Discount is nothing) then
                                Dim Discount3418 as Double
                                Discount3418 = SalesOrderRet.Discount.GetValue()
                        End If
                        'Get value of DiscountPercent
                        if ( not SalesOrderRet.DiscountPercent is nothing) then
                                Dim DiscountPercent3419 as Single
                                DiscountPercent3419 = SalesOrderRet.DiscountPercent.GetValue()
                        End If
                        'Get value of Instructions
                        if ( not SalesOrderRet.Instructions is nothing) then
                                Dim Instructions3420 as String
                                Instructions3420 = SalesOrderRet.Instructions.GetValue()
                        End If
                        'Get value of ItemsCount
                        if ( not SalesOrderRet.ItemsCount is nothing) then
                                Dim ItemsCount3421 as Integer
                                ItemsCount3421 = SalesOrderRet.ItemsCount.GetValue()
                        End If
                        'Get value of PriceLevelNumber
                        if ( not SalesOrderRet.PriceLevelNumber is nothing) then
                                Dim PriceLevelNumber3422 as ENPriceLevelNumber
                                PriceLevelNumber3422 = SalesOrderRet.PriceLevelNumber.GetValue()
                        End If
                        'Get value of PromoCode
                        if ( not SalesOrderRet.PromoCode is nothing) then
                                Dim PromoCode3423 as String
                                PromoCode3423 = SalesOrderRet.PromoCode.GetValue()
                        End If
                        'Get value of Qty
                        if ( not SalesOrderRet.Qty is nothing) then
                                Dim Qty3424 as Double
                                Qty3424 = SalesOrderRet.Qty.GetValue()
                        End If
                        'Get value of SalesOrderNumber
                        if ( not SalesOrderRet.SalesOrderNumber is nothing) then
                                Dim SalesOrderNumber3425 as String
                                SalesOrderNumber3425 = SalesOrderRet.SalesOrderNumber.GetValue()
                        End If
                        'Get value of SalesOrderStatusDesc
                        if ( not SalesOrderRet.SalesOrderStatusDesc is nothing) then
                                Dim SalesOrderStatusDesc3426 as String
                                SalesOrderStatusDesc3426 = SalesOrderRet.SalesOrderStatusDesc.GetValue()
                        End If
                        'Get value of SalesOrderType
                        if ( not SalesOrderRet.SalesOrderType is nothing) then
                                Dim SalesOrderType3427 as ENSalesOrderType
                                SalesOrderType3427 = SalesOrderRet.SalesOrderType.GetValue()
                        End If
                        'Get value of StoreExchangeStatus
                        if ( not SalesOrderRet.StoreExchangeStatus is nothing) then
                                Dim StoreExchangeStatus3428 as ENStoreExchangeStatus
                                StoreExchangeStatus3428 = SalesOrderRet.StoreExchangeStatus.GetValue()
                        End If
                        'Get value of Subtotal
                        if ( not SalesOrderRet.Subtotal is nothing) then
                                Dim Subtotal3429 as Double
                                Subtotal3429 = SalesOrderRet.Subtotal.GetValue()
                        End If
                        'Get value of TaxAmount
                        if ( not SalesOrderRet.TaxAmount is nothing) then
                                Dim TaxAmount3430 as Double
                                TaxAmount3430 = SalesOrderRet.TaxAmount.GetValue()
                        End If
                        'Get value of TaxCategory
                        if ( not SalesOrderRet.TaxCategory is nothing) then
                                Dim TaxCategory3431 as String
                                TaxCategory3431 = SalesOrderRet.TaxCategory.GetValue()
                        End If
                        'Get value of TaxPercentage
                        if ( not SalesOrderRet.TaxPercentage is nothing) then
                                Dim TaxPercentage3432 as Single
                                TaxPercentage3432 = SalesOrderRet.TaxPercentage.GetValue()
                        End If
                        'Get value of Total
                        if ( not SalesOrderRet.Total is nothing) then
                                Dim Total3433 as Double
                                Total3433 = SalesOrderRet.Total.GetValue()
                        End If
                        'Get value of TxnDate
                        if ( not SalesOrderRet.TxnDate is nothing) then
                                Dim TxnDate3434 as DateTime
                                TxnDate3434 = SalesOrderRet.TxnDate.GetValue()
                        End If
                        'Get value of UnfilledPercent
                        if ( not SalesOrderRet.UnfilledPercent is nothing) then
                                Dim UnfilledPercent3435 as Single
                                UnfilledPercent3435 = SalesOrderRet.UnfilledPercent.GetValue()
                        End If
                        if (not SalesOrderRet.BillingInformation is nothing) then
                                'Get value of City
                                if ( not SalesOrderRet.BillingInformation.City is nothing) then
                                        Dim City3436 as String
                                        City3436 = SalesOrderRet.BillingInformation.City.GetValue()
                                End If
                                'Get value of CompanyName
                                if ( not SalesOrderRet.BillingInformation.CompanyName is nothing) then
                                        Dim CompanyName3437 as String
                                        CompanyName3437 = SalesOrderRet.BillingInformation.CompanyName.GetValue()
                                End If
                                'Get value of Country
                                if ( not SalesOrderRet.BillingInformation.Country is nothing) then
                                        Dim Country3438 as String
                                        Country3438 = SalesOrderRet.BillingInformation.Country.GetValue()
                                End If
                                'Get value of FirstName
                                if ( not SalesOrderRet.BillingInformation.FirstName is nothing) then
                                        Dim FirstName3439 as String
                                        FirstName3439 = SalesOrderRet.BillingInformation.FirstName.GetValue()
                                End If
                                'Get value of LastName
                                if ( not SalesOrderRet.BillingInformation.LastName is nothing) then
                                        Dim LastName3440 as String
                                        LastName3440 = SalesOrderRet.BillingInformation.LastName.GetValue()
                                End If
                                'Get value of Phone
                                if ( not SalesOrderRet.BillingInformation.Phone is nothing) then
                                        Dim Phone3441 as String
                                        Phone3441 = SalesOrderRet.BillingInformation.Phone.GetValue()
                                End If
                                'Get value of Phone2
                                if ( not SalesOrderRet.BillingInformation.Phone2 is nothing) then
                                        Dim Phone23442 as String
                                        Phone23442 = SalesOrderRet.BillingInformation.Phone2.GetValue()
                                End If
                                'Get value of Phone3
                                if ( not SalesOrderRet.BillingInformation.Phone3 is nothing) then
                                        Dim Phone33443 as String
                                        Phone33443 = SalesOrderRet.BillingInformation.Phone3.GetValue()
                                End If
                                'Get value of Phone4
                                if ( not SalesOrderRet.BillingInformation.Phone4 is nothing) then
                                        Dim Phone43444 as String
                                        Phone43444 = SalesOrderRet.BillingInformation.Phone4.GetValue()
                                End If
                                'Get value of PostalCode
                                if ( not SalesOrderRet.BillingInformation.PostalCode is nothing) then
                                        Dim PostalCode3445 as String
                                        PostalCode3445 = SalesOrderRet.BillingInformation.PostalCode.GetValue()
                                End If
                                'Get value of Salutation
                                if ( not SalesOrderRet.BillingInformation.Salutation is nothing) then
                                        Dim Salutation3446 as String
                                        Salutation3446 = SalesOrderRet.BillingInformation.Salutation.GetValue()
                                End If
                                'Get value of State
                                if ( not SalesOrderRet.BillingInformation.State is nothing) then
                                        Dim State3447 as String
                                        State3447 = SalesOrderRet.BillingInformation.State.GetValue()
                                End If
                                'Get value of Street
                                if ( not SalesOrderRet.BillingInformation.Street is nothing) then
                                        Dim Street3448 as String
                                        Street3448 = SalesOrderRet.BillingInformation.Street.GetValue()
                                End If
                                'Get value of Street2
                                if ( not SalesOrderRet.BillingInformation.Street2 is nothing) then
                                        Dim Street23449 as String
                                        Street23449 = SalesOrderRet.BillingInformation.Street2.GetValue()
                                End If
                                'Get value of WebNumber
                                if ( not SalesOrderRet.BillingInformation.WebNumber is nothing) then
                                        Dim WebNumber3450 as String
                                        WebNumber3450 = SalesOrderRet.BillingInformation.WebNumber.GetValue()
                                End If
                        End If
                        if (not SalesOrderRet.ShippingInformation is nothing) then
                                'Get value of AddressName
                                if ( not SalesOrderRet.ShippingInformation.AddressName is nothing) then
                                        Dim AddressName3451 as String
                                        AddressName3451 = SalesOrderRet.ShippingInformation.AddressName.GetValue()
                                End If
                                'Get value of City
                                if ( not SalesOrderRet.ShippingInformation.City is nothing) then
                                        Dim City3452 as String
                                        City3452 = SalesOrderRet.ShippingInformation.City.GetValue()
                                End If
                                'Get value of CompanyName
                                if ( not SalesOrderRet.ShippingInformation.CompanyName is nothing) then
                                        Dim CompanyName3453 as String
                                        CompanyName3453 = SalesOrderRet.ShippingInformation.CompanyName.GetValue()
                                End If
                                'Get value of Country
                                if ( not SalesOrderRet.ShippingInformation.Country is nothing) then
                                        Dim Country3454 as String
                                        Country3454 = SalesOrderRet.ShippingInformation.Country.GetValue()
                                End If
                                'Get value of FullName
                                if ( not SalesOrderRet.ShippingInformation.FullName is nothing) then
                                        Dim FullName3455 as String
                                        FullName3455 = SalesOrderRet.ShippingInformation.FullName.GetValue()
                                End If
                                'Get value of Phone
                                if ( not SalesOrderRet.ShippingInformation.Phone is nothing) then
                                        Dim Phone3456 as String
                                        Phone3456 = SalesOrderRet.ShippingInformation.Phone.GetValue()
                                End If
                                'Get value of Phone2
                                if ( not SalesOrderRet.ShippingInformation.Phone2 is nothing) then
                                        Dim Phone23457 as String
                                        Phone23457 = SalesOrderRet.ShippingInformation.Phone2.GetValue()
                                End If
                                'Get value of Phone3
                                if ( not SalesOrderRet.ShippingInformation.Phone3 is nothing) then
                                        Dim Phone33458 as String
                                        Phone33458 = SalesOrderRet.ShippingInformation.Phone3.GetValue()
                                End If
                                'Get value of Phone4
                                if ( not SalesOrderRet.ShippingInformation.Phone4 is nothing) then
                                        Dim Phone43459 as String
                                        Phone43459 = SalesOrderRet.ShippingInformation.Phone4.GetValue()
                                End If
                                'Get value of PostalCode
                                if ( not SalesOrderRet.ShippingInformation.PostalCode is nothing) then
                                        Dim PostalCode3460 as String
                                        PostalCode3460 = SalesOrderRet.ShippingInformation.PostalCode.GetValue()
                                End If
                                'Get value of ShipBy
                                if ( not SalesOrderRet.ShippingInformation.ShipBy is nothing) then
                                        Dim ShipBy3461 as String
                                        ShipBy3461 = SalesOrderRet.ShippingInformation.ShipBy.GetValue()
                                End If
                                'Get value of Shipping
                                if ( not SalesOrderRet.ShippingInformation.Shipping is nothing) then
                                        Dim Shipping3462 as Double
                                        Shipping3462 = SalesOrderRet.ShippingInformation.Shipping.GetValue()
                                End If
                                'Get value of State
                                if ( not SalesOrderRet.ShippingInformation.State is nothing) then
                                        Dim State3463 as String
                                        State3463 = SalesOrderRet.ShippingInformation.State.GetValue()
                                End If
                                'Get value of Street
                                if ( not SalesOrderRet.ShippingInformation.Street is nothing) then
                                        Dim Street3464 as String
                                        Street3464 = SalesOrderRet.ShippingInformation.Street.GetValue()
                                End If
                                'Get value of Street2
                                if ( not SalesOrderRet.ShippingInformation.Street2 is nothing) then
                                        Dim Street23465 as String
                                        Street23465 = SalesOrderRet.ShippingInformation.Street2.GetValue()
                                End If
                        End If
                        if (not SalesOrderRet.SalesOrderItemRetList is nothing)
                                Dim i3466 as Integer
                                for i3466 = 0  to SalesOrderRet.SalesOrderItemRetList.Count - 1
                                        Dim SalesOrderItemRet as ISalesOrderItemRet
                                        SalesOrderItemRet = SalesOrderRet.SalesOrderItemRetList.GetAt(i3466)
                                        'Get value of ListID
                                        if ( not SalesOrderItemRet.ListID is nothing) then
                                                Dim ListID3467 as String
                                                ListID3467 = SalesOrderItemRet.ListID.GetValue()
                                        End If
                                        'Get value of TxnLineID
                                        if ( not SalesOrderItemRet.TxnLineID is nothing) then
                                                Dim TxnLineID3468 as Integer
                                                TxnLineID3468 = SalesOrderItemRet.TxnLineID.GetValue()
                                        End If
                                        'Get value of ALU
                                        if ( not SalesOrderItemRet.ALU is nothing) then
                                                Dim ALU3469 as String
                                                ALU3469 = SalesOrderItemRet.ALU.GetValue()
                                        End If
                                        'Get value of Associate
                                        if ( not SalesOrderItemRet.Associate is nothing) then
                                                Dim Associate3470 as String
                                                Associate3470 = SalesOrderItemRet.Associate.GetValue()
                                        End If
                                        'Get value of Attribute
                                        if ( not SalesOrderItemRet.Attribute is nothing) then
                                                Dim Attribute3471 as String
                                                Attribute3471 = SalesOrderItemRet.Attribute.GetValue()
                                        End If
                                        'Get value of Commission
                                        if ( not SalesOrderItemRet.Commission is nothing) then
                                                Dim Commission3472 as Double
                                                Commission3472 = SalesOrderItemRet.Commission.GetValue()
                                        End If
                                        'Get value of Desc1
                                        if ( not SalesOrderItemRet.Desc1 is nothing) then
                                                Dim Desc13473 as String
                                                Desc13473 = SalesOrderItemRet.Desc1.GetValue()
                                        End If
                                        'Get value of Desc2
                                        if ( not SalesOrderItemRet.Desc2 is nothing) then
                                                Dim Desc23474 as String
                                                Desc23474 = SalesOrderItemRet.Desc2.GetValue()
                                        End If
                                        'Get value of Discount
                                        if ( not SalesOrderItemRet.Discount is nothing) then
                                                Dim Discount3475 as Double
                                                Discount3475 = SalesOrderItemRet.Discount.GetValue()
                                        End If
                                        'Get value of DiscountPercent
                                        if ( not SalesOrderItemRet.DiscountPercent is nothing) then
                                                Dim DiscountPercent3476 as Single
                                                DiscountPercent3476 = SalesOrderItemRet.DiscountPercent.GetValue()
                                        End If
                                        'Get value of DiscountType
                                        if ( not SalesOrderItemRet.DiscountType is nothing) then
                                                Dim DiscountType3477 as String
                                                DiscountType3477 = SalesOrderItemRet.DiscountType.GetValue()
                                        End If
                                        'Get value of DiscountSource
                                        if ( not SalesOrderItemRet.DiscountSource is nothing) then
                                                Dim DiscountSource3478 as ENDiscountSource
                                                DiscountSource3478 = SalesOrderItemRet.DiscountSource.GetValue()
                                        End If
                                        'Get value of ExtendedPrice
                                        if ( not SalesOrderItemRet.ExtendedPrice is nothing) then
                                                Dim ExtendedPrice3479 as Double
                                                ExtendedPrice3479 = SalesOrderItemRet.ExtendedPrice.GetValue()
                                        End If
                                        'Get value of ExtendedTax
                                        if ( not SalesOrderItemRet.ExtendedTax is nothing) then
                                                Dim ExtendedTax3480 as Double
                                                ExtendedTax3480 = SalesOrderItemRet.ExtendedTax.GetValue()
                                        End If
                                        'Get value of ItemNumber
                                        if ( not SalesOrderItemRet.ItemNumber is nothing) then
                                                Dim ItemNumber3481 as Integer
                                                ItemNumber3481 = SalesOrderItemRet.ItemNumber.GetValue()
                                        End If
                                        'Get value of NumberOfBaseUnits
                                        if ( not SalesOrderItemRet.NumberOfBaseUnits is nothing) then
                                                Dim NumberOfBaseUnits3482 as Double
                                                NumberOfBaseUnits3482 = SalesOrderItemRet.NumberOfBaseUnits.GetValue()
                                        End If
                                        'Get value of Price
                                        if ( not SalesOrderItemRet.Price is nothing) then
                                                Dim Price3483 as Double
                                                Price3483 = SalesOrderItemRet.Price.GetValue()
                                        End If
                                        'Get value of PriceLevelNumber
                                        if ( not SalesOrderItemRet.PriceLevelNumber is nothing) then
                                                Dim PriceLevelNumber3484 as ENPriceLevelNumber
                                                PriceLevelNumber3484 = SalesOrderItemRet.PriceLevelNumber.GetValue()
                                        End If
                                        'Get value of Qty
                                        if ( not SalesOrderItemRet.Qty is nothing) then
                                                Dim Qty3485 as Double
                                                Qty3485 = SalesOrderItemRet.Qty.GetValue()
                                        End If
                                        'Get value of QtySold
                                        if ( not SalesOrderItemRet.QtySold is nothing) then
                                                Dim QtySold3486 as Double
                                                QtySold3486 = SalesOrderItemRet.QtySold.GetValue()
                                        End If
                                        'Get value of SerialNumber
                                        if ( not SalesOrderItemRet.SerialNumber is nothing) then
                                                Dim SerialNumber3487 as String
                                                SerialNumber3487 = SalesOrderItemRet.SerialNumber.GetValue()
                                        End If
                                        'Get value of Size
                                        if ( not SalesOrderItemRet.Size is nothing) then
                                                Dim Size3488 as String
                                                Size3488 = SalesOrderItemRet.Size.GetValue()
                                        End If
                                        'Get value of TaxAmount
                                        if ( not SalesOrderItemRet.TaxAmount is nothing) then
                                                Dim TaxAmount3489 as Double
                                                TaxAmount3489 = SalesOrderItemRet.TaxAmount.GetValue()
                                        End If
                                        'Get value of TaxCode
                                        if ( not SalesOrderItemRet.TaxCode is nothing) then
                                                Dim TaxCode3490 as String
                                                TaxCode3490 = SalesOrderItemRet.TaxCode.GetValue()
                                        End If
                                        'Get value of TaxPercentage
                                        if ( not SalesOrderItemRet.TaxPercentage is nothing) then
                                                Dim TaxPercentage3491 as Single
                                                TaxPercentage3491 = SalesOrderItemRet.TaxPercentage.GetValue()
                                        End If
                                        'Get value of UnitOfMeasure
                                        if ( not SalesOrderItemRet.UnitOfMeasure is nothing) then
                                                Dim UnitOfMeasure3492 as String
                                                UnitOfMeasure3492 = SalesOrderItemRet.UnitOfMeasure.GetValue()
                                        End If
                                        'Get value of UPC
                                        if ( not SalesOrderItemRet.UPC is nothing) then
                                                Dim UPC3493 as String
                                                UPC3493 = SalesOrderItemRet.UPC.GetValue()
                                        End If
                                        'Get value of WebDesc
                                        if ( not SalesOrderItemRet.WebDesc is nothing) then
                                                Dim WebDesc3494 as String
                                                WebDesc3494 = SalesOrderItemRet.WebDesc.GetValue()
                                        End If
                                        'Get value of Manufacturer
                                        if ( not SalesOrderItemRet.Manufacturer is nothing) then
                                                Dim Manufacturer3495 as String
                                                Manufacturer3495 = SalesOrderItemRet.Manufacturer.GetValue()
                                        End If
                                        'Get value of Weight
                                        if ( not SalesOrderItemRet.Weight is nothing) then
                                                Dim Weight3496 as Single
                                                Weight3496 = SalesOrderItemRet.Weight.GetValue()
                                        End If
                                        'Get value of WebSKU
                                        if ( not SalesOrderItemRet.WebSKU is nothing) then
                                                Dim WebSKU3497 as String
                                                WebSKU3497 = SalesOrderItemRet.WebSKU.GetValue()
                                        End If
                                Next i3466
                        End If
                        if (not SalesOrderRet.DataExtRetList is nothing)
                                Dim i3498 as Integer
                                for i3498 = 0  to SalesOrderRet.DataExtRetList.Count - 1
                                        Dim DataExtRet as IDataExtRet
                                        DataExtRet = SalesOrderRet.DataExtRetList.GetAt(i3498)
                                        'Get value of OwnerID
                                        Dim OwnerID3499 as String
                                        OwnerID3499 = DataExtRet.OwnerID.GetValue()
                                        'Get value of DataExtName
                                        Dim DataExtName3500 as String
                                        DataExtName3500 = DataExtRet.DataExtName.GetValue()
                                        'Get value of DataExtType
                                        Dim DataExtType3501 as ENDataExtType
                                        DataExtType3501 = DataExtRet.DataExtType.GetValue()
                                        'Get value of DataExtValue
                                        Dim DataExtValue3502 as String
                                        DataExtValue3502 = DataExtRet.DataExtValue.GetValue()
                                Next i3498
                        End If
                End Sub




        End Class

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
//The following sample code is generated as an illustration of
//Creating requests and parsing responses ONLY
//This code is NOT intended to show best practices or ideal code
//Use at your most careful discretion

using System;
using System.Net;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using Interop.qbposfc4;

namespace com.intuit.idn.samples
{
        public class SampleSalesOrderQuery
        {
                public void  DoSalesOrderQuery()
                {
                        bool sessionBegun = false;
                        bool connectionOpen = false;
                        QBPOSSessionManager sessionManager = null;

                        try
                        {
                                //Create the session Manager object
                                sessionManager = new QBPOSSessionManager();

                                //Create the message set request object to hold our request
                                IMsgSetRequest requestMsgSet = sessionManager.CreateMsgSetRequest(4,0);
                                requestMsgSet.Attributes.OnError = ENRqOnError.roeContinue;

                                BuildSalesOrderQueryRq(requestMsgSet);

                                //Connect to QuickBooks and begin a session
                                sessionManager.OpenConnection("","Sample Code from OSR");
                                connectionOpen = true;
                                sessionManager.BeginSession("");
                                sessionBegun = true;

                                //Send the request and get the response from QuickBooks
                                IMsgSetResponse responseMsgSet = sessionManager.DoRequests(requestMsgSet);

                                //End the session and close the connection to QuickBooks
                                sessionManager.EndSession();
                                sessionBegun = false;
                                sessionManager.CloseConnection();
                                connectionOpen = false;

                                WalkSalesOrderQueryRs(responseMsgSet);
                        }
                        catch (Exception e)
                        {
                                MessageBox.Show(e.Message, "Error");
                                if (sessionBegun)
                                {
                                        sessionManager.EndSession();
                                }
                                if (connectionOpen)
                                {
                                        sessionManager.CloseConnection();
                                }
                        }
                }
                void BuildSalesOrderQueryRq(IMsgSetRequest requestMsgSet)
                {
                        ISalesOrderQuery SalesOrderQueryRq= requestMsgSet.AppendSalesOrderQueryRq();
                        //Set attributes
                        //Set field value for metaData
                        SalesOrderQueryRq.metaData.SetValue(ENmetaData.mdMetaDataAndResponseData);
                        //Set field value for iterator
                        SalesOrderQueryRq.iterator.SetValue(ENiterator.itStart);
                        //Set field value for iteratorID
                        SalesOrderQueryRq.iteratorID.SetValue("{D7355385-A17B-4f5d-B34D-F34C79C3E6FC}");
                        //Set field value for MaxReturned
                        SalesOrderQueryRq.MaxReturned.SetValue(6);
                        //Set field value for OwnerIDList
                        //May create more than one of these if needed
                        SalesOrderQueryRq.OwnerIDList.Add(Guid.NewGuid().ToString());
                        //Set field value for TxnID
                        SalesOrderQueryRq.TxnID.SetValue("200000-1011023419");
                        string ORTimeCreatedFiltersElementType3503 = "TimeCreatedFilter";
                        if (ORTimeCreatedFiltersElementType3503 == "TimeCreatedFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for TimeCreated
                                SalesOrderQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.TimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                        }
                        if (ORTimeCreatedFiltersElementType3503 == "TimeCreatedRangeFilter")
                        {
                                //Set field value for FromTimeCreated
                                SalesOrderQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.FromTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                                //Set field value for ToTimeCreated
                                SalesOrderQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.ToTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                        }
                        string ORTimeModifiedFiltersElementType3504 = "TimeModifiedFilter";
                        if (ORTimeModifiedFiltersElementType3504 == "TimeModifiedFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for TimeModified
                                SalesOrderQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.TimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                        }
                        if (ORTimeModifiedFiltersElementType3504 == "TimeModifiedRangeFilter")
                        {
                                //Set field value for FromTimeModified
                                SalesOrderQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.FromTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                                //Set field value for ToTimeModified
                                SalesOrderQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.ToTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                        }
                        string ORAssociateFiltersElementType3505 = "AssociateFilter";
                        if (ORAssociateFiltersElementType3505 == "AssociateFilter")
                        {
                                //Set field value for MatchStringCriterion
                                SalesOrderQueryRq.ORAssociateFilters.AssociateFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for Associate
                                SalesOrderQueryRq.ORAssociateFilters.AssociateFilter.Associate.SetValue("ab");
                        }
                        if (ORAssociateFiltersElementType3505 == "AssociateRangeFilter")
                        {
                                //Set field value for FromAssociate
                                SalesOrderQueryRq.ORAssociateFilters.AssociateRangeFilter.FromAssociate.SetValue("ab");
                                //Set field value for ToAssociate
                                SalesOrderQueryRq.ORAssociateFilters.AssociateRangeFilter.ToAssociate.SetValue("ab");
                        }
                        string ORBalanceDueFiltersElementType3506 = "BalanceDueFilter";
                        if (ORBalanceDueFiltersElementType3506 == "BalanceDueFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORBalanceDueFilters.BalanceDueFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for BalanceDue
                                SalesOrderQueryRq.ORBalanceDueFilters.BalanceDueFilter.BalanceDue.SetValue(10.01);
                        }
                        if (ORBalanceDueFiltersElementType3506 == "BalanceDueRangeFilter")
                        {
                                //Set field value for FromBalanceDue
                                SalesOrderQueryRq.ORBalanceDueFilters.BalanceDueRangeFilter.FromBalanceDue.SetValue(10.01);
                                //Set field value for ToBalanceDue
                                SalesOrderQueryRq.ORBalanceDueFilters.BalanceDueRangeFilter.ToBalanceDue.SetValue(10.01);
                        }
                        string ORCashierFiltersElementType3507 = "CashierFilter";
                        if (ORCashierFiltersElementType3507 == "CashierFilter")
                        {
                                //Set field value for MatchStringCriterion
                                SalesOrderQueryRq.ORCashierFilters.CashierFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for Cashier
                                SalesOrderQueryRq.ORCashierFilters.CashierFilter.Cashier.SetValue("ab");
                        }
                        if (ORCashierFiltersElementType3507 == "CashierRangeFilter")
                        {
                                //Set field value for FromCashier
                                SalesOrderQueryRq.ORCashierFilters.CashierRangeFilter.FromCashier.SetValue("ab");
                                //Set field value for ToCashier
                                SalesOrderQueryRq.ORCashierFilters.CashierRangeFilter.ToCashier.SetValue("ab");
                        }
                        //Set field value for CustomerListID
                        SalesOrderQueryRq.CustomerListID.SetValue("200000-1011023419");
                        string ORDiscountFiltersElementType3508 = "DiscountFilter";
                        if (ORDiscountFiltersElementType3508 == "DiscountFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORDiscountFilters.DiscountFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for Discount
                                SalesOrderQueryRq.ORDiscountFilters.DiscountFilter.Discount.SetValue(10.01);
                        }
                        if (ORDiscountFiltersElementType3508 == "DiscountRangeFilter")
                        {
                                //Set field value for FromDiscount
                                SalesOrderQueryRq.ORDiscountFilters.DiscountRangeFilter.FromDiscount.SetValue(10.01);
                                //Set field value for ToDiscount
                                SalesOrderQueryRq.ORDiscountFilters.DiscountRangeFilter.ToDiscount.SetValue(10.01);
                        }
                        string ORDiscountPercentFiltersElementType3509 = "DiscountPercentFilter";
                        if (ORDiscountPercentFiltersElementType3509 == "DiscountPercentFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORDiscountPercentFilters.DiscountPercentFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for DiscountPercent
                                SalesOrderQueryRq.ORDiscountPercentFilters.DiscountPercentFilter.DiscountPercent.SetValue(12.34F);
                        }
                        if (ORDiscountPercentFiltersElementType3509 == "DiscountPercentRangeFilter")
                        {
                                //Set field value for FromDiscountPercent
                                SalesOrderQueryRq.ORDiscountPercentFilters.DiscountPercentRangeFilter.FromDiscountPercent.SetValue(12.34F);
                                //Set field value for ToDiscountPercent
                                SalesOrderQueryRq.ORDiscountPercentFilters.DiscountPercentRangeFilter.ToDiscountPercent.SetValue(12.34F);
                        }
                        string ORInstructionsFiltersElementType3510 = "InstructionsFilter";
                        if (ORInstructionsFiltersElementType3510 == "InstructionsFilter")
                        {
                                //Set field value for MatchStringCriterion
                                SalesOrderQueryRq.ORInstructionsFilters.InstructionsFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for Instructions
                                SalesOrderQueryRq.ORInstructionsFilters.InstructionsFilter.Instructions.SetValue("ab");
                        }
                        if (ORInstructionsFiltersElementType3510 == "InstructionsRangeFilter")
                        {
                                //Set field value for FromInstructions
                                SalesOrderQueryRq.ORInstructionsFilters.InstructionsRangeFilter.FromInstructions.SetValue("ab");
                                //Set field value for ToInstructions
                                SalesOrderQueryRq.ORInstructionsFilters.InstructionsRangeFilter.ToInstructions.SetValue("ab");
                        }
                        string ORItemsCountFiltersElementType3511 = "ItemsCountFilter";
                        if (ORItemsCountFiltersElementType3511 == "ItemsCountFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORItemsCountFilters.ItemsCountFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for ItemsCount
                                SalesOrderQueryRq.ORItemsCountFilters.ItemsCountFilter.ItemsCount.SetValue(6);
                        }
                        if (ORItemsCountFiltersElementType3511 == "ItemsCountRangeFilter")
                        {
                                //Set field value for FromItemsCount
                                SalesOrderQueryRq.ORItemsCountFilters.ItemsCountRangeFilter.FromItemsCount.SetValue(6);
                                //Set field value for ToItemsCount
                                SalesOrderQueryRq.ORItemsCountFilters.ItemsCountRangeFilter.ToItemsCount.SetValue(6);
                        }
                        //Set field value for PriceLevelNumber
                        SalesOrderQueryRq.PriceLevelNumber.SetValue(ENPriceLevelNumber.pln1);
                        string ORPromoCodeFiltersElementType3512 = "PromoCodeFilter";
                        if (ORPromoCodeFiltersElementType3512 == "PromoCodeFilter")
                        {
                                //Set field value for MatchStringCriterion
                                SalesOrderQueryRq.ORPromoCodeFilters.PromoCodeFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for PromoCode
                                SalesOrderQueryRq.ORPromoCodeFilters.PromoCodeFilter.PromoCode.SetValue("ab");
                        }
                        if (ORPromoCodeFiltersElementType3512 == "PromoCodeRangeFilter")
                        {
                                //Set field value for FromPromoCode
                                SalesOrderQueryRq.ORPromoCodeFilters.PromoCodeRangeFilter.FromPromoCode.SetValue("ab");
                                //Set field value for ToPromoCode
                                SalesOrderQueryRq.ORPromoCodeFilters.PromoCodeRangeFilter.ToPromoCode.SetValue("ab");
                        }
                        string ORQtyFiltersElementType3513 = "QtyFilter";
                        if (ORQtyFiltersElementType3513 == "QtyFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORQtyFilters.QtyFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for Qty
                                SalesOrderQueryRq.ORQtyFilters.QtyFilter.Qty.SetValue(2);
                        }
                        if (ORQtyFiltersElementType3513 == "QtyRangeFilter")
                        {
                                //Set field value for FromQty
                                SalesOrderQueryRq.ORQtyFilters.QtyRangeFilter.FromQty.SetValue(2);
                                //Set field value for ToQty
                                SalesOrderQueryRq.ORQtyFilters.QtyRangeFilter.ToQty.SetValue(2);
                        }
                        string ORSalesOrderNumberFiltersElementType3514 = "SalesOrderNumberFilter";
                        if (ORSalesOrderNumberFiltersElementType3514 == "SalesOrderNumberFilter")
                        {
                                //Set field value for MatchStringCriterion
                                SalesOrderQueryRq.ORSalesOrderNumberFilters.SalesOrderNumberFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for SalesOrderNumber
                                SalesOrderQueryRq.ORSalesOrderNumberFilters.SalesOrderNumberFilter.SalesOrderNumber.SetValue("ab");
                        }
                        if (ORSalesOrderNumberFiltersElementType3514 == "SalesOrderNumberRangeFilter")
                        {
                                //Set field value for FromSalesOrderNumber
                                SalesOrderQueryRq.ORSalesOrderNumberFilters.SalesOrderNumberRangeFilter.FromSalesOrderNumber.SetValue("ab");
                                //Set field value for ToSalesOrderNumber
                                SalesOrderQueryRq.ORSalesOrderNumberFilters.SalesOrderNumberRangeFilter.ToSalesOrderNumber.SetValue("ab");
                        }
                        //Set field value for SalesOrderStatusDesc
                        SalesOrderQueryRq.SalesOrderStatusDesc.SetValue("ab");
                        //Set field value for SalesOrderType
                        SalesOrderQueryRq.SalesOrderType.SetValue(ENSalesOrderType.sotSalesOrder);
                        //Set field value for StoreExchangeStatus
                        SalesOrderQueryRq.StoreExchangeStatus.SetValue(ENStoreExchangeStatus.sesModified);
                        string ORSubtotalFiltersElementType3515 = "SubtotalFilter";
                        if (ORSubtotalFiltersElementType3515 == "SubtotalFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORSubtotalFilters.SubtotalFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for Subtotal
                                SalesOrderQueryRq.ORSubtotalFilters.SubtotalFilter.Subtotal.SetValue(10.01);
                        }
                        if (ORSubtotalFiltersElementType3515 == "SubtotalRangeFilter")
                        {
                                //Set field value for FromSubtotal
                                SalesOrderQueryRq.ORSubtotalFilters.SubtotalRangeFilter.FromSubtotal.SetValue(10.01);
                                //Set field value for ToSubtotal
                                SalesOrderQueryRq.ORSubtotalFilters.SubtotalRangeFilter.ToSubtotal.SetValue(10.01);
                        }
                        string ORTaxAmountFiltersElementType3516 = "TaxAmountFilter";
                        if (ORTaxAmountFiltersElementType3516 == "TaxAmountFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORTaxAmountFilters.TaxAmountFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for TaxAmount
                                SalesOrderQueryRq.ORTaxAmountFilters.TaxAmountFilter.TaxAmount.SetValue(10.01);
                        }
                        if (ORTaxAmountFiltersElementType3516 == "TaxAmountRangeFilter")
                        {
                                //Set field value for FromTaxAmount
                                SalesOrderQueryRq.ORTaxAmountFilters.TaxAmountRangeFilter.FromTaxAmount.SetValue(10.01);
                                //Set field value for ToTaxAmount
                                SalesOrderQueryRq.ORTaxAmountFilters.TaxAmountRangeFilter.ToTaxAmount.SetValue(10.01);
                        }
                        string ORTaxCategoryFiltersElementType3517 = "TaxCategoryFilter";
                        if (ORTaxCategoryFiltersElementType3517 == "TaxCategoryFilter")
                        {
                                //Set field value for MatchStringCriterion
                                SalesOrderQueryRq.ORTaxCategoryFilters.TaxCategoryFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for TaxCategory
                                SalesOrderQueryRq.ORTaxCategoryFilters.TaxCategoryFilter.TaxCategory.SetValue("ab");
                        }
                        if (ORTaxCategoryFiltersElementType3517 == "TaxCategoryRangeFilter")
                        {
                                //Set field value for FromTaxCategory
                                SalesOrderQueryRq.ORTaxCategoryFilters.TaxCategoryRangeFilter.FromTaxCategory.SetValue("ab");
                                //Set field value for ToTaxCategory
                                SalesOrderQueryRq.ORTaxCategoryFilters.TaxCategoryRangeFilter.ToTaxCategory.SetValue("ab");
                        }
                        string ORTaxPercentageFiltersElementType3518 = "TaxPercentageFilter";
                        if (ORTaxPercentageFiltersElementType3518 == "TaxPercentageFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORTaxPercentageFilters.TaxPercentageFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for TaxPercentage
                                SalesOrderQueryRq.ORTaxPercentageFilters.TaxPercentageFilter.TaxPercentage.SetValue(12.34F);
                        }
                        if (ORTaxPercentageFiltersElementType3518 == "TaxPercentageRangeFilter")
                        {
                                //Set field value for FromTaxPercentage
                                SalesOrderQueryRq.ORTaxPercentageFilters.TaxPercentageRangeFilter.FromTaxPercentage.SetValue(12.34F);
                                //Set field value for ToTaxPercentage
                                SalesOrderQueryRq.ORTaxPercentageFilters.TaxPercentageRangeFilter.ToTaxPercentage.SetValue(12.34F);
                        }
                        string ORTotalFiltersElementType3519 = "TotalFilter";
                        if (ORTotalFiltersElementType3519 == "TotalFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORTotalFilters.TotalFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for Total
                                SalesOrderQueryRq.ORTotalFilters.TotalFilter.Total.SetValue(10.01);
                        }
                        if (ORTotalFiltersElementType3519 == "TotalRangeFilter")
                        {
                                //Set field value for FromTotal
                                SalesOrderQueryRq.ORTotalFilters.TotalRangeFilter.FromTotal.SetValue(10.01);
                                //Set field value for ToTotal
                                SalesOrderQueryRq.ORTotalFilters.TotalRangeFilter.ToTotal.SetValue(10.01);
                        }
                        string ORTxnDateFiltersElementType3520 = "TxnDateFilter";
                        if (ORTxnDateFiltersElementType3520 == "TxnDateFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORTxnDateFilters.TxnDateFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for TxnDate
                                SalesOrderQueryRq.ORTxnDateFilters.TxnDateFilter.TxnDate.SetValue(DateTime.Parse("12/15/2007"));
                        }
                        if (ORTxnDateFiltersElementType3520 == "TxnDateRangeFilter")
                        {
                                //Set field value for FromTxnDate
                                SalesOrderQueryRq.ORTxnDateFilters.TxnDateRangeFilter.FromTxnDate.SetValue(DateTime.Parse("12/15/2007"));
                                //Set field value for ToTxnDate
                                SalesOrderQueryRq.ORTxnDateFilters.TxnDateRangeFilter.ToTxnDate.SetValue(DateTime.Parse("12/15/2007"));
                        }
                        string ORUnfilledPercentFiltersElementType3521 = "UnfilledPercentFilter";
                        if (ORUnfilledPercentFiltersElementType3521 == "UnfilledPercentFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                SalesOrderQueryRq.ORUnfilledPercentFilters.UnfilledPercentFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for UnfilledPercent
                                SalesOrderQueryRq.ORUnfilledPercentFilters.UnfilledPercentFilter.UnfilledPercent.SetValue(12.34F);
                        }
                        if (ORUnfilledPercentFiltersElementType3521 == "UnfilledPercentRangeFilter")
                        {
                                //Set field value for FromUnfilledPercent
                                SalesOrderQueryRq.ORUnfilledPercentFilters.UnfilledPercentRangeFilter.FromUnfilledPercent.SetValue(12.34F);
                                //Set field value for ToUnfilledPercent
                                SalesOrderQueryRq.ORUnfilledPercentFilters.UnfilledPercentRangeFilter.ToUnfilledPercent.SetValue(12.34F);
                        }
                        //Set field value for IncludeRetElementList
                        //May create more than one of these if needed
                        SalesOrderQueryRq.IncludeRetElementList.Add("ab");
                }




                void WalkSalesOrderQueryRs(IMsgSetResponse responseMsgSet)
                {
                        if (responseMsgSet == null) return;
                        IResponseList responseList = responseMsgSet.ResponseList;
                        if (responseList == null) return;
                        //if we sent only one request, there is only one response, we'll walk the list for this sample
                        for(int i=0; i < responseList.Count; i++)
                        {
                                IResponse response = responseList.GetAt(i);
                                //check the status code of the response, 0=ok, >0 is warning
                                if (response.StatusCode >= 0)
                                {
                                        //the request-specific response is in the details, make sure we have some
                                        if (response.Detail != null)
                                        {
                                                //make sure the response is the type we're expecting
                                                ENResponseType responseType = (ENResponseType)response.Type.GetValue();
                                                if (responseType == ENResponseType.rtSalesOrderQueryRs)
                                                {
                                                        //upcast to more specific type here, this is safe because we checked with response.Type check above
                                                        ISalesOrderRetList SalesOrderRet = (ISalesOrderRetList)response.Detail;
                                                        for(int z=0; z < SalesOrderRet.Count; z++)
                                                        {
                                                                WalkSalesOrderRet(SalesOrderRet.GetAt(z));
                                                        }
                                                }
                                        }
                                }
                        }
                }




                void WalkSalesOrderRet(ISalesOrderRet SalesOrderRet)
                {
                        if (SalesOrderRet == null) return;
                        //Go through all the elements of ISalesOrderRetList
                        //Get value of TxnID
                        if (SalesOrderRet.TxnID != null)
                        {
                                string TxnID3522 = (string)SalesOrderRet.TxnID.GetValue();
                        }
                        //Get value of TimeCreated
                        if (SalesOrderRet.TimeCreated != null)
                        {
                                DateTime TimeCreated3523 = (DateTime)SalesOrderRet.TimeCreated.GetValue();
                        }
                        //Get value of TimeModified
                        if (SalesOrderRet.TimeModified != null)
                        {
                                DateTime TimeModified3524 = (DateTime)SalesOrderRet.TimeModified.GetValue();
                        }
                        //Get value of Associate
                        if (SalesOrderRet.Associate != null)
                        {
                                string Associate3525 = (string)SalesOrderRet.Associate.GetValue();
                        }
                        //Get value of BalanceDue
                        if (SalesOrderRet.BalanceDue != null)
                        {
                                double BalanceDue3526 = (double)SalesOrderRet.BalanceDue.GetValue();
                        }
                        //Get value of Cashier
                        if (SalesOrderRet.Cashier != null)
                        {
                                string Cashier3527 = (string)SalesOrderRet.Cashier.GetValue();
                        }
                        //Get value of CustomerListID
                        if (SalesOrderRet.CustomerListID != null)
                        {
                                string CustomerListID3528 = (string)SalesOrderRet.CustomerListID.GetValue();
                        }
                        //Get value of DepositBalance
                        if (SalesOrderRet.DepositBalance != null)
                        {
                                double DepositBalance3529 = (double)SalesOrderRet.DepositBalance.GetValue();
                        }
                        //Get value of Discount
                        if (SalesOrderRet.Discount != null)
                        {
                                double Discount3530 = (double)SalesOrderRet.Discount.GetValue();
                        }
                        //Get value of DiscountPercent
                        if (SalesOrderRet.DiscountPercent != null)
                        {
                                float DiscountPercent3531 = (float)SalesOrderRet.DiscountPercent.GetValue();
                        }
                        //Get value of Instructions
                        if (SalesOrderRet.Instructions != null)
                        {
                                string Instructions3532 = (string)SalesOrderRet.Instructions.GetValue();
                        }
                        //Get value of ItemsCount
                        if (SalesOrderRet.ItemsCount != null)
                        {
                                int ItemsCount3533 = (int)SalesOrderRet.ItemsCount.GetValue();
                        }
                        //Get value of PriceLevelNumber
                        if (SalesOrderRet.PriceLevelNumber != null)
                        {
                                ENPriceLevelNumber PriceLevelNumber3534 = (ENPriceLevelNumber)SalesOrderRet.PriceLevelNumber.GetValue();
                        }
                        //Get value of PromoCode
                        if (SalesOrderRet.PromoCode != null)
                        {
                                string PromoCode3535 = (string)SalesOrderRet.PromoCode.GetValue();
                        }
                        //Get value of Qty
                        if (SalesOrderRet.Qty != null)
                        {
                                int Qty3536 = (int)SalesOrderRet.Qty.GetValue();
                        }
                        //Get value of SalesOrderNumber
                        if (SalesOrderRet.SalesOrderNumber != null)
                        {
                                string SalesOrderNumber3537 = (string)SalesOrderRet.SalesOrderNumber.GetValue();
                        }
                        //Get value of SalesOrderStatusDesc
                        if (SalesOrderRet.SalesOrderStatusDesc != null)
                        {
                                string SalesOrderStatusDesc3538 = (string)SalesOrderRet.SalesOrderStatusDesc.GetValue();
                        }
                        //Get value of SalesOrderType
                        if (SalesOrderRet.SalesOrderType != null)
                        {
                                ENSalesOrderType SalesOrderType3539 = (ENSalesOrderType)SalesOrderRet.SalesOrderType.GetValue();
                        }
                        //Get value of StoreExchangeStatus
                        if (SalesOrderRet.StoreExchangeStatus != null)
                        {
                                ENStoreExchangeStatus StoreExchangeStatus3540 = (ENStoreExchangeStatus)SalesOrderRet.StoreExchangeStatus.GetValue();
                        }
                        //Get value of Subtotal
                        if (SalesOrderRet.Subtotal != null)
                        {
                                double Subtotal3541 = (double)SalesOrderRet.Subtotal.GetValue();
                        }
                        //Get value of TaxAmount
                        if (SalesOrderRet.TaxAmount != null)
                        {
                                double TaxAmount3542 = (double)SalesOrderRet.TaxAmount.GetValue();
                        }
                        //Get value of TaxCategory
                        if (SalesOrderRet.TaxCategory != null)
                        {
                                string TaxCategory3543 = (string)SalesOrderRet.TaxCategory.GetValue();
                        }
                        //Get value of TaxPercentage
                        if (SalesOrderRet.TaxPercentage != null)
                        {
                                float TaxPercentage3544 = (float)SalesOrderRet.TaxPercentage.GetValue();
                        }
                        //Get value of Total
                        if (SalesOrderRet.Total != null)
                        {
                                double Total3545 = (double)SalesOrderRet.Total.GetValue();
                        }
                        //Get value of TxnDate
                        if (SalesOrderRet.TxnDate != null)
                        {
                                DateTime TxnDate3546 = (DateTime)SalesOrderRet.TxnDate.GetValue();
                        }
                        //Get value of UnfilledPercent
                        if (SalesOrderRet.UnfilledPercent != null)
                        {
                                float UnfilledPercent3547 = (float)SalesOrderRet.UnfilledPercent.GetValue();
                        }
                        if (SalesOrderRet.BillingInformation != null)
                        {
                                //Get value of City
                                if (SalesOrderRet.BillingInformation.City != null)
                                {
                                        string City3548 = (string)SalesOrderRet.BillingInformation.City.GetValue();
                                }
                                //Get value of CompanyName
                                if (SalesOrderRet.BillingInformation.CompanyName != null)
                                {
                                        string CompanyName3549 = (string)SalesOrderRet.BillingInformation.CompanyName.GetValue();
                                }
                                //Get value of Country
                                if (SalesOrderRet.BillingInformation.Country != null)
                                {
                                        string Country3550 = (string)SalesOrderRet.BillingInformation.Country.GetValue();
                                }
                                //Get value of FirstName
                                if (SalesOrderRet.BillingInformation.FirstName != null)
                                {
                                        string FirstName3551 = (string)SalesOrderRet.BillingInformation.FirstName.GetValue();
                                }
                                //Get value of LastName
                                if (SalesOrderRet.BillingInformation.LastName != null)
                                {
                                        string LastName3552 = (string)SalesOrderRet.BillingInformation.LastName.GetValue();
                                }
                                //Get value of Phone
                                if (SalesOrderRet.BillingInformation.Phone != null)
                                {
                                        string Phone3553 = (string)SalesOrderRet.BillingInformation.Phone.GetValue();
                                }
                                //Get value of Phone2
                                if (SalesOrderRet.BillingInformation.Phone2 != null)
                                {
                                        string Phone23554 = (string)SalesOrderRet.BillingInformation.Phone2.GetValue();
                                }
                                //Get value of Phone3
                                if (SalesOrderRet.BillingInformation.Phone3 != null)
                                {
                                        string Phone33555 = (string)SalesOrderRet.BillingInformation.Phone3.GetValue();
                                }
                                //Get value of Phone4
                                if (SalesOrderRet.BillingInformation.Phone4 != null)
                                {
                                        string Phone43556 = (string)SalesOrderRet.BillingInformation.Phone4.GetValue();
                                }
                                //Get value of PostalCode
                                if (SalesOrderRet.BillingInformation.PostalCode != null)
                                {
                                        string PostalCode3557 = (string)SalesOrderRet.BillingInformation.PostalCode.GetValue();
                                }
                                //Get value of Salutation
                                if (SalesOrderRet.BillingInformation.Salutation != null)
                                {
                                        string Salutation3558 = (string)SalesOrderRet.BillingInformation.Salutation.GetValue();
                                }
                                //Get value of State
                                if (SalesOrderRet.BillingInformation.State != null)
                                {
                                        string State3559 = (string)SalesOrderRet.BillingInformation.State.GetValue();
                                }
                                //Get value of Street
                                if (SalesOrderRet.BillingInformation.Street != null)
                                {
                                        string Street3560 = (string)SalesOrderRet.BillingInformation.Street.GetValue();
                                }
                                //Get value of Street2
                                if (SalesOrderRet.BillingInformation.Street2 != null)
                                {
                                        string Street23561 = (string)SalesOrderRet.BillingInformation.Street2.GetValue();
                                }
                                //Get value of WebNumber
                                if (SalesOrderRet.BillingInformation.WebNumber != null)
                                {
                                        string WebNumber3562 = (string)SalesOrderRet.BillingInformation.WebNumber.GetValue();
                                }
                        }
                        if (SalesOrderRet.ShippingInformation != null)
                        {
                                //Get value of AddressName
                                if (SalesOrderRet.ShippingInformation.AddressName != null)
                                {
                                        string AddressName3563 = (string)SalesOrderRet.ShippingInformation.AddressName.GetValue();
                                }
                                //Get value of City
                                if (SalesOrderRet.ShippingInformation.City != null)
                                {
                                        string City3564 = (string)SalesOrderRet.ShippingInformation.City.GetValue();
                                }
                                //Get value of CompanyName
                                if (SalesOrderRet.ShippingInformation.CompanyName != null)
                                {
                                        string CompanyName3565 = (string)SalesOrderRet.ShippingInformation.CompanyName.GetValue();
                                }
                                //Get value of Country
                                if (SalesOrderRet.ShippingInformation.Country != null)
                                {
                                        string Country3566 = (string)SalesOrderRet.ShippingInformation.Country.GetValue();
                                }
                                //Get value of FullName
                                if (SalesOrderRet.ShippingInformation.FullName != null)
                                {
                                        string FullName3567 = (string)SalesOrderRet.ShippingInformation.FullName.GetValue();
                                }
                                //Get value of Phone
                                if (SalesOrderRet.ShippingInformation.Phone != null)
                                {
                                        string Phone3568 = (string)SalesOrderRet.ShippingInformation.Phone.GetValue();
                                }
                                //Get value of Phone2
                                if (SalesOrderRet.ShippingInformation.Phone2 != null)
                                {
                                        string Phone23569 = (string)SalesOrderRet.ShippingInformation.Phone2.GetValue();
                                }
                                //Get value of Phone3
                                if (SalesOrderRet.ShippingInformation.Phone3 != null)
                                {
                                        string Phone33570 = (string)SalesOrderRet.ShippingInformation.Phone3.GetValue();
                                }
                                //Get value of Phone4
                                if (SalesOrderRet.ShippingInformation.Phone4 != null)
                                {
                                        string Phone43571 = (string)SalesOrderRet.ShippingInformation.Phone4.GetValue();
                                }
                                //Get value of PostalCode
                                if (SalesOrderRet.ShippingInformation.PostalCode != null)
                                {
                                        string PostalCode3572 = (string)SalesOrderRet.ShippingInformation.PostalCode.GetValue();
                                }
                                //Get value of ShipBy
                                if (SalesOrderRet.ShippingInformation.ShipBy != null)
                                {
                                        string ShipBy3573 = (string)SalesOrderRet.ShippingInformation.ShipBy.GetValue();
                                }
                                //Get value of Shipping
                                if (SalesOrderRet.ShippingInformation.Shipping != null)
                                {
                                        double Shipping3574 = (double)SalesOrderRet.ShippingInformation.Shipping.GetValue();
                                }
                                //Get value of State
                                if (SalesOrderRet.ShippingInformation.State != null)
                                {
                                        string State3575 = (string)SalesOrderRet.ShippingInformation.State.GetValue();
                                }
                                //Get value of Street
                                if (SalesOrderRet.ShippingInformation.Street != null)
                                {
                                        string Street3576 = (string)SalesOrderRet.ShippingInformation.Street.GetValue();
                                }
                                //Get value of Street2
                                if (SalesOrderRet.ShippingInformation.Street2 != null)
                                {
                                        string Street23577 = (string)SalesOrderRet.ShippingInformation.Street2.GetValue();
                                }
                        }
                        if (SalesOrderRet.SalesOrderItemRetList != null)
                        {
                                for (int i3578 = 0; i3578 < SalesOrderRet.SalesOrderItemRetList.Count; i3578++)
                                {
                                        ISalesOrderItemRet SalesOrderItemRet = SalesOrderRet.SalesOrderItemRetList.GetAt(i3578);
                                        //Get value of ListID
                                        if (SalesOrderItemRet.ListID != null)
                                        {
                                                string ListID3579 = (string)SalesOrderItemRet.ListID.GetValue();
                                        }
                                        //Get value of TxnLineID
                                        if (SalesOrderItemRet.TxnLineID != null)
                                        {
                                                int TxnLineID3580 = (int)SalesOrderItemRet.TxnLineID.GetValue();
                                        }
                                        //Get value of ALU
                                        if (SalesOrderItemRet.ALU != null)
                                        {
                                                string ALU3581 = (string)SalesOrderItemRet.ALU.GetValue();
                                        }
                                        //Get value of Associate
                                        if (SalesOrderItemRet.Associate != null)
                                        {
                                                string Associate3582 = (string)SalesOrderItemRet.Associate.GetValue();
                                        }
                                        //Get value of Attribute
                                        if (SalesOrderItemRet.Attribute != null)
                                        {
                                                string Attribute3583 = (string)SalesOrderItemRet.Attribute.GetValue();
                                        }
                                        //Get value of Commission
                                        if (SalesOrderItemRet.Commission != null)
                                        {
                                                double Commission3584 = (double)SalesOrderItemRet.Commission.GetValue();
                                        }
                                        //Get value of Desc1
                                        if (SalesOrderItemRet.Desc1 != null)
                                        {
                                                string Desc13585 = (string)SalesOrderItemRet.Desc1.GetValue();
                                        }
                                        //Get value of Desc2
                                        if (SalesOrderItemRet.Desc2 != null)
                                        {
                                                string Desc23586 = (string)SalesOrderItemRet.Desc2.GetValue();
                                        }
                                        //Get value of Discount
                                        if (SalesOrderItemRet.Discount != null)
                                        {
                                                double Discount3587 = (double)SalesOrderItemRet.Discount.GetValue();
                                        }
                                        //Get value of DiscountPercent
                                        if (SalesOrderItemRet.DiscountPercent != null)
                                        {
                                                float DiscountPercent3588 = (float)SalesOrderItemRet.DiscountPercent.GetValue();
                                        }
                                        //Get value of DiscountType
                                        if (SalesOrderItemRet.DiscountType != null)
                                        {
                                                string DiscountType3589 = (string)SalesOrderItemRet.DiscountType.GetValue();
                                        }
                                        //Get value of DiscountSource
                                        if (SalesOrderItemRet.DiscountSource != null)
                                        {
                                                ENDiscountSource DiscountSource3590 = (ENDiscountSource)SalesOrderItemRet.DiscountSource.GetValue();
                                        }
                                        //Get value of ExtendedPrice
                                        if (SalesOrderItemRet.ExtendedPrice != null)
                                        {
                                                double ExtendedPrice3591 = (double)SalesOrderItemRet.ExtendedPrice.GetValue();
                                        }
                                        //Get value of ExtendedTax
                                        if (SalesOrderItemRet.ExtendedTax != null)
                                        {
                                                double ExtendedTax3592 = (double)SalesOrderItemRet.ExtendedTax.GetValue();
                                        }
                                        //Get value of ItemNumber
                                        if (SalesOrderItemRet.ItemNumber != null)
                                        {
                                                int ItemNumber3593 = (int)SalesOrderItemRet.ItemNumber.GetValue();
                                        }
                                        //Get value of NumberOfBaseUnits
                                        if (SalesOrderItemRet.NumberOfBaseUnits != null)
                                        {
                                                int NumberOfBaseUnits3594 = (int)SalesOrderItemRet.NumberOfBaseUnits.GetValue();
                                        }
                                        //Get value of Price
                                        if (SalesOrderItemRet.Price != null)
                                        {
                                                double Price3595 = (double)SalesOrderItemRet.Price.GetValue();
                                        }
                                        //Get value of PriceLevelNumber
                                        if (SalesOrderItemRet.PriceLevelNumber != null)
                                        {
                                                ENPriceLevelNumber PriceLevelNumber3596 = (ENPriceLevelNumber)SalesOrderItemRet.PriceLevelNumber.GetValue();
                                        }
                                        //Get value of Qty
                                        if (SalesOrderItemRet.Qty != null)
                                        {
                                                int Qty3597 = (int)SalesOrderItemRet.Qty.GetValue();
                                        }
                                        //Get value of QtySold
                                        if (SalesOrderItemRet.QtySold != null)
                                        {
                                                int QtySold3598 = (int)SalesOrderItemRet.QtySold.GetValue();
                                        }
                                        //Get value of SerialNumber
                                        if (SalesOrderItemRet.SerialNumber != null)
                                        {
                                                string SerialNumber3599 = (string)SalesOrderItemRet.SerialNumber.GetValue();
                                        }
                                        //Get value of Size
                                        if (SalesOrderItemRet.Size != null)
                                        {
                                                string Size3600 = (string)SalesOrderItemRet.Size.GetValue();
                                        }
                                        //Get value of TaxAmount
                                        if (SalesOrderItemRet.TaxAmount != null)
                                        {
                                                double TaxAmount3601 = (double)SalesOrderItemRet.TaxAmount.GetValue();
                                        }
                                        //Get value of TaxCode
                                        if (SalesOrderItemRet.TaxCode != null)
                                        {
                                                string TaxCode3602 = (string)SalesOrderItemRet.TaxCode.GetValue();
                                        }
                                        //Get value of TaxPercentage
                                        if (SalesOrderItemRet.TaxPercentage != null)
                                        {
                                                float TaxPercentage3603 = (float)SalesOrderItemRet.TaxPercentage.GetValue();
                                        }
                                        //Get value of UnitOfMeasure
                                        if (SalesOrderItemRet.UnitOfMeasure != null)
                                        {
                                                string UnitOfMeasure3604 = (string)SalesOrderItemRet.UnitOfMeasure.GetValue();
                                        }
                                        //Get value of UPC
                                        if (SalesOrderItemRet.UPC != null)
                                        {
                                                string UPC3605 = (string)SalesOrderItemRet.UPC.GetValue();
                                        }
                                        //Get value of WebDesc
                                        if (SalesOrderItemRet.WebDesc != null)
                                        {
                                                string WebDesc3606 = (string)SalesOrderItemRet.WebDesc.GetValue();
                                        }
                                        //Get value of Manufacturer
                                        if (SalesOrderItemRet.Manufacturer != null)
                                        {
                                                string Manufacturer3607 = (string)SalesOrderItemRet.Manufacturer.GetValue();
                                        }
                                        //Get value of Weight
                                        if (SalesOrderItemRet.Weight != null)
                                        {
                                                float Weight3608 = (float)SalesOrderItemRet.Weight.GetValue();
                                        }
                                        //Get value of WebSKU
                                        if (SalesOrderItemRet.WebSKU != null)
                                        {
                                                string WebSKU3609 = (string)SalesOrderItemRet.WebSKU.GetValue();
                                        }
                                }
                        }
                        if (SalesOrderRet.DataExtRetList != null)
                        {
                                for (int i3610 = 0; i3610 < SalesOrderRet.DataExtRetList.Count; i3610++)
                                {
                                        IDataExtRet DataExtRet = SalesOrderRet.DataExtRetList.GetAt(i3610);
                                        //Get value of OwnerID
                                        string OwnerID3611 = (string)DataExtRet.OwnerID.GetValue();
                                        //Get value of DataExtName
                                        string DataExtName3612 = (string)DataExtRet.DataExtName.GetValue();
                                        //Get value of DataExtType
                                        ENDataExtType DataExtType3613 = (ENDataExtType)DataExtRet.DataExtType.GetValue();
                                        //Get value of DataExtValue
                                        string DataExtValue3614 = (string)DataExtRet.DataExtValue.GetValue();
                                }
                        }
                }




        }
}