CustomerQuery

Retrieves the specified customer record(s) from the database.


Request

Response

XMLOPS

VB.NET

C#

Tag Type Max length Implementation Required

ICustomerQuery

Retrieves the specified customer record(s) from the database.
       

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      

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      

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

ORAccountBalanceFilters

IORAccountBalanceFilters      

AccountBalanceFilter

Filters customers by their account balance. Available if the QBPOS company is being used with QuickBooks.
IAccountBalanceFilter      

MatchNumericCriterion

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

AccountBalance

AccountBalance and AccountLimit are available only when QBPOS is being used with QuickBooks and only if the UseWithQB element in the original request was set to “true.” Account balances and account limits for customers are not kept in QBPOS.
IQBAmountType     Y

AccountBalanceRangeFilter

Filters customers by a range of account balances. Available if the QBPOS company is being used with QuickBooks.
IAccountBalanceRangeFilter      

FromAccountBalance

Start of the account balance range.
IQBAmountType     Y

ToAccountBalance

End of the account balance range.
IQBAmountType     Y

ORAccountLimitFilters

IORAccountLimitFilters      

AccountLimitFilter

Filters customers by their account limit. Available if the QBPOS company is being used with QuickBooks.
IAccountLimitFilter      

MatchNumericCriterion

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

AccountLimit

AccountBalance and AccountLimit are available only when QBPOS is being used with QuickBooks and only if the UseWithQB element in the original request was set to “true.” Account balances and account limits for customers are not kept in QBPOS.
IQBAmountType     Y

AccountLimitRangeFilter

Filters customers by a range of account limits. Available if the QBPOS company is being used with QuickBooks.
IAccountLimitRangeFilter      

FromAccountLimit

Start of the account limit range.
IQBAmountType     Y

ToAccountLimit

Start of the account limit range.
IQBAmountType     Y

ORAmountPastDueFilters

IORAmountPastDueFilters   2.5  

AmountPastDueFilter

Filters customers by the amount past due.
IAmountPastDueFilter      

MatchNumericCriterion

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

AmountPastDue

Amount that a customer is currently past due.
IQBAmountType     Y

AmountPastDueRangeFilter

Filters customers in a range by amount past due.
IAmountPastDueRangeFilter      

FromAmountPastDue

Filters the customer by amount past due.
IQBAmountType     Y

ToAmountPastDue

End of the amount past due range.
IQBAmountType     Y

ORCompanyNameFilters

IORCompanyNameFilters      

CompanyNameFilter

Filters objects by the customer or vendor’s company name value.
ICompanyNameFilter      

MatchStringCriterion

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

CompanyName

The name of the business.
IQBStringType 48 chars   Y

CompanyNameRangeFilter

Filters objects by a range of company name values.
ICompanyNameRangeFilter      

FromCompanyName

Start of the range of CompanyName values.
IQBStringType 48 chars   Y

ToCompanyName

End of the range of CompanyName values.
IQBStringType 48 chars   Y

ORCustomerIDFilters

IORCustomerIDFilters   2.5  

CustomerIDFilter

Filter the customer by the customer id.
ICustomerIDFilter      

MatchStringCriterion

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

CustomerID

Customer IDs are automatically assigned to new customers and can be used to print scannable ID cards.
IQBStringType 40 chars   Y

CustomerIDRangeFilter

Filter the customer by a range of customer ids.
ICustomerIDRangeFilter      

FromCustomerID

Filter the customer by the customer id.
IQBStringType 40 chars   Y

ToCustomerID

End of the customer id range.
IQBStringType 40 chars   Y

ORCustomerDiscPercentFilters

IORCustomerDiscPercentFilters      

CustomerDiscPercentFilter

Filters customers by their CustomerDiscPercent field.
ICustomerDiscPercentFilter      

MatchNumericCriterion

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

CustomerDiscPercent

If a discount is specified for a customer, that customer percentage discounts is automatically suggested against the active price level for all items listed on a sales receipt made for that customer. You have the option of applying the customer discount at the time a receipt is made, in the SalesReceiptItemAdd aggregate, under DiscountPercentage. Instead of a discount, you can assign the customer a price level, in which case that price level is suggested when you create a receipt for the customer. Again, you have the option at time of sale to apply the customer price level, in the SalesReceiptItemAdd aggregate, under DiscountAmount. You can assign a customer discount or a price level to a customer, or you can omit them altogether. Notice that you cannot assign BOTH a percentage discount and a price level to a customer.
IQBFloatType     Y

CustomerDiscPercentRangeFilter

Filters customers by a range of CustomerDiscPercent values.
ICustomerDiscPercentRangeFilter      

FromCustomerDiscPercent

Start of the CustomerDiscPercen range.
IQBFloatType     Y

ToCustomerDiscPercent

End of the CustomerDiscPercent range.
IQBFloatType     Y

CustomerDiscType

If you assign a price level or discount percent to a customer, you need to set the CustomerDiscType value to the corresponding type. If you are not giving the customer any discount, set this to None.
IQBENCustomerDiscTypeType      

ORCustomerTypeFilters

IORCustomerTypeFilters   1.1  

CustomerTypeFilter

Filters by customer type.
ICustomerTypeFilter      

MatchStringCriterion

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

CustomerType

Specify the desired customer type (optional). Customer types let you categorize your customers in useful ways. For example, you could set up your customer types so that they indicate whether a customer is a business or individual customer, their geographic location, or how they first heard about your business. You can create reports and do special mailings from the UI that are based on your customer types. You can also query (SDK) or use the Advanced Find feature (UI) using the customer type. Notice that specifying the Customer type in this SDK field does not add a new Customer Type that becomes available in the UI. For example, when adding a new customer there is a customer type pulldown from which you can select from existing customer types already specified in company preferences. The only way to get customer types into that pulldown menu is to specify them in the preferences.
IQBStringType 15 chars   Y

CustomerTypeRangeFilter

Filters by a range of customer types.
ICustomerTypeRangeFilter      

FromCustomerType

Beginning of the range.
IQBStringType 15 chars   Y

ToCustomerType

End of the range.
IQBStringType 15 chars   Y

OREMailFilters

IOREMailFilters      

EMailFilter

Filters by email address.
IEMailFilter      

MatchStringCriterion

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

EMail

The email address.
IQBStringType 99 chars   Y

EMailRangeFilter

Filters by a range of email addresses.
IEMailRangeFilter      

FromEMail

Start of the email range.
IQBStringType 99 chars   Y

ToEMail

End of the email range.
IQBStringType 99 chars   Y

ORFirstNameFilters

IORFirstNameFilters      

FirstNameFilter

Filters by the first name.
IFirstNameFilter      

MatchStringCriterion

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

FirstName

The first name.
IQBStringType 30 chars   Y

FirstNameRangeFilter

Filters by a range of first names.
IFirstNameRangeFilter      

FromFirstName

Start of the first name range.
IQBStringType 30 chars   Y

ToFirstName

End of the first name range.
IQBStringType 30 chars   Y

IsAcceptingChecks

Indicates whether checks are being accepted from this customer. The default is True.
IQBBoolType      

IsUsingChargeAccount

Indicates whether the customer is using a charge account.
IQBBoolType   2.0  

IsUsingWithQB

Indicates whether QBFS is being used with this data.
IQBBoolType      

IsRewardsMember

If offering a Rewards program, elect the check box to enroll this customer.
IQBBoolType   2.5  

IsNoShipToBilling

Select the Do not mail to Bill To Address check box to prevent address entered in the Contact Info section is automatically added as the default shipping address.
IQBBoolType   2.5  

ORLastNameFilters

IORLastNameFilters      

LastNameFilter

Filters by the last name.
ILastNameFilter      

MatchStringCriterion

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

LastName

The last name.
IQBStringType 30 chars   Y

LastNameRangeFilter

Filters by a range of last names.
ILastNameRangeFilter      

FromLastName

Start of the last name range.
IQBStringType 30 chars   Y

ToLastName

End of the last name range.
IQBStringType 30 chars   Y

ORLastSaleFilters

IORLastSaleFilters      

LastSaleFilter

Filters customers by the LastSale value.
ILastSaleFilter      

MatchNumericCriterion

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

LastSale

The time of the last purchase made by this customer.
IQBDateType     Y

LastSaleRangeFilter

Filters customers by a range of LastSale values.
ILastSaleRangeFilter      

FromLastSale

Start of the LastSale range.
IQBDateType     Y

ToLastSale

End of the LastSale range.
IQBDateType     Y

ORNotesFilters

IORNotesFilters      

NotesFilter

Filters by the contents of the Notes field.
INotesFilter      

MatchStringCriterion

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

Notes

Use this field to record optional information about the object, such as employee or customer, such as birthday, requested items, clothing sizes, etc. Notice that notes are not exchanged with QuickBooks Financial Software.
IQBStringType 245 chars   Y

NotesRangeFilter

Filters by a range of note values.
INotesRangeFilter      

FromNotes

Start of the Notes range.
IQBStringType 245 chars   Y

ToNotes

End of the Notes range.
IQBStringType 245 chars   Y

ORPhoneFilters

IORPhoneFilters      

PhoneFilter

Filters by the Phone value.
IPhoneFilter      

MatchStringCriterion

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

Phone

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

PhoneRangeFilter

Filters by a range of Phone values.
IPhoneRangeFilter      

FromPhone

Start of the phone number range.
IQBStringType 40 chars   Y

ToPhone

End of the phone number range.
IQBStringType 40 chars   Y

ORPhone2Filters

IORPhone2Filters      

Phone2Filter

Filters by the Phone2 value.
IPhone2Filter      

MatchStringCriterion

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

Phone2

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

Phone2RangeFilter

Filters by a range of Phone2 values.
IPhone2RangeFilter      

FromPhone2

Beginning of the range.
IQBStringType 40 chars   Y

ToPhone2

End of the range.
IQBStringType 40 chars   Y

ORPhone3Filters

IORPhone3Filters   1.1  

Phone3Filter

Filters by Phone3 values.
IPhone3Filter      

MatchStringCriterion

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

Phone3

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

Phone3RangeFilter

Filters by a range of Phone3 values.
IPhone3RangeFilter      

FromPhone3

Beginning of the range.
IQBStringType 40 chars   Y

ToPhone3

End of the range.
IQBStringType 40 chars   Y

ORPhone4Filters

IORPhone4Filters   1.1  

Phone4Filter

Filters by Phone4 values.
IPhone4Filter      

MatchStringCriterion

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

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   Y

Phone4RangeFilter

Filters by a range of Phone4 values.
IPhone4RangeFilter      

FromPhone4

Beginning of the range.
IQBStringType 40 chars   Y

ToPhone4

End of the range.
IQBStringType 40 chars   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      

ORSalutationFilters

IORSalutationFilters      

SalutationFilter

Filters customers or vendors by their Salutation field value.
ISalutationFilter      

MatchStringCriterion

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

Salutation

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

SalutationRangeFilter

Filters customers or vendors by a range of salutation values.
ISalutationRangeFilter      

FromSalutation

Start of the salutation range.
IQBStringType 15 chars   Y

ToSalutation

End of the salutation range.
IQBStringType 15 chars   Y

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      

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

ORWebNumberFilters

IORWebNumberFilters   3.0  

WebNumberFilter

Filtering by the web number.
IWebNumberFilter      

MatchStringCriterion

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

WebNumber

Number used on a web site.
IQBStringType 32 chars   Y

WebNumberRangeFilter

Filtering by the web number range.
IWebNumberRangeFilter      

FromWebNumber

Start of the web number range.
IQBStringType 32 chars   Y

ToWebNumber

End of web number range.
IQBStringType 32 chars   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

Retrieves the specified customer record(s) from the database.
       

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

ICustomerRetList      

(List of ICustomerRet 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      

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      

AccountBalance

AccountBalance and AccountLimit are available only when QBPOS is being used with QuickBooks and only if the UseWithQB element in the original request was set to “true.” Account balances and account limits for customers are not kept in QBPOS.
IQBAmountType      

AccountLimit

AccountBalance and AccountLimit are available only when QBPOS is being used with QuickBooks and only if the UseWithQB element in the original request was set to “true.” Account balances and account limits for customers are not kept in QBPOS.
IQBAmountType      

AmountPastDue

Amount that a customer is currently past due.
IQBAmountType   2.5  

CompanyName

The name of the business.
IQBStringType 48 chars    

CustomerID

Customer IDs are automatically assigned to new customers and can be used to print scannable ID cards.
IQBStringType 40 chars 2.5  

CustomerDiscPercent

If a discount is specified for a customer, that customer percentage discounts is automatically suggested against the active price level for all items listed on a sales receipt made for that customer. You have the option of applying the customer discount at the time a receipt is made, in the SalesReceiptItemAdd aggregate, under DiscountPercentage. Instead of a discount, you can assign the customer a price level, in which case that price level is suggested when you create a receipt for the customer. Again, you have the option at time of sale to apply the customer price level, in the SalesReceiptItemAdd aggregate, under DiscountAmount. You can assign a customer discount or a price level to a customer, or you can omit them altogether. Notice that you cannot assign BOTH a percentage discount and a price level to a customer.
IQBFloatType      

CustomerDiscType

If you assign a price level or discount percent to a customer, you need to set the CustomerDiscType value to the corresponding type. If you are not giving the customer any discount, set this to None.
IQBENCustomerDiscTypeType      

CustomerType

Specify the desired customer type (optional). Customer types let you categorize your customers in useful ways. For example, you could set up your customer types so that they indicate whether a customer is a business or individual customer, their geographic location, or how they first heard about your business. You can create reports and do special mailings from the UI that are based on your customer types. You can also query (SDK) or use the Advanced Find feature (UI) using the customer type. Notice that specifying the Customer type in this SDK field does not add a new Customer Type that becomes available in the UI. For example, when adding a new customer there is a customer type pulldown from which you can select from existing customer types already specified in company preferences. The only way to get customer types into that pulldown menu is to specify them in the preferences.
IQBStringType 15 chars 1.1  

EMail

The email address.
IQBStringType 99 chars    

IsOkToEMail

Indicator that says it is ok to e-mail the customer.
IQBBoolType   3.0  

FirstName

The first name.
IQBStringType 30 chars    

FullName

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

IsAcceptingChecks

Indicates whether checks are being accepted from this customer. The default is True.
IQBBoolType      

IsUsingChargeAccount

Indicates whether the customer is using a charge account.
IQBBoolType   2.0  

IsUsingWithQB

Indicates whether QBFS is being used with this data.
IQBBoolType      

IsRewardsMember

If offering a Rewards program, elect the check box to enroll this customer.
IQBBoolType   2.5  

IsNoShipToBilling

Select the Do not mail to Bill To Address check box to prevent address entered in the Contact Info section is automatically added as the default shipping address.
IQBBoolType   2.5  

LastName

The last name.
IQBStringType 30 chars    

LastSale

The time of the last purchase made by this customer.
IQBDateType      

Notes

Can be used for any information you want to record about this particular customer.
IQBStringType 245 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  

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      

Salutation

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

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      

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    

WebNumber

Number used on a web site.
IQBStringType 32 chars 3.0  

BillAddress

The legal address of the purchaser.
IBillAddress      

City

The city name in the address.
IQBStringType 31 chars    

Country

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

PostalCode

The postal code used in the address.
IQBStringType 13 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  

DefaultShipAddress

Add to enter alternate shipping addresses (up to ten). Designate one as the default. The default shipping address will be suggested when you add shipping information to sales receipts.
IQBStringType 32 chars 2.5  

ShipAddressList

List of ship addresses.
IShipAddressList      

(List of IShipAddress Objects)

       

AddressName

Name of the ship adddress.
IQBStringType 32 chars 2.5  

CompanyName

The name of the business.
IQBStringType 48 chars 2.5  

FullName

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

City

The city name in the address.
IQBStringType 31 chars    

Country

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

PostalCode

The postal code used in the address.
IQBStringType 13 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  

RewardList

List of reward objects.
IRewardList   2.5  

(List of IReward Objects)

       

RewardAmount

Amount for the current reward object.
IQBAmountType      

RewardPercent

Percentage used on reward discount.
IQBFloatType      

EarnedDate

Date rewards were earned.
IQBDateType      

MatureDate

Date rewards mature.
IQBDateType      

ExpirationDate

Date rewards expire.
IQBDateType      

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
<?xml version="1.0" encoding="utf-8"?>
<?qbposxml version="4.0"?>
<QBPOSXML>
        <QBPOSXMLMsgsRq onError="stopOnError">
                <CustomerQueryRq metaData="ENUMTYPE" iterator="ENUMTYPE" iteratorID="UUIDTYPE">
                        <MaxReturned >INTTYPE</MaxReturned> <!-- optional -->
                        <OwnerID >GUIDTYPE</OwnerID> <!-- optional, may repeat -->
                        <ListID >IDTYPE</ListID> <!-- 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 -->
                                <AccountBalanceFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <AccountBalance >AMTTYPE</AccountBalance> <!-- required -->
                                </AccountBalanceFilter>
                        <!-- OR -->
                                <AccountBalanceRangeFilter> <!-- optional -->
                                        <FromAccountBalance >AMTTYPE</FromAccountBalance> <!-- required -->
                                        <ToAccountBalance >AMTTYPE</ToAccountBalance> <!-- required -->
                                </AccountBalanceRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <AccountLimitFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <AccountLimit >AMTTYPE</AccountLimit> <!-- required -->
                                </AccountLimitFilter>
                        <!-- OR -->
                                <AccountLimitRangeFilter> <!-- optional -->
                                        <FromAccountLimit >AMTTYPE</FromAccountLimit> <!-- required -->
                                        <ToAccountLimit >AMTTYPE</ToAccountLimit> <!-- required -->
                                </AccountLimitRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <AmountPastDueFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <AmountPastDue >AMTTYPE</AmountPastDue> <!-- required -->
                                </AmountPastDueFilter>
                        <!-- OR -->
                                <AmountPastDueRangeFilter> <!-- optional -->
                                        <FromAmountPastDue >AMTTYPE</FromAmountPastDue> <!-- required -->
                                        <ToAmountPastDue >AMTTYPE</ToAmountPastDue> <!-- required -->
                                </AmountPastDueRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <CompanyNameFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <CompanyName >STRTYPE</CompanyName> <!-- required -->
                                </CompanyNameFilter>
                        <!-- OR -->
                                <CompanyNameRangeFilter> <!-- optional -->
                                        <FromCompanyName >STRTYPE</FromCompanyName> <!-- required -->
                                        <ToCompanyName >STRTYPE</ToCompanyName> <!-- required -->
                                </CompanyNameRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <CustomerIDFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <CustomerID >STRTYPE</CustomerID> <!-- required -->
                                </CustomerIDFilter>
                        <!-- OR -->
                                <CustomerIDRangeFilter> <!-- optional -->
                                        <FromCustomerID >STRTYPE</FromCustomerID> <!-- required -->
                                        <ToCustomerID >STRTYPE</ToCustomerID> <!-- required -->
                                </CustomerIDRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <CustomerDiscPercentFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <CustomerDiscPercent >FLOATTYPE</CustomerDiscPercent> <!-- required -->
                                </CustomerDiscPercentFilter>
                        <!-- OR -->
                                <CustomerDiscPercentRangeFilter> <!-- optional -->
                                        <FromCustomerDiscPercent >FLOATTYPE</FromCustomerDiscPercent> <!-- required -->
                                        <ToCustomerDiscPercent >FLOATTYPE</ToCustomerDiscPercent> <!-- required -->
                                </CustomerDiscPercentRangeFilter>
                        <!-- END OR -->
                        <!-- CustomerDiscType may have one of the following values: None, PriceLevel, Percentage -->
                        <CustomerDiscType >ENUMTYPE</CustomerDiscType> <!-- optional -->
                        <!-- BEGIN OR -->
                                <CustomerTypeFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <CustomerType >STRTYPE</CustomerType> <!-- required -->
                                </CustomerTypeFilter>
                        <!-- OR -->
                                <CustomerTypeRangeFilter> <!-- optional -->
                                        <FromCustomerType >STRTYPE</FromCustomerType> <!-- required -->
                                        <ToCustomerType >STRTYPE</ToCustomerType> <!-- required -->
                                </CustomerTypeRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <EMailFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <EMail >STRTYPE</EMail> <!-- required -->
                                </EMailFilter>
                        <!-- OR -->
                                <EMailRangeFilter> <!-- optional -->
                                        <FromEMail >STRTYPE</FromEMail> <!-- required -->
                                        <ToEMail >STRTYPE</ToEMail> <!-- required -->
                                </EMailRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <FirstNameFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <FirstName >STRTYPE</FirstName> <!-- required -->
                                </FirstNameFilter>
                        <!-- OR -->
                                <FirstNameRangeFilter> <!-- optional -->
                                        <FromFirstName >STRTYPE</FromFirstName> <!-- required -->
                                        <ToFirstName >STRTYPE</ToFirstName> <!-- required -->
                                </FirstNameRangeFilter>
                        <!-- END OR -->
                        <IsAcceptingChecks >BOOLTYPE</IsAcceptingChecks> <!-- optional -->
                        <IsUsingChargeAccount >BOOLTYPE</IsUsingChargeAccount> <!-- optional -->
                        <IsUsingWithQB >BOOLTYPE</IsUsingWithQB> <!-- optional -->
                        <IsRewardsMember >BOOLTYPE</IsRewardsMember> <!-- optional -->
                        <IsNoShipToBilling >BOOLTYPE</IsNoShipToBilling> <!-- optional -->
                        <!-- BEGIN OR -->
                                <LastNameFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <LastName >STRTYPE</LastName> <!-- required -->
                                </LastNameFilter>
                        <!-- OR -->
                                <LastNameRangeFilter> <!-- optional -->
                                        <FromLastName >STRTYPE</FromLastName> <!-- required -->
                                        <ToLastName >STRTYPE</ToLastName> <!-- required -->
                                </LastNameRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <LastSaleFilter> <!-- optional -->
                                        <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual -->
                                        <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required -->
                                        <LastSale >DATETYPE</LastSale> <!-- required -->
                                </LastSaleFilter>
                        <!-- OR -->
                                <LastSaleRangeFilter> <!-- optional -->
                                        <FromLastSale >DATETYPE</FromLastSale> <!-- required -->
                                        <ToLastSale >DATETYPE</ToLastSale> <!-- required -->
                                </LastSaleRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <NotesFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <Notes >STRTYPE</Notes> <!-- required -->
                                </NotesFilter>
                        <!-- OR -->
                                <NotesRangeFilter> <!-- optional -->
                                        <FromNotes >STRTYPE</FromNotes> <!-- required -->
                                        <ToNotes >STRTYPE</ToNotes> <!-- required -->
                                </NotesRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <PhoneFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <Phone >STRTYPE</Phone> <!-- required -->
                                </PhoneFilter>
                        <!-- OR -->
                                <PhoneRangeFilter> <!-- optional -->
                                        <FromPhone >STRTYPE</FromPhone> <!-- required -->
                                        <ToPhone >STRTYPE</ToPhone> <!-- required -->
                                </PhoneRangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <Phone2Filter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <Phone2 >STRTYPE</Phone2> <!-- required -->
                                </Phone2Filter>
                        <!-- OR -->
                                <Phone2RangeFilter> <!-- optional -->
                                        <FromPhone2 >STRTYPE</FromPhone2> <!-- required -->
                                        <ToPhone2 >STRTYPE</ToPhone2> <!-- required -->
                                </Phone2RangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <Phone3Filter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <Phone3 >STRTYPE</Phone3> <!-- required -->
                                </Phone3Filter>
                        <!-- OR -->
                                <Phone3RangeFilter> <!-- optional -->
                                        <FromPhone3 >STRTYPE</FromPhone3> <!-- required -->
                                        <ToPhone3 >STRTYPE</ToPhone3> <!-- required -->
                                </Phone3RangeFilter>
                        <!-- END OR -->
                        <!-- BEGIN OR -->
                                <Phone4Filter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <Phone4 >STRTYPE</Phone4> <!-- required -->
                                </Phone4Filter>
                        <!-- OR -->
                                <Phone4RangeFilter> <!-- optional -->
                                        <FromPhone4 >STRTYPE</FromPhone4> <!-- required -->
                                        <ToPhone4 >STRTYPE</ToPhone4> <!-- required -->
                                </Phone4RangeFilter>
                        <!-- END OR -->
                        <!-- PriceLevelNumber may have one of the following values: 1, 2, 3, 4, 5 -->
                        <PriceLevelNumber >ENUMTYPE</PriceLevelNumber> <!-- optional -->
                        <!-- BEGIN OR -->
                                <SalutationFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <Salutation >STRTYPE</Salutation> <!-- required -->
                                </SalutationFilter>
                        <!-- OR -->
                                <SalutationRangeFilter> <!-- optional -->
                                        <FromSalutation >STRTYPE</FromSalutation> <!-- required -->
                                        <ToSalutation >STRTYPE</ToSalutation> <!-- required -->
                                </SalutationRangeFilter>
                        <!-- END OR -->
                        <!-- StoreExchangeStatus may have one of the following values: Modified, Sent, Acknowledged -->
                        <StoreExchangeStatus >ENUMTYPE</StoreExchangeStatus> <!-- optional -->
                        <!-- 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 -->
                                <WebNumberFilter> <!-- optional -->
                                        <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith -->
                                        <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required -->
                                        <WebNumber >STRTYPE</WebNumber> <!-- required -->
                                </WebNumberFilter>
                        <!-- OR -->
                                <WebNumberRangeFilter> <!-- optional -->
                                        <FromWebNumber >STRTYPE</FromWebNumber> <!-- required -->
                                        <ToWebNumber >STRTYPE</ToWebNumber> <!-- required -->
                                </WebNumberRangeFilter>
                        <!-- END OR -->
                        <IncludeRetElement >STRTYPE</IncludeRetElement> <!-- optional, may repeat -->
                </CustomerQueryRq>

                <CustomerQueryRs statusCode="INTTYPE" statusSeverity="STRTYPE" statusMessage="STRTYPE" retCount="INTTYPE" iteratorRemainingCount="INTTYPE" iteratorID="UUIDTYPE">
                        <CustomerRet> <!-- optional, may repeat -->
                                <ListID >IDTYPE</ListID> <!-- optional -->
                                <TimeCreated >DATETIMETYPE</TimeCreated> <!-- optional -->
                                <TimeModified >DATETIMETYPE</TimeModified> <!-- optional -->
                                <AccountBalance >AMTTYPE</AccountBalance> <!-- optional -->
                                <AccountLimit >AMTTYPE</AccountLimit> <!-- optional -->
                                <AmountPastDue >AMTTYPE</AmountPastDue> <!-- optional -->
                                <CompanyName >STRTYPE</CompanyName> <!-- optional -->
                                <CustomerID >STRTYPE</CustomerID> <!-- optional -->
                                <CustomerDiscPercent >FLOATTYPE</CustomerDiscPercent> <!-- optional -->
                                <!-- CustomerDiscType may have one of the following values: None, PriceLevel, Percentage -->
                                <CustomerDiscType >ENUMTYPE</CustomerDiscType> <!-- optional -->
                                <CustomerType >STRTYPE</CustomerType> <!-- optional -->
                                <EMail >STRTYPE</EMail> <!-- optional -->
                                <IsOkToEMail >BOOLTYPE</IsOkToEMail> <!-- optional -->
                                <FirstName >STRTYPE</FirstName> <!-- optional -->
                                <FullName >STRTYPE</FullName> <!-- optional -->
                                <IsAcceptingChecks >BOOLTYPE</IsAcceptingChecks> <!-- optional -->
                                <IsUsingChargeAccount >BOOLTYPE</IsUsingChargeAccount> <!-- optional -->
                                <IsUsingWithQB >BOOLTYPE</IsUsingWithQB> <!-- optional -->
                                <IsRewardsMember >BOOLTYPE</IsRewardsMember> <!-- optional -->
                                <IsNoShipToBilling >BOOLTYPE</IsNoShipToBilling> <!-- optional -->
                                <LastName >STRTYPE</LastName> <!-- optional -->
                                <LastSale >DATETYPE</LastSale> <!-- optional -->
                                <Notes >STRTYPE</Notes> <!-- optional -->
                                <Phone >STRTYPE</Phone> <!-- optional -->
                                <Phone2 >STRTYPE</Phone2> <!-- optional -->
                                <Phone3 >STRTYPE</Phone3> <!-- optional -->
                                <Phone4 >STRTYPE</Phone4> <!-- optional -->
                                <!-- PriceLevelNumber may have one of the following values: 1, 2, 3, 4, 5 -->
                                <PriceLevelNumber >ENUMTYPE</PriceLevelNumber> <!-- optional -->
                                <Salutation >STRTYPE</Salutation> <!-- optional -->
                                <!-- StoreExchangeStatus may have one of the following values: Modified, Sent, Acknowledged -->
                                <StoreExchangeStatus >ENUMTYPE</StoreExchangeStatus> <!-- optional -->
                                <TaxCategory >STRTYPE</TaxCategory> <!-- optional -->
                                <WebNumber >STRTYPE</WebNumber> <!-- optional -->
                                <BillAddress> <!-- optional -->
                                        <City >STRTYPE</City> <!-- optional -->
                                        <Country >STRTYPE</Country> <!-- optional -->
                                        <PostalCode >STRTYPE</PostalCode> <!-- optional -->
                                        <State >STRTYPE</State> <!-- optional -->
                                        <Street >STRTYPE</Street> <!-- optional -->
                                        <Street2 >STRTYPE</Street2> <!-- optional -->
                                </BillAddress>
                                <DefaultShipAddress >STRTYPE</DefaultShipAddress> <!-- optional -->
                                <ShipAddress> <!-- optional, may repeat -->
                                        <AddressName >STRTYPE</AddressName> <!-- optional -->
                                        <CompanyName >STRTYPE</CompanyName> <!-- optional -->
                                        <FullName >STRTYPE</FullName> <!-- optional -->
                                        <City >STRTYPE</City> <!-- optional -->
                                        <Country >STRTYPE</Country> <!-- optional -->
                                        <PostalCode >STRTYPE</PostalCode> <!-- optional -->
                                        <State >STRTYPE</State> <!-- optional -->
                                        <Street >STRTYPE</Street> <!-- optional -->
                                        <Street2 >STRTYPE</Street2> <!-- optional -->
                                </ShipAddress>
                                <Reward> <!-- optional, may repeat -->
                                        <RewardAmount >AMTTYPE</RewardAmount> <!-- optional -->
                                        <RewardPercent >FLOATTYPE</RewardPercent> <!-- optional -->
                                        <EarnedDate >DATETYPE</EarnedDate> <!-- optional -->
                                        <MatureDate >DATETYPE</MatureDate> <!-- optional -->
                                        <ExpirationDate >DATETYPE</ExpirationDate> <!-- optional -->
                                </Reward>
                                <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>
                        </CustomerRet>
                </CustomerQueryRs>
        </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
'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 SampleCustomerQuery
                Public Sub  DoCustomerQuery()
                        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

                                BuildCustomerQueryRq(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

                                WalkCustomerQueryRs(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 BuildCustomerQueryRq(requestMsgSet as IMsgSetRequest)
                        Dim CustomerQueryRq as ICustomerQuery
                        CustomerQueryRq= requestMsgSet.AppendCustomerQueryRq()
                        'Set field value for MaxReturned
                        CustomerQueryRq.MaxReturned.SetValue(6)
                        'Set field value for OwnerIDList
                        'May create more than one of these if needed
                        CustomerQueryRq.OwnerIDList.Add(System.Guid.NewGuid().ToString())
                        'Set field value for ListID
                        CustomerQueryRq.ListID.SetValue("200000-1011023419")
                        Dim ORTimeCreatedFiltersElementType375 as String
                        ORTimeCreatedFiltersElementType375 = "TimeCreatedFilter"
                        if (ORTimeCreatedFiltersElementType375 = "TimeCreatedFilter") then
                                'Set field value for MatchNumericCriterion
                                CustomerQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for TimeCreated
                                CustomerQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.TimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                        End If
                        if (ORTimeCreatedFiltersElementType375 = "TimeCreatedRangeFilter") then
                                'Set field value for FromTimeCreated
                                CustomerQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.FromTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                                'Set field value for ToTimeCreated
                                CustomerQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.ToTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                        End If
                        Dim ORTimeModifiedFiltersElementType376 as String
                        ORTimeModifiedFiltersElementType376 = "TimeModifiedFilter"
                        if (ORTimeModifiedFiltersElementType376 = "TimeModifiedFilter") then
                                'Set field value for MatchNumericCriterion
                                CustomerQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for TimeModified
                                CustomerQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.TimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                        End If
                        if (ORTimeModifiedFiltersElementType376 = "TimeModifiedRangeFilter") then
                                'Set field value for FromTimeModified
                                CustomerQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.FromTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                                'Set field value for ToTimeModified
                                CustomerQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.ToTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
                        End If
                        Dim ORAccountBalanceFiltersElementType377 as String
                        ORAccountBalanceFiltersElementType377 = "AccountBalanceFilter"
                        if (ORAccountBalanceFiltersElementType377 = "AccountBalanceFilter") then
                                'Set field value for MatchNumericCriterion
                                CustomerQueryRq.ORAccountBalanceFilters.AccountBalanceFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for AccountBalance
                                CustomerQueryRq.ORAccountBalanceFilters.AccountBalanceFilter.AccountBalance.SetValue(10.01)
                        End If
                        if (ORAccountBalanceFiltersElementType377 = "AccountBalanceRangeFilter") then
                                'Set field value for FromAccountBalance
                                CustomerQueryRq.ORAccountBalanceFilters.AccountBalanceRangeFilter.FromAccountBalance.SetValue(10.01)
                                'Set field value for ToAccountBalance
                                CustomerQueryRq.ORAccountBalanceFilters.AccountBalanceRangeFilter.ToAccountBalance.SetValue(10.01)
                        End If
                        Dim ORAccountLimitFiltersElementType378 as String
                        ORAccountLimitFiltersElementType378 = "AccountLimitFilter"
                        if (ORAccountLimitFiltersElementType378 = "AccountLimitFilter") then
                                'Set field value for MatchNumericCriterion
                                CustomerQueryRq.ORAccountLimitFilters.AccountLimitFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for AccountLimit
                                CustomerQueryRq.ORAccountLimitFilters.AccountLimitFilter.AccountLimit.SetValue(10.01)
                        End If
                        if (ORAccountLimitFiltersElementType378 = "AccountLimitRangeFilter") then
                                'Set field value for FromAccountLimit
                                CustomerQueryRq.ORAccountLimitFilters.AccountLimitRangeFilter.FromAccountLimit.SetValue(10.01)
                                'Set field value for ToAccountLimit
                                CustomerQueryRq.ORAccountLimitFilters.AccountLimitRangeFilter.ToAccountLimit.SetValue(10.01)
                        End If
                        Dim ORAmountPastDueFiltersElementType379 as String
                        ORAmountPastDueFiltersElementType379 = "AmountPastDueFilter"
                        if (ORAmountPastDueFiltersElementType379 = "AmountPastDueFilter") then
                                'Set field value for MatchNumericCriterion
                                CustomerQueryRq.ORAmountPastDueFilters.AmountPastDueFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for AmountPastDue
                                CustomerQueryRq.ORAmountPastDueFilters.AmountPastDueFilter.AmountPastDue.SetValue(10.01)
                        End If
                        if (ORAmountPastDueFiltersElementType379 = "AmountPastDueRangeFilter") then
                                'Set field value for FromAmountPastDue
                                CustomerQueryRq.ORAmountPastDueFilters.AmountPastDueRangeFilter.FromAmountPastDue.SetValue(10.01)
                                'Set field value for ToAmountPastDue
                                CustomerQueryRq.ORAmountPastDueFilters.AmountPastDueRangeFilter.ToAmountPastDue.SetValue(10.01)
                        End If
                        Dim ORCompanyNameFiltersElementType380 as String
                        ORCompanyNameFiltersElementType380 = "CompanyNameFilter"
                        if (ORCompanyNameFiltersElementType380 = "CompanyNameFilter") then
                                'Set field value for MatchStringCriterion
                                CustomerQueryRq.ORCompanyNameFilters.CompanyNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for CompanyName
                                CustomerQueryRq.ORCompanyNameFilters.CompanyNameFilter.CompanyName.SetValue("ab")
                        End If
                        if (ORCompanyNameFiltersElementType380 = "CompanyNameRangeFilter") then
                                'Set field value for FromCompanyName
                                CustomerQueryRq.ORCompanyNameFilters.CompanyNameRangeFilter.FromCompanyName.SetValue("ab")
                                'Set field value for ToCompanyName
                                CustomerQueryRq.ORCompanyNameFilters.CompanyNameRangeFilter.ToCompanyName.SetValue("ab")
                        End If
                        Dim ORCustomerIDFiltersElementType381 as String
                        ORCustomerIDFiltersElementType381 = "CustomerIDFilter"
                        if (ORCustomerIDFiltersElementType381 = "CustomerIDFilter") then
                                'Set field value for MatchStringCriterion
                                CustomerQueryRq.ORCustomerIDFilters.CustomerIDFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for CustomerID
                                CustomerQueryRq.ORCustomerIDFilters.CustomerIDFilter.CustomerID.SetValue("ab")
                        End If
                        if (ORCustomerIDFiltersElementType381 = "CustomerIDRangeFilter") then
                                'Set field value for FromCustomerID
                                CustomerQueryRq.ORCustomerIDFilters.CustomerIDRangeFilter.FromCustomerID.SetValue("ab")
                                'Set field value for ToCustomerID
                                CustomerQueryRq.ORCustomerIDFilters.CustomerIDRangeFilter.ToCustomerID.SetValue("ab")
                        End If
                        Dim ORCustomerDiscPercentFiltersElementType382 as String
                        ORCustomerDiscPercentFiltersElementType382 = "CustomerDiscPercentFilter"
                        if (ORCustomerDiscPercentFiltersElementType382 = "CustomerDiscPercentFilter") then
                                'Set field value for MatchNumericCriterion
                                CustomerQueryRq.ORCustomerDiscPercentFilters.CustomerDiscPercentFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for CustomerDiscPercent
                                CustomerQueryRq.ORCustomerDiscPercentFilters.CustomerDiscPercentFilter.CustomerDiscPercent.SetValue(12.34)
                        End If
                        if (ORCustomerDiscPercentFiltersElementType382 = "CustomerDiscPercentRangeFilter") then
                                'Set field value for FromCustomerDiscPercent
                                CustomerQueryRq.ORCustomerDiscPercentFilters.CustomerDiscPercentRangeFilter.FromCustomerDiscPercent.SetValue(12.34)
                                'Set field value for ToCustomerDiscPercent
                                CustomerQueryRq.ORCustomerDiscPercentFilters.CustomerDiscPercentRangeFilter.ToCustomerDiscPercent.SetValue(12.34)
                        End If
                        'Set field value for CustomerDiscType
                        CustomerQueryRq.CustomerDiscType.SetValue(ENCustomerDiscType.cdtNone)
                        Dim ORCustomerTypeFiltersElementType383 as String
                        ORCustomerTypeFiltersElementType383 = "CustomerTypeFilter"
                        if (ORCustomerTypeFiltersElementType383 = "CustomerTypeFilter") then
                                'Set field value for MatchStringCriterion
                                CustomerQueryRq.ORCustomerTypeFilters.CustomerTypeFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for CustomerType
                                CustomerQueryRq.ORCustomerTypeFilters.CustomerTypeFilter.CustomerType.SetValue("ab")
                        End If
                        if (ORCustomerTypeFiltersElementType383 = "CustomerTypeRangeFilter") then
                                'Set field value for FromCustomerType
                                CustomerQueryRq.ORCustomerTypeFilters.CustomerTypeRangeFilter.FromCustomerType.SetValue("ab")
                                'Set field value for ToCustomerType
                                CustomerQueryRq.ORCustomerTypeFilters.CustomerTypeRangeFilter.ToCustomerType.SetValue("ab")
                        End If
                        Dim OREMailFiltersElementType384 as String
                        OREMailFiltersElementType384 = "EMailFilter"
                        if (OREMailFiltersElementType384 = "EMailFilter") then
                                'Set field value for MatchStringCriterion
                                CustomerQueryRq.OREMailFilters.EMailFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for EMail
                                CustomerQueryRq.OREMailFilters.EMailFilter.EMail.SetValue("ab")
                        End If
                        if (OREMailFiltersElementType384 = "EMailRangeFilter") then
                                'Set field value for FromEMail
                                CustomerQueryRq.OREMailFilters.EMailRangeFilter.FromEMail.SetValue("ab")
                                'Set field value for ToEMail
                                CustomerQueryRq.OREMailFilters.EMailRangeFilter.ToEMail.SetValue("ab")
                        End If
                        Dim ORFirstNameFiltersElementType385 as String
                        ORFirstNameFiltersElementType385 = "FirstNameFilter"
                        if (ORFirstNameFiltersElementType385 = "FirstNameFilter") then
                                'Set field value for MatchStringCriterion
                                CustomerQueryRq.ORFirstNameFilters.FirstNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for FirstName
                                CustomerQueryRq.ORFirstNameFilters.FirstNameFilter.FirstName.SetValue("ab")
                        End If
                        if (ORFirstNameFiltersElementType385 = "FirstNameRangeFilter") then
                                'Set field value for FromFirstName
                                CustomerQueryRq.ORFirstNameFilters.FirstNameRangeFilter.FromFirstName.SetValue("ab")
                                'Set field value for ToFirstName
                                CustomerQueryRq.ORFirstNameFilters.FirstNameRangeFilter.ToFirstName.SetValue("ab")
                        End If
                        'Set field value for IsAcceptingChecks
                        CustomerQueryRq.IsAcceptingChecks.SetValue(True)
                        'Set field value for IsUsingChargeAccount
                        CustomerQueryRq.IsUsingChargeAccount.SetValue(True)
                        'Set field value for IsUsingWithQB
                        CustomerQueryRq.IsUsingWithQB.SetValue(True)
                        'Set field value for IsRewardsMember
                        CustomerQueryRq.IsRewardsMember.SetValue(True)
                        'Set field value for IsNoShipToBilling
                        CustomerQueryRq.IsNoShipToBilling.SetValue(True)
                        Dim ORLastNameFiltersElementType386 as String
                        ORLastNameFiltersElementType386 = "LastNameFilter"
                        if (ORLastNameFiltersElementType386 = "LastNameFilter") then
                                'Set field value for MatchStringCriterion
                                CustomerQueryRq.ORLastNameFilters.LastNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for LastName
                                CustomerQueryRq.ORLastNameFilters.LastNameFilter.LastName.SetValue("ab")
                        End If
                        if (ORLastNameFiltersElementType386 = "LastNameRangeFilter") then
                                'Set field value for FromLastName
                                CustomerQueryRq.ORLastNameFilters.LastNameRangeFilter.FromLastName.SetValue("ab")
                                'Set field value for ToLastName
                                CustomerQueryRq.ORLastNameFilters.LastNameRangeFilter.ToLastName.SetValue("ab")
                        End If
                        Dim ORLastSaleFiltersElementType387 as String
                        ORLastSaleFiltersElementType387 = "LastSaleFilter"
                        if (ORLastSaleFiltersElementType387 = "LastSaleFilter") then
                                'Set field value for MatchNumericCriterion
                                CustomerQueryRq.ORLastSaleFilters.LastSaleFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
                                'Set field value for LastSale
                                CustomerQueryRq.ORLastSaleFilters.LastSaleFilter.LastSale.SetValue(DateTime.Parse("12/15/2007"))
                        End If
                        if (ORLastSaleFiltersElementType387 = "LastSaleRangeFilter") then
                                'Set field value for FromLastSale
                                CustomerQueryRq.ORLastSaleFilters.LastSaleRangeFilter.FromLastSale.SetValue(DateTime.Parse("12/15/2007"))
                                'Set field value for ToLastSale
                                CustomerQueryRq.ORLastSaleFilters.LastSaleRangeFilter.ToLastSale.SetValue(DateTime.Parse("12/15/2007"))
                        End If
                        Dim ORNotesFiltersElementType388 as String
                        ORNotesFiltersElementType388 = "NotesFilter"
                        if (ORNotesFiltersElementType388 = "NotesFilter") then
                                'Set field value for MatchStringCriterion
                                CustomerQueryRq.ORNotesFilters.NotesFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for Notes
                                CustomerQueryRq.ORNotesFilters.NotesFilter.Notes.SetValue("ab")
                        End If
                        if (ORNotesFiltersElementType388 = "NotesRangeFilter") then
                                'Set field value for FromNotes
                                CustomerQueryRq.ORNotesFilters.NotesRangeFilter.FromNotes.SetValue("ab")
                                'Set field value for ToNotes
                                CustomerQueryRq.ORNotesFilters.NotesRangeFilter.ToNotes.SetValue("ab")
                        End If
                        Dim ORPhoneFiltersElementType389 as String
                        ORPhoneFiltersElementType389 = "PhoneFilter"
                        if (ORPhoneFiltersElementType389 = "PhoneFilter") then
                                'Set field value for MatchStringCriterion
                                CustomerQueryRq.ORPhoneFilters.PhoneFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for Phone
                                CustomerQueryRq.ORPhoneFilters.PhoneFilter.Phone.SetValue("ab")
                        End If
                        if (ORPhoneFiltersElementType389 = "PhoneRangeFilter") then
                                'Set field value for FromPhone
                                CustomerQueryRq.ORPhoneFilters.PhoneRangeFilter.FromPhone.SetValue("ab")
                                'Set field value for ToPhone
                                CustomerQueryRq.ORPhoneFilters.PhoneRangeFilter.ToPhone.SetValue("ab")
                        End If
                        Dim ORPhone2FiltersElementType390 as String
                        ORPhone2FiltersElementType390 = "Phone2Filter"
                        if (ORPhone2FiltersElementType390 = "Phone2Filter") then
                                'Set field value for MatchStringCriterion
                                CustomerQueryRq.ORPhone2Filters.Phone2Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for Phone2
                                CustomerQueryRq.ORPhone2Filters.Phone2Filter.Phone2.SetValue("ab")
                        End If
                        if (ORPhone2FiltersElementType390 = "Phone2RangeFilter") then
                                'Set field value for FromPhone2
                                CustomerQueryRq.ORPhone2Filters.Phone2RangeFilter.FromPhone2.SetValue("ab")
                                'Set field value for ToPhone2
                                CustomerQueryRq.ORPhone2Filters.Phone2RangeFilter.ToPhone2.SetValue("ab")
                        End If
                        Dim ORPhone3FiltersElementType391 as String
                        ORPhone3FiltersElementType391 = "Phone3Filter"
                        if (ORPhone3FiltersElementType391 = "Phone3Filter") then
                                'Set field value for MatchStringCriterion
                                CustomerQueryRq.ORPhone3Filters.Phone3Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for Phone3
                                CustomerQueryRq.ORPhone3Filters.Phone3Filter.Phone3.SetValue("ab")
                        End If
                        if (ORPhone3FiltersElementType391 = "Phone3RangeFilter") then
                                'Set field value for FromPhone3
                                CustomerQueryRq.ORPhone3Filters.Phone3RangeFilter.FromPhone3.SetValue("ab")
                                'Set field value for ToPhone3
                                CustomerQueryRq.ORPhone3Filters.Phone3RangeFilter.ToPhone3.SetValue("ab")
                        End If
                        Dim ORPhone4FiltersElementType392 as String
                        ORPhone4FiltersElementType392 = "Phone4Filter"
                        if (ORPhone4FiltersElementType392 = "Phone4Filter") then
                                'Set field value for MatchStringCriterion
                                CustomerQueryRq.ORPhone4Filters.Phone4Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for Phone4
                                CustomerQueryRq.ORPhone4Filters.Phone4Filter.Phone4.SetValue("ab")
                        End If
                        if (ORPhone4FiltersElementType392 = "Phone4RangeFilter") then
                                'Set field value for FromPhone4
                                CustomerQueryRq.ORPhone4Filters.Phone4RangeFilter.FromPhone4.SetValue("ab")
                                'Set field value for ToPhone4
                                CustomerQueryRq.ORPhone4Filters.Phone4RangeFilter.ToPhone4.SetValue("ab")
                        End If
                        'Set field value for PriceLevelNumber
                        CustomerQueryRq.PriceLevelNumber.SetValue(ENPriceLevelNumber.pln1)
                        Dim ORSalutationFiltersElementType393 as String
                        ORSalutationFiltersElementType393 = "SalutationFilter"
                        if (ORSalutationFiltersElementType393 = "SalutationFilter") then
                                'Set field value for MatchStringCriterion
                                CustomerQueryRq.ORSalutationFilters.SalutationFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for Salutation
                                CustomerQueryRq.ORSalutationFilters.SalutationFilter.Salutation.SetValue("ab")
                        End If
                        if (ORSalutationFiltersElementType393 = "SalutationRangeFilter") then
                                'Set field value for FromSalutation
                                CustomerQueryRq.ORSalutationFilters.SalutationRangeFilter.FromSalutation.SetValue("ab")
                                'Set field value for ToSalutation
                                CustomerQueryRq.ORSalutationFilters.SalutationRangeFilter.ToSalutation.SetValue("ab")
                        End If
                        'Set field value for StoreExchangeStatus
                        CustomerQueryRq.StoreExchangeStatus.SetValue(ENStoreExchangeStatus.sesModified)
                        Dim ORTaxCategoryFiltersElementType394 as String
                        ORTaxCategoryFiltersElementType394 = "TaxCategoryFilter"
                        if (ORTaxCategoryFiltersElementType394 = "TaxCategoryFilter") then
                                'Set field value for MatchStringCriterion
                                CustomerQueryRq.ORTaxCategoryFilters.TaxCategoryFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for TaxCategory
                                CustomerQueryRq.ORTaxCategoryFilters.TaxCategoryFilter.TaxCategory.SetValue("ab")
                        End If
                        if (ORTaxCategoryFiltersElementType394 = "TaxCategoryRangeFilter") then
                                'Set field value for FromTaxCategory
                                CustomerQueryRq.ORTaxCategoryFilters.TaxCategoryRangeFilter.FromTaxCategory.SetValue("ab")
                                'Set field value for ToTaxCategory
                                CustomerQueryRq.ORTaxCategoryFilters.TaxCategoryRangeFilter.ToTaxCategory.SetValue("ab")
                        End If
                        Dim ORWebNumberFiltersElementType395 as String
                        ORWebNumberFiltersElementType395 = "WebNumberFilter"
                        if (ORWebNumberFiltersElementType395 = "WebNumberFilter") then
                                'Set field value for MatchStringCriterion
                                CustomerQueryRq.ORWebNumberFilters.WebNumberFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
                                'Set field value for WebNumber
                                CustomerQueryRq.ORWebNumberFilters.WebNumberFilter.WebNumber.SetValue("ab")
                        End If
                        if (ORWebNumberFiltersElementType395 = "WebNumberRangeFilter") then
                                'Set field value for FromWebNumber
                                CustomerQueryRq.ORWebNumberFilters.WebNumberRangeFilter.FromWebNumber.SetValue("ab")
                                'Set field value for ToWebNumber
                                CustomerQueryRq.ORWebNumberFilters.WebNumberRangeFilter.ToWebNumber.SetValue("ab")
                        End If
                        'Set field value for IncludeRetElementList
                        'May create more than one of these if needed
                        CustomerQueryRq.IncludeRetElementList.Add("ab")
                End Sub




                Public Sub WalkCustomerQueryRs( 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.rtCustomerQueryRs) then
                                                        'upcast to more specific type here, this is safe because we checked with response.Type check above
                                                        Dim CustomerRet as ICustomerRetList
                                                        CustomerRet = CType(response.Detail,ICustomerRetList)
                                                        for z=0 to CustomerRet.Count-1
                                                                WalkCustomerRet(CustomerRet.GetAt(z))
                                                        Next z
                                                End If
                                        End If
                                End If
                        Next j
                End Sub




                Public Sub WalkCustomerRet(CustomerRet as ICustomerRet)
                        if (CustomerRet is nothing) then
                                Exit Sub
                        End If

                        'Go through all the elements of ICustomerRetList
                        'Get value of ListID
                        if ( not CustomerRet.ListID is nothing) then
                                Dim ListID396 as String
                                ListID396 = CustomerRet.ListID.GetValue()
                        End If
                        'Get value of TimeCreated
                        if ( not CustomerRet.TimeCreated is nothing) then
                                Dim TimeCreated397 as DateTime
                                TimeCreated397 = CustomerRet.TimeCreated.GetValue()
                        End If
                        'Get value of TimeModified
                        if ( not CustomerRet.TimeModified is nothing) then
                                Dim TimeModified398 as DateTime
                                TimeModified398 = CustomerRet.TimeModified.GetValue()
                        End If
                        'Get value of AccountBalance
                        if ( not CustomerRet.AccountBalance is nothing) then
                                Dim AccountBalance399 as Double
                                AccountBalance399 = CustomerRet.AccountBalance.GetValue()
                        End If
                        'Get value of AccountLimit
                        if ( not CustomerRet.AccountLimit is nothing) then
                                Dim AccountLimit400 as Double
                                AccountLimit400 = CustomerRet.AccountLimit.GetValue()
                        End If
                        'Get value of AmountPastDue
                        if ( not CustomerRet.AmountPastDue is nothing) then
                                Dim AmountPastDue401 as Double
                                AmountPastDue401 = CustomerRet.AmountPastDue.GetValue()
                        End If
                        'Get value of CompanyName
                        if ( not CustomerRet.CompanyName is nothing) then
                                Dim CompanyName402 as String
                                CompanyName402 = CustomerRet.CompanyName.GetValue()
                        End If
                        'Get value of CustomerID
                        if ( not CustomerRet.CustomerID is nothing) then
                                Dim CustomerID403 as String
                                CustomerID403 = CustomerRet.CustomerID.GetValue()
                        End If
                        'Get value of CustomerDiscPercent
                        if ( not CustomerRet.CustomerDiscPercent is nothing) then
                                Dim CustomerDiscPercent404 as Single
                                CustomerDiscPercent404 = CustomerRet.CustomerDiscPercent.GetValue()
                        End If
                        'Get value of CustomerDiscType
                        if ( not CustomerRet.CustomerDiscType is nothing) then
                                Dim CustomerDiscType405 as ENCustomerDiscType
                                CustomerDiscType405 = CustomerRet.CustomerDiscType.GetValue()
                        End If
                        'Get value of CustomerType
                        if ( not CustomerRet.CustomerType is nothing) then
                                Dim CustomerType406 as String
                                CustomerType406 = CustomerRet.CustomerType.GetValue()
                        End If
                        'Get value of EMail
                        if ( not CustomerRet.EMail is nothing) then
                                Dim EMail407 as String
                                EMail407 = CustomerRet.EMail.GetValue()
                        End If
                        'Get value of IsOkToEMail
                        if ( not CustomerRet.IsOkToEMail is nothing) then
                                Dim IsOkToEMail408 as Boolean
                                IsOkToEMail408 = CustomerRet.IsOkToEMail.GetValue()
                        End If
                        'Get value of FirstName
                        if ( not CustomerRet.FirstName is nothing) then
                                Dim FirstName409 as String
                                FirstName409 = CustomerRet.FirstName.GetValue()
                        End If
                        'Get value of FullName
                        if ( not CustomerRet.FullName is nothing) then
                                Dim FullName410 as String
                                FullName410 = CustomerRet.FullName.GetValue()
                        End If
                        'Get value of IsAcceptingChecks
                        if ( not CustomerRet.IsAcceptingChecks is nothing) then
                                Dim IsAcceptingChecks411 as Boolean
                                IsAcceptingChecks411 = CustomerRet.IsAcceptingChecks.GetValue()
                        End If
                        'Get value of IsUsingChargeAccount
                        if ( not CustomerRet.IsUsingChargeAccount is nothing) then
                                Dim IsUsingChargeAccount412 as Boolean
                                IsUsingChargeAccount412 = CustomerRet.IsUsingChargeAccount.GetValue()
                        End If
                        'Get value of IsUsingWithQB
                        if ( not CustomerRet.IsUsingWithQB is nothing) then
                                Dim IsUsingWithQB413 as Boolean
                                IsUsingWithQB413 = CustomerRet.IsUsingWithQB.GetValue()
                        End If
                        'Get value of IsRewardsMember
                        if ( not CustomerRet.IsRewardsMember is nothing) then
                                Dim IsRewardsMember414 as Boolean
                                IsRewardsMember414 = CustomerRet.IsRewardsMember.GetValue()
                        End If
                        'Get value of IsNoShipToBilling
                        if ( not CustomerRet.IsNoShipToBilling is nothing) then
                                Dim IsNoShipToBilling415 as Boolean
                                IsNoShipToBilling415 = CustomerRet.IsNoShipToBilling.GetValue()
                        End If
                        'Get value of LastName
                        if ( not CustomerRet.LastName is nothing) then
                                Dim LastName416 as String
                                LastName416 = CustomerRet.LastName.GetValue()
                        End If
                        'Get value of LastSale
                        if ( not CustomerRet.LastSale is nothing) then
                                Dim LastSale417 as DateTime
                                LastSale417 = CustomerRet.LastSale.GetValue()
                        End If
                        'Get value of Notes
                        if ( not CustomerRet.Notes is nothing) then
                                Dim Notes418 as String
                                Notes418 = CustomerRet.Notes.GetValue()
                        End If
                        'Get value of Phone
                        if ( not CustomerRet.Phone is nothing) then
                                Dim Phone419 as String
                                Phone419 = CustomerRet.Phone.GetValue()
                        End If
                        'Get value of Phone2
                        if ( not CustomerRet.Phone2 is nothing) then
                                Dim Phone2420 as String
                                Phone2420 = CustomerRet.Phone2.GetValue()
                        End If
                        'Get value of Phone3
                        if ( not CustomerRet.Phone3 is nothing) then
                                Dim Phone3421 as String
                                Phone3421 = CustomerRet.Phone3.GetValue()
                        End If
                        'Get value of Phone4
                        if ( not CustomerRet.Phone4 is nothing) then
                                Dim Phone4422 as String
                                Phone4422 = CustomerRet.Phone4.GetValue()
                        End If
                        'Get value of PriceLevelNumber
                        if ( not CustomerRet.PriceLevelNumber is nothing) then
                                Dim PriceLevelNumber423 as ENPriceLevelNumber
                                PriceLevelNumber423 = CustomerRet.PriceLevelNumber.GetValue()
                        End If
                        'Get value of Salutation
                        if ( not CustomerRet.Salutation is nothing) then
                                Dim Salutation424 as String
                                Salutation424 = CustomerRet.Salutation.GetValue()
                        End If
                        'Get value of StoreExchangeStatus
                        if ( not CustomerRet.StoreExchangeStatus is nothing) then
                                Dim StoreExchangeStatus425 as ENStoreExchangeStatus
                                StoreExchangeStatus425 = CustomerRet.StoreExchangeStatus.GetValue()
                        End If
                        'Get value of TaxCategory
                        if ( not CustomerRet.TaxCategory is nothing) then
                                Dim TaxCategory426 as String
                                TaxCategory426 = CustomerRet.TaxCategory.GetValue()
                        End If
                        'Get value of WebNumber
                        if ( not CustomerRet.WebNumber is nothing) then
                                Dim WebNumber427 as String
                                WebNumber427 = CustomerRet.WebNumber.GetValue()
                        End If
                        if (not CustomerRet.BillAddress is nothing) then
                                'Get value of City
                                if ( not CustomerRet.BillAddress.City is nothing) then
                                        Dim City428 as String
                                        City428 = CustomerRet.BillAddress.City.GetValue()
                                End If
                                'Get value of Country
                                if ( not CustomerRet.BillAddress.Country is nothing) then
                                        Dim Country429 as String
                                        Country429 = CustomerRet.BillAddress.Country.GetValue()
                                End If
                                'Get value of PostalCode
                                if ( not CustomerRet.BillAddress.PostalCode is nothing) then
                                        Dim PostalCode430 as String
                                        PostalCode430 = CustomerRet.BillAddress.PostalCode.GetValue()
                                End If
                                'Get value of State
                                if ( not CustomerRet.BillAddress.State is nothing) then
                                        Dim State431 as String
                                        State431 = CustomerRet.BillAddress.State.GetValue()
                                End If
                                'Get value of Street
                                if ( not CustomerRet.BillAddress.Street is nothing) then
                                        Dim Street432 as String
                                        Street432 = CustomerRet.BillAddress.Street.GetValue()
                                End If
                                'Get value of Street2
                                if ( not CustomerRet.BillAddress.Street2 is nothing) then
                                        Dim Street2433 as String
                                        Street2433 = CustomerRet.BillAddress.Street2.GetValue()
                                End If
                        End If
                        'Get value of DefaultShipAddress
                        if ( not CustomerRet.DefaultShipAddress is nothing) then
                                Dim DefaultShipAddress434 as String
                                DefaultShipAddress434 = CustomerRet.DefaultShipAddress.GetValue()
                        End If
                        if (not CustomerRet.ShipAddressList is nothing)
                                Dim i435 as Integer
                                for i435 = 0  to CustomerRet.ShipAddressList.Count - 1
                                        Dim ShipAddress as IShipAddress
                                        ShipAddress = CustomerRet.ShipAddressList.GetAt(i435)
                                        'Get value of AddressName
                                        if ( not ShipAddress.AddressName is nothing) then
                                                Dim AddressName436 as String
                                                AddressName436 = ShipAddress.AddressName.GetValue()
                                        End If
                                        'Get value of CompanyName
                                        if ( not ShipAddress.CompanyName is nothing) then
                                                Dim CompanyName437 as String
                                                CompanyName437 = ShipAddress.CompanyName.GetValue()
                                        End If
                                        'Get value of FullName
                                        if ( not ShipAddress.FullName is nothing) then
                                                Dim FullName438 as String
                                                FullName438 = ShipAddress.FullName.GetValue()
                                        End If
                                        'Get value of City
                                        if ( not ShipAddress.City is nothing) then
                                                Dim City439 as String
                                                City439 = ShipAddress.City.GetValue()
                                        End If
                                        'Get value of Country
                                        if ( not ShipAddress.Country is nothing) then
                                                Dim Country440 as String
                                                Country440 = ShipAddress.Country.GetValue()
                                        End If
                                        'Get value of PostalCode
                                        if ( not ShipAddress.PostalCode is nothing) then
                                                Dim PostalCode441 as String
                                                PostalCode441 = ShipAddress.PostalCode.GetValue()
                                        End If
                                        'Get value of State
                                        if ( not ShipAddress.State is nothing) then
                                                Dim State442 as String
                                                State442 = ShipAddress.State.GetValue()
                                        End If
                                        'Get value of Street
                                        if ( not ShipAddress.Street is nothing) then
                                                Dim Street443 as String
                                                Street443 = ShipAddress.Street.GetValue()
                                        End If
                                        'Get value of Street2
                                        if ( not ShipAddress.Street2 is nothing) then
                                                Dim Street2444 as String
                                                Street2444 = ShipAddress.Street2.GetValue()
                                        End If
                                Next i435
                        End If
                        if (not CustomerRet.RewardList is nothing)
                                Dim i445 as Integer
                                for i445 = 0  to CustomerRet.RewardList.Count - 1
                                        Dim Reward as IReward
                                        Reward = CustomerRet.RewardList.GetAt(i445)
                                        'Get value of RewardAmount
                                        if ( not Reward.RewardAmount is nothing) then
                                                Dim RewardAmount446 as Double
                                                RewardAmount446 = Reward.RewardAmount.GetValue()
                                        End If
                                        'Get value of RewardPercent
                                        if ( not Reward.RewardPercent is nothing) then
                                                Dim RewardPercent447 as Single
                                                RewardPercent447 = Reward.RewardPercent.GetValue()
                                        End If
                                        'Get value of EarnedDate
                                        if ( not Reward.EarnedDate is nothing) then
                                                Dim EarnedDate448 as DateTime
                                                EarnedDate448 = Reward.EarnedDate.GetValue()
                                        End If
                                        'Get value of MatureDate
                                        if ( not Reward.MatureDate is nothing) then
                                                Dim MatureDate449 as DateTime
                                                MatureDate449 = Reward.MatureDate.GetValue()
                                        End If
                                        'Get value of ExpirationDate
                                        if ( not Reward.ExpirationDate is nothing) then
                                                Dim ExpirationDate450 as DateTime
                                                ExpirationDate450 = Reward.ExpirationDate.GetValue()
                                        End If
                                Next i445
                        End If
                        if (not CustomerRet.DataExtRetList is nothing)
                                Dim i451 as Integer
                                for i451 = 0  to CustomerRet.DataExtRetList.Count - 1
                                        Dim DataExtRet as IDataExtRet
                                        DataExtRet = CustomerRet.DataExtRetList.GetAt(i451)
                                        'Get value of OwnerID
                                        Dim OwnerID452 as String
                                        OwnerID452 = DataExtRet.OwnerID.GetValue()
                                        'Get value of DataExtName
                                        Dim DataExtName453 as String
                                        DataExtName453 = DataExtRet.DataExtName.GetValue()
                                        'Get value of DataExtType
                                        Dim DataExtType454 as ENDataExtType
                                        DataExtType454 = DataExtRet.DataExtType.GetValue()
                                        'Get value of DataExtValue
                                        Dim DataExtValue455 as String
                                        DataExtValue455 = DataExtRet.DataExtValue.GetValue()
                                Next i451
                        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
//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 SampleCustomerQuery
        {
                public void  DoCustomerQuery()
                {
                        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;

                                BuildCustomerQueryRq(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;

                                WalkCustomerQueryRs(responseMsgSet);
                        }
                        catch (Exception e)
                        {
                                MessageBox.Show(e.Message, "Error");
                                if (sessionBegun)
                                {
                                        sessionManager.EndSession();
                                }
                                if (connectionOpen)
                                {
                                        sessionManager.CloseConnection();
                                }
                        }
                }
                void BuildCustomerQueryRq(IMsgSetRequest requestMsgSet)
                {
                        ICustomerQuery CustomerQueryRq= requestMsgSet.AppendCustomerQueryRq();
                        //Set attributes
                        //Set field value for metaData
                        CustomerQueryRq.metaData.SetValue(ENmetaData.mdMetaDataAndResponseData);
                        //Set field value for iterator
                        CustomerQueryRq.iterator.SetValue(ENiterator.itStart);
                        //Set field value for iteratorID
                        CustomerQueryRq.iteratorID.SetValue("{D7355385-A17B-4f5d-B34D-F34C79C3E6FC}");
                        //Set field value for MaxReturned
                        CustomerQueryRq.MaxReturned.SetValue(6);
                        //Set field value for OwnerIDList
                        //May create more than one of these if needed
                        CustomerQueryRq.OwnerIDList.Add(Guid.NewGuid().ToString());
                        //Set field value for ListID
                        CustomerQueryRq.ListID.SetValue("200000-1011023419");
                        string ORTimeCreatedFiltersElementType456 = "TimeCreatedFilter";
                        if (ORTimeCreatedFiltersElementType456 == "TimeCreatedFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                CustomerQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for TimeCreated
                                CustomerQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.TimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                        }
                        if (ORTimeCreatedFiltersElementType456 == "TimeCreatedRangeFilter")
                        {
                                //Set field value for FromTimeCreated
                                CustomerQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.FromTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                                //Set field value for ToTimeCreated
                                CustomerQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.ToTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                        }
                        string ORTimeModifiedFiltersElementType457 = "TimeModifiedFilter";
                        if (ORTimeModifiedFiltersElementType457 == "TimeModifiedFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                CustomerQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for TimeModified
                                CustomerQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.TimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                        }
                        if (ORTimeModifiedFiltersElementType457 == "TimeModifiedRangeFilter")
                        {
                                //Set field value for FromTimeModified
                                CustomerQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.FromTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                                //Set field value for ToTimeModified
                                CustomerQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.ToTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false);
                        }
                        string ORAccountBalanceFiltersElementType458 = "AccountBalanceFilter";
                        if (ORAccountBalanceFiltersElementType458 == "AccountBalanceFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                CustomerQueryRq.ORAccountBalanceFilters.AccountBalanceFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for AccountBalance
                                CustomerQueryRq.ORAccountBalanceFilters.AccountBalanceFilter.AccountBalance.SetValue(10.01);
                        }
                        if (ORAccountBalanceFiltersElementType458 == "AccountBalanceRangeFilter")
                        {
                                //Set field value for FromAccountBalance
                                CustomerQueryRq.ORAccountBalanceFilters.AccountBalanceRangeFilter.FromAccountBalance.SetValue(10.01);
                                //Set field value for ToAccountBalance
                                CustomerQueryRq.ORAccountBalanceFilters.AccountBalanceRangeFilter.ToAccountBalance.SetValue(10.01);
                        }
                        string ORAccountLimitFiltersElementType459 = "AccountLimitFilter";
                        if (ORAccountLimitFiltersElementType459 == "AccountLimitFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                CustomerQueryRq.ORAccountLimitFilters.AccountLimitFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for AccountLimit
                                CustomerQueryRq.ORAccountLimitFilters.AccountLimitFilter.AccountLimit.SetValue(10.01);
                        }
                        if (ORAccountLimitFiltersElementType459 == "AccountLimitRangeFilter")
                        {
                                //Set field value for FromAccountLimit
                                CustomerQueryRq.ORAccountLimitFilters.AccountLimitRangeFilter.FromAccountLimit.SetValue(10.01);
                                //Set field value for ToAccountLimit
                                CustomerQueryRq.ORAccountLimitFilters.AccountLimitRangeFilter.ToAccountLimit.SetValue(10.01);
                        }
                        string ORAmountPastDueFiltersElementType460 = "AmountPastDueFilter";
                        if (ORAmountPastDueFiltersElementType460 == "AmountPastDueFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                CustomerQueryRq.ORAmountPastDueFilters.AmountPastDueFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for AmountPastDue
                                CustomerQueryRq.ORAmountPastDueFilters.AmountPastDueFilter.AmountPastDue.SetValue(10.01);
                        }
                        if (ORAmountPastDueFiltersElementType460 == "AmountPastDueRangeFilter")
                        {
                                //Set field value for FromAmountPastDue
                                CustomerQueryRq.ORAmountPastDueFilters.AmountPastDueRangeFilter.FromAmountPastDue.SetValue(10.01);
                                //Set field value for ToAmountPastDue
                                CustomerQueryRq.ORAmountPastDueFilters.AmountPastDueRangeFilter.ToAmountPastDue.SetValue(10.01);
                        }
                        string ORCompanyNameFiltersElementType461 = "CompanyNameFilter";
                        if (ORCompanyNameFiltersElementType461 == "CompanyNameFilter")
                        {
                                //Set field value for MatchStringCriterion
                                CustomerQueryRq.ORCompanyNameFilters.CompanyNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for CompanyName
                                CustomerQueryRq.ORCompanyNameFilters.CompanyNameFilter.CompanyName.SetValue("ab");
                        }
                        if (ORCompanyNameFiltersElementType461 == "CompanyNameRangeFilter")
                        {
                                //Set field value for FromCompanyName
                                CustomerQueryRq.ORCompanyNameFilters.CompanyNameRangeFilter.FromCompanyName.SetValue("ab");
                                //Set field value for ToCompanyName
                                CustomerQueryRq.ORCompanyNameFilters.CompanyNameRangeFilter.ToCompanyName.SetValue("ab");
                        }
                        string ORCustomerIDFiltersElementType462 = "CustomerIDFilter";
                        if (ORCustomerIDFiltersElementType462 == "CustomerIDFilter")
                        {
                                //Set field value for MatchStringCriterion
                                CustomerQueryRq.ORCustomerIDFilters.CustomerIDFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for CustomerID
                                CustomerQueryRq.ORCustomerIDFilters.CustomerIDFilter.CustomerID.SetValue("ab");
                        }
                        if (ORCustomerIDFiltersElementType462 == "CustomerIDRangeFilter")
                        {
                                //Set field value for FromCustomerID
                                CustomerQueryRq.ORCustomerIDFilters.CustomerIDRangeFilter.FromCustomerID.SetValue("ab");
                                //Set field value for ToCustomerID
                                CustomerQueryRq.ORCustomerIDFilters.CustomerIDRangeFilter.ToCustomerID.SetValue("ab");
                        }
                        string ORCustomerDiscPercentFiltersElementType463 = "CustomerDiscPercentFilter";
                        if (ORCustomerDiscPercentFiltersElementType463 == "CustomerDiscPercentFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                CustomerQueryRq.ORCustomerDiscPercentFilters.CustomerDiscPercentFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for CustomerDiscPercent
                                CustomerQueryRq.ORCustomerDiscPercentFilters.CustomerDiscPercentFilter.CustomerDiscPercent.SetValue(12.34F);
                        }
                        if (ORCustomerDiscPercentFiltersElementType463 == "CustomerDiscPercentRangeFilter")
                        {
                                //Set field value for FromCustomerDiscPercent
                                CustomerQueryRq.ORCustomerDiscPercentFilters.CustomerDiscPercentRangeFilter.FromCustomerDiscPercent.SetValue(12.34F);
                                //Set field value for ToCustomerDiscPercent
                                CustomerQueryRq.ORCustomerDiscPercentFilters.CustomerDiscPercentRangeFilter.ToCustomerDiscPercent.SetValue(12.34F);
                        }
                        //Set field value for CustomerDiscType
                        CustomerQueryRq.CustomerDiscType.SetValue(ENCustomerDiscType.cdtNone);
                        string ORCustomerTypeFiltersElementType464 = "CustomerTypeFilter";
                        if (ORCustomerTypeFiltersElementType464 == "CustomerTypeFilter")
                        {
                                //Set field value for MatchStringCriterion
                                CustomerQueryRq.ORCustomerTypeFilters.CustomerTypeFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for CustomerType
                                CustomerQueryRq.ORCustomerTypeFilters.CustomerTypeFilter.CustomerType.SetValue("ab");
                        }
                        if (ORCustomerTypeFiltersElementType464 == "CustomerTypeRangeFilter")
                        {
                                //Set field value for FromCustomerType
                                CustomerQueryRq.ORCustomerTypeFilters.CustomerTypeRangeFilter.FromCustomerType.SetValue("ab");
                                //Set field value for ToCustomerType
                                CustomerQueryRq.ORCustomerTypeFilters.CustomerTypeRangeFilter.ToCustomerType.SetValue("ab");
                        }
                        string OREMailFiltersElementType465 = "EMailFilter";
                        if (OREMailFiltersElementType465 == "EMailFilter")
                        {
                                //Set field value for MatchStringCriterion
                                CustomerQueryRq.OREMailFilters.EMailFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for EMail
                                CustomerQueryRq.OREMailFilters.EMailFilter.EMail.SetValue("ab");
                        }
                        if (OREMailFiltersElementType465 == "EMailRangeFilter")
                        {
                                //Set field value for FromEMail
                                CustomerQueryRq.OREMailFilters.EMailRangeFilter.FromEMail.SetValue("ab");
                                //Set field value for ToEMail
                                CustomerQueryRq.OREMailFilters.EMailRangeFilter.ToEMail.SetValue("ab");
                        }
                        string ORFirstNameFiltersElementType466 = "FirstNameFilter";
                        if (ORFirstNameFiltersElementType466 == "FirstNameFilter")
                        {
                                //Set field value for MatchStringCriterion
                                CustomerQueryRq.ORFirstNameFilters.FirstNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for FirstName
                                CustomerQueryRq.ORFirstNameFilters.FirstNameFilter.FirstName.SetValue("ab");
                        }
                        if (ORFirstNameFiltersElementType466 == "FirstNameRangeFilter")
                        {
                                //Set field value for FromFirstName
                                CustomerQueryRq.ORFirstNameFilters.FirstNameRangeFilter.FromFirstName.SetValue("ab");
                                //Set field value for ToFirstName
                                CustomerQueryRq.ORFirstNameFilters.FirstNameRangeFilter.ToFirstName.SetValue("ab");
                        }
                        //Set field value for IsAcceptingChecks
                        CustomerQueryRq.IsAcceptingChecks.SetValue(true);
                        //Set field value for IsUsingChargeAccount
                        CustomerQueryRq.IsUsingChargeAccount.SetValue(true);
                        //Set field value for IsUsingWithQB
                        CustomerQueryRq.IsUsingWithQB.SetValue(true);
                        //Set field value for IsRewardsMember
                        CustomerQueryRq.IsRewardsMember.SetValue(true);
                        //Set field value for IsNoShipToBilling
                        CustomerQueryRq.IsNoShipToBilling.SetValue(true);
                        string ORLastNameFiltersElementType467 = "LastNameFilter";
                        if (ORLastNameFiltersElementType467 == "LastNameFilter")
                        {
                                //Set field value for MatchStringCriterion
                                CustomerQueryRq.ORLastNameFilters.LastNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for LastName
                                CustomerQueryRq.ORLastNameFilters.LastNameFilter.LastName.SetValue("ab");
                        }
                        if (ORLastNameFiltersElementType467 == "LastNameRangeFilter")
                        {
                                //Set field value for FromLastName
                                CustomerQueryRq.ORLastNameFilters.LastNameRangeFilter.FromLastName.SetValue("ab");
                                //Set field value for ToLastName
                                CustomerQueryRq.ORLastNameFilters.LastNameRangeFilter.ToLastName.SetValue("ab");
                        }
                        string ORLastSaleFiltersElementType468 = "LastSaleFilter";
                        if (ORLastSaleFiltersElementType468 == "LastSaleFilter")
                        {
                                //Set field value for MatchNumericCriterion
                                CustomerQueryRq.ORLastSaleFilters.LastSaleFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan);
                                //Set field value for LastSale
                                CustomerQueryRq.ORLastSaleFilters.LastSaleFilter.LastSale.SetValue(DateTime.Parse("12/15/2007"));
                        }
                        if (ORLastSaleFiltersElementType468 == "LastSaleRangeFilter")
                        {
                                //Set field value for FromLastSale
                                CustomerQueryRq.ORLastSaleFilters.LastSaleRangeFilter.FromLastSale.SetValue(DateTime.Parse("12/15/2007"));
                                //Set field value for ToLastSale
                                CustomerQueryRq.ORLastSaleFilters.LastSaleRangeFilter.ToLastSale.SetValue(DateTime.Parse("12/15/2007"));
                        }
                        string ORNotesFiltersElementType469 = "NotesFilter";
                        if (ORNotesFiltersElementType469 == "NotesFilter")
                        {
                                //Set field value for MatchStringCriterion
                                CustomerQueryRq.ORNotesFilters.NotesFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for Notes
                                CustomerQueryRq.ORNotesFilters.NotesFilter.Notes.SetValue("ab");
                        }
                        if (ORNotesFiltersElementType469 == "NotesRangeFilter")
                        {
                                //Set field value for FromNotes
                                CustomerQueryRq.ORNotesFilters.NotesRangeFilter.FromNotes.SetValue("ab");
                                //Set field value for ToNotes
                                CustomerQueryRq.ORNotesFilters.NotesRangeFilter.ToNotes.SetValue("ab");
                        }
                        string ORPhoneFiltersElementType470 = "PhoneFilter";
                        if (ORPhoneFiltersElementType470 == "PhoneFilter")
                        {
                                //Set field value for MatchStringCriterion
                                CustomerQueryRq.ORPhoneFilters.PhoneFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for Phone
                                CustomerQueryRq.ORPhoneFilters.PhoneFilter.Phone.SetValue("ab");
                        }
                        if (ORPhoneFiltersElementType470 == "PhoneRangeFilter")
                        {
                                //Set field value for FromPhone
                                CustomerQueryRq.ORPhoneFilters.PhoneRangeFilter.FromPhone.SetValue("ab");
                                //Set field value for ToPhone
                                CustomerQueryRq.ORPhoneFilters.PhoneRangeFilter.ToPhone.SetValue("ab");
                        }
                        string ORPhone2FiltersElementType471 = "Phone2Filter";
                        if (ORPhone2FiltersElementType471 == "Phone2Filter")
                        {
                                //Set field value for MatchStringCriterion
                                CustomerQueryRq.ORPhone2Filters.Phone2Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for Phone2
                                CustomerQueryRq.ORPhone2Filters.Phone2Filter.Phone2.SetValue("ab");
                        }
                        if (ORPhone2FiltersElementType471 == "Phone2RangeFilter")
                        {
                                //Set field value for FromPhone2
                                CustomerQueryRq.ORPhone2Filters.Phone2RangeFilter.FromPhone2.SetValue("ab");
                                //Set field value for ToPhone2
                                CustomerQueryRq.ORPhone2Filters.Phone2RangeFilter.ToPhone2.SetValue("ab");
                        }
                        string ORPhone3FiltersElementType472 = "Phone3Filter";
                        if (ORPhone3FiltersElementType472 == "Phone3Filter")
                        {
                                //Set field value for MatchStringCriterion
                                CustomerQueryRq.ORPhone3Filters.Phone3Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for Phone3
                                CustomerQueryRq.ORPhone3Filters.Phone3Filter.Phone3.SetValue("ab");
                        }
                        if (ORPhone3FiltersElementType472 == "Phone3RangeFilter")
                        {
                                //Set field value for FromPhone3
                                CustomerQueryRq.ORPhone3Filters.Phone3RangeFilter.FromPhone3.SetValue("ab");
                                //Set field value for ToPhone3
                                CustomerQueryRq.ORPhone3Filters.Phone3RangeFilter.ToPhone3.SetValue("ab");
                        }
                        string ORPhone4FiltersElementType473 = "Phone4Filter";
                        if (ORPhone4FiltersElementType473 == "Phone4Filter")
                        {
                                //Set field value for MatchStringCriterion
                                CustomerQueryRq.ORPhone4Filters.Phone4Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for Phone4
                                CustomerQueryRq.ORPhone4Filters.Phone4Filter.Phone4.SetValue("ab");
                        }
                        if (ORPhone4FiltersElementType473 == "Phone4RangeFilter")
                        {
                                //Set field value for FromPhone4
                                CustomerQueryRq.ORPhone4Filters.Phone4RangeFilter.FromPhone4.SetValue("ab");
                                //Set field value for ToPhone4
                                CustomerQueryRq.ORPhone4Filters.Phone4RangeFilter.ToPhone4.SetValue("ab");
                        }
                        //Set field value for PriceLevelNumber
                        CustomerQueryRq.PriceLevelNumber.SetValue(ENPriceLevelNumber.pln1);
                        string ORSalutationFiltersElementType474 = "SalutationFilter";
                        if (ORSalutationFiltersElementType474 == "SalutationFilter")
                        {
                                //Set field value for MatchStringCriterion
                                CustomerQueryRq.ORSalutationFilters.SalutationFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for Salutation
                                CustomerQueryRq.ORSalutationFilters.SalutationFilter.Salutation.SetValue("ab");
                        }
                        if (ORSalutationFiltersElementType474 == "SalutationRangeFilter")
                        {
                                //Set field value for FromSalutation
                                CustomerQueryRq.ORSalutationFilters.SalutationRangeFilter.FromSalutation.SetValue("ab");
                                //Set field value for ToSalutation
                                CustomerQueryRq.ORSalutationFilters.SalutationRangeFilter.ToSalutation.SetValue("ab");
                        }
                        //Set field value for StoreExchangeStatus
                        CustomerQueryRq.StoreExchangeStatus.SetValue(ENStoreExchangeStatus.sesModified);
                        string ORTaxCategoryFiltersElementType475 = "TaxCategoryFilter";
                        if (ORTaxCategoryFiltersElementType475 == "TaxCategoryFilter")
                        {
                                //Set field value for MatchStringCriterion
                                CustomerQueryRq.ORTaxCategoryFilters.TaxCategoryFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for TaxCategory
                                CustomerQueryRq.ORTaxCategoryFilters.TaxCategoryFilter.TaxCategory.SetValue("ab");
                        }
                        if (ORTaxCategoryFiltersElementType475 == "TaxCategoryRangeFilter")
                        {
                                //Set field value for FromTaxCategory
                                CustomerQueryRq.ORTaxCategoryFilters.TaxCategoryRangeFilter.FromTaxCategory.SetValue("ab");
                                //Set field value for ToTaxCategory
                                CustomerQueryRq.ORTaxCategoryFilters.TaxCategoryRangeFilter.ToTaxCategory.SetValue("ab");
                        }
                        string ORWebNumberFiltersElementType476 = "WebNumberFilter";
                        if (ORWebNumberFiltersElementType476 == "WebNumberFilter")
                        {
                                //Set field value for MatchStringCriterion
                                CustomerQueryRq.ORWebNumberFilters.WebNumberFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual);
                                //Set field value for WebNumber
                                CustomerQueryRq.ORWebNumberFilters.WebNumberFilter.WebNumber.SetValue("ab");
                        }
                        if (ORWebNumberFiltersElementType476 == "WebNumberRangeFilter")
                        {
                                //Set field value for FromWebNumber
                                CustomerQueryRq.ORWebNumberFilters.WebNumberRangeFilter.FromWebNumber.SetValue("ab");
                                //Set field value for ToWebNumber
                                CustomerQueryRq.ORWebNumberFilters.WebNumberRangeFilter.ToWebNumber.SetValue("ab");
                        }
                        //Set field value for IncludeRetElementList
                        //May create more than one of these if needed
                        CustomerQueryRq.IncludeRetElementList.Add("ab");
                }




                void WalkCustomerQueryRs(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.rtCustomerQueryRs)
                                                {
                                                        //upcast to more specific type here, this is safe because we checked with response.Type check above
                                                        ICustomerRetList CustomerRet = (ICustomerRetList)response.Detail;
                                                        for(int z=0; z < CustomerRet.Count; z++)
                                                        {
                                                                WalkCustomerRet(CustomerRet.GetAt(z));
                                                        }
                                                }
                                        }
                                }
                        }
                }




                void WalkCustomerRet(ICustomerRet CustomerRet)
                {
                        if (CustomerRet == null) return;
                        //Go through all the elements of ICustomerRetList
                        //Get value of ListID
                        if (CustomerRet.ListID != null)
                        {
                                string ListID477 = (string)CustomerRet.ListID.GetValue();
                        }
                        //Get value of TimeCreated
                        if (CustomerRet.TimeCreated != null)
                        {
                                DateTime TimeCreated478 = (DateTime)CustomerRet.TimeCreated.GetValue();
                        }
                        //Get value of TimeModified
                        if (CustomerRet.TimeModified != null)
                        {
                                DateTime TimeModified479 = (DateTime)CustomerRet.TimeModified.GetValue();
                        }
                        //Get value of AccountBalance
                        if (CustomerRet.AccountBalance != null)
                        {
                                double AccountBalance480 = (double)CustomerRet.AccountBalance.GetValue();
                        }
                        //Get value of AccountLimit
                        if (CustomerRet.AccountLimit != null)
                        {
                                double AccountLimit481 = (double)CustomerRet.AccountLimit.GetValue();
                        }
                        //Get value of AmountPastDue
                        if (CustomerRet.AmountPastDue != null)
                        {
                                double AmountPastDue482 = (double)CustomerRet.AmountPastDue.GetValue();
                        }
                        //Get value of CompanyName
                        if (CustomerRet.CompanyName != null)
                        {
                                string CompanyName483 = (string)CustomerRet.CompanyName.GetValue();
                        }
                        //Get value of CustomerID
                        if (CustomerRet.CustomerID != null)
                        {
                                string CustomerID484 = (string)CustomerRet.CustomerID.GetValue();
                        }
                        //Get value of CustomerDiscPercent
                        if (CustomerRet.CustomerDiscPercent != null)
                        {
                                float CustomerDiscPercent485 = (float)CustomerRet.CustomerDiscPercent.GetValue();
                        }
                        //Get value of CustomerDiscType
                        if (CustomerRet.CustomerDiscType != null)
                        {
                                ENCustomerDiscType CustomerDiscType486 = (ENCustomerDiscType)CustomerRet.CustomerDiscType.GetValue();
                        }
                        //Get value of CustomerType
                        if (CustomerRet.CustomerType != null)
                        {
                                string CustomerType487 = (string)CustomerRet.CustomerType.GetValue();
                        }
                        //Get value of EMail
                        if (CustomerRet.EMail != null)
                        {
                                string EMail488 = (string)CustomerRet.EMail.GetValue();
                        }
                        //Get value of IsOkToEMail
                        if (CustomerRet.IsOkToEMail != null)
                        {
                                bool IsOkToEMail489 = (bool)CustomerRet.IsOkToEMail.GetValue();
                        }
                        //Get value of FirstName
                        if (CustomerRet.FirstName != null)
                        {
                                string FirstName490 = (string)CustomerRet.FirstName.GetValue();
                        }
                        //Get value of FullName
                        if (CustomerRet.FullName != null)
                        {
                                string FullName491 = (string)CustomerRet.FullName.GetValue();
                        }
                        //Get value of IsAcceptingChecks
                        if (CustomerRet.IsAcceptingChecks != null)
                        {
                                bool IsAcceptingChecks492 = (bool)CustomerRet.IsAcceptingChecks.GetValue();
                        }
                        //Get value of IsUsingChargeAccount
                        if (CustomerRet.IsUsingChargeAccount != null)
                        {
                                bool IsUsingChargeAccount493 = (bool)CustomerRet.IsUsingChargeAccount.GetValue();
                        }
                        //Get value of IsUsingWithQB
                        if (CustomerRet.IsUsingWithQB != null)
                        {
                                bool IsUsingWithQB494 = (bool)CustomerRet.IsUsingWithQB.GetValue();
                        }
                        //Get value of IsRewardsMember
                        if (CustomerRet.IsRewardsMember != null)
                        {
                                bool IsRewardsMember495 = (bool)CustomerRet.IsRewardsMember.GetValue();
                        }
                        //Get value of IsNoShipToBilling
                        if (CustomerRet.IsNoShipToBilling != null)
                        {
                                bool IsNoShipToBilling496 = (bool)CustomerRet.IsNoShipToBilling.GetValue();
                        }
                        //Get value of LastName
                        if (CustomerRet.LastName != null)
                        {
                                string LastName497 = (string)CustomerRet.LastName.GetValue();
                        }
                        //Get value of LastSale
                        if (CustomerRet.LastSale != null)
                        {
                                DateTime LastSale498 = (DateTime)CustomerRet.LastSale.GetValue();
                        }
                        //Get value of Notes
                        if (CustomerRet.Notes != null)
                        {
                                string Notes499 = (string)CustomerRet.Notes.GetValue();
                        }
                        //Get value of Phone
                        if (CustomerRet.Phone != null)
                        {
                                string Phone500 = (string)CustomerRet.Phone.GetValue();
                        }
                        //Get value of Phone2
                        if (CustomerRet.Phone2 != null)
                        {
                                string Phone2501 = (string)CustomerRet.Phone2.GetValue();
                        }
                        //Get value of Phone3
                        if (CustomerRet.Phone3 != null)
                        {
                                string Phone3502 = (string)CustomerRet.Phone3.GetValue();
                        }
                        //Get value of Phone4
                        if (CustomerRet.Phone4 != null)
                        {
                                string Phone4503 = (string)CustomerRet.Phone4.GetValue();
                        }
                        //Get value of PriceLevelNumber
                        if (CustomerRet.PriceLevelNumber != null)
                        {
                                ENPriceLevelNumber PriceLevelNumber504 = (ENPriceLevelNumber)CustomerRet.PriceLevelNumber.GetValue();
                        }
                        //Get value of Salutation
                        if (CustomerRet.Salutation != null)
                        {
                                string Salutation505 = (string)CustomerRet.Salutation.GetValue();
                        }
                        //Get value of StoreExchangeStatus
                        if (CustomerRet.StoreExchangeStatus != null)
                        {
                                ENStoreExchangeStatus StoreExchangeStatus506 = (ENStoreExchangeStatus)CustomerRet.StoreExchangeStatus.GetValue();
                        }
                        //Get value of TaxCategory
                        if (CustomerRet.TaxCategory != null)
                        {
                                string TaxCategory507 = (string)CustomerRet.TaxCategory.GetValue();
                        }
                        //Get value of WebNumber
                        if (CustomerRet.WebNumber != null)
                        {
                                string WebNumber508 = (string)CustomerRet.WebNumber.GetValue();
                        }
                        if (CustomerRet.BillAddress != null)
                        {
                                //Get value of City
                                if (CustomerRet.BillAddress.City != null)
                                {
                                        string City509 = (string)CustomerRet.BillAddress.City.GetValue();
                                }
                                //Get value of Country
                                if (CustomerRet.BillAddress.Country != null)
                                {
                                        string Country510 = (string)CustomerRet.BillAddress.Country.GetValue();
                                }
                                //Get value of PostalCode
                                if (CustomerRet.BillAddress.PostalCode != null)
                                {
                                        string PostalCode511 = (string)CustomerRet.BillAddress.PostalCode.GetValue();
                                }
                                //Get value of State
                                if (CustomerRet.BillAddress.State != null)
                                {
                                        string State512 = (string)CustomerRet.BillAddress.State.GetValue();
                                }
                                //Get value of Street
                                if (CustomerRet.BillAddress.Street != null)
                                {
                                        string Street513 = (string)CustomerRet.BillAddress.Street.GetValue();
                                }
                                //Get value of Street2
                                if (CustomerRet.BillAddress.Street2 != null)
                                {
                                        string Street2514 = (string)CustomerRet.BillAddress.Street2.GetValue();
                                }
                        }
                        //Get value of DefaultShipAddress
                        if (CustomerRet.DefaultShipAddress != null)
                        {
                                string DefaultShipAddress515 = (string)CustomerRet.DefaultShipAddress.GetValue();
                        }
                        if (CustomerRet.ShipAddressList != null)
                        {
                                for (int i516 = 0; i516 < CustomerRet.ShipAddressList.Count; i516++)
                                {
                                        IShipAddress ShipAddress = CustomerRet.ShipAddressList.GetAt(i516);
                                        //Get value of AddressName
                                        if (ShipAddress.AddressName != null)
                                        {
                                                string AddressName517 = (string)ShipAddress.AddressName.GetValue();
                                        }
                                        //Get value of CompanyName
                                        if (ShipAddress.CompanyName != null)
                                        {
                                                string CompanyName518 = (string)ShipAddress.CompanyName.GetValue();
                                        }
                                        //Get value of FullName
                                        if (ShipAddress.FullName != null)
                                        {
                                                string FullName519 = (string)ShipAddress.FullName.GetValue();
                                        }
                                        //Get value of City
                                        if (ShipAddress.City != null)
                                        {
                                                string City520 = (string)ShipAddress.City.GetValue();
                                        }
                                        //Get value of Country
                                        if (ShipAddress.Country != null)
                                        {
                                                string Country521 = (string)ShipAddress.Country.GetValue();
                                        }
                                        //Get value of PostalCode
                                        if (ShipAddress.PostalCode != null)
                                        {
                                                string PostalCode522 = (string)ShipAddress.PostalCode.GetValue();
                                        }
                                        //Get value of State
                                        if (ShipAddress.State != null)
                                        {
                                                string State523 = (string)ShipAddress.State.GetValue();
                                        }
                                        //Get value of Street
                                        if (ShipAddress.Street != null)
                                        {
                                                string Street524 = (string)ShipAddress.Street.GetValue();
                                        }
                                        //Get value of Street2
                                        if (ShipAddress.Street2 != null)
                                        {
                                                string Street2525 = (string)ShipAddress.Street2.GetValue();
                                        }
                                }
                        }
                        if (CustomerRet.RewardList != null)
                        {
                                for (int i526 = 0; i526 < CustomerRet.RewardList.Count; i526++)
                                {
                                        IReward Reward = CustomerRet.RewardList.GetAt(i526);
                                        //Get value of RewardAmount
                                        if (Reward.RewardAmount != null)
                                        {
                                                double RewardAmount527 = (double)Reward.RewardAmount.GetValue();
                                        }
                                        //Get value of RewardPercent
                                        if (Reward.RewardPercent != null)
                                        {
                                                float RewardPercent528 = (float)Reward.RewardPercent.GetValue();
                                        }
                                        //Get value of EarnedDate
                                        if (Reward.EarnedDate != null)
                                        {
                                                DateTime EarnedDate529 = (DateTime)Reward.EarnedDate.GetValue();
                                        }
                                        //Get value of MatureDate
                                        if (Reward.MatureDate != null)
                                        {
                                                DateTime MatureDate530 = (DateTime)Reward.MatureDate.GetValue();
                                        }
                                        //Get value of ExpirationDate
                                        if (Reward.ExpirationDate != null)
                                        {
                                                DateTime ExpirationDate531 = (DateTime)Reward.ExpirationDate.GetValue();
                                        }
                                }
                        }
                        if (CustomerRet.DataExtRetList != null)
                        {
                                for (int i532 = 0; i532 < CustomerRet.DataExtRetList.Count; i532++)
                                {
                                        IDataExtRet DataExtRet = CustomerRet.DataExtRetList.GetAt(i532);
                                        //Get value of OwnerID
                                        string OwnerID533 = (string)DataExtRet.OwnerID.GetValue();
                                        //Get value of DataExtName
                                        string DataExtName534 = (string)DataExtRet.DataExtName.GetValue();
                                        //Get value of DataExtType
                                        ENDataExtType DataExtType535 = (ENDataExtType)DataExtRet.DataExtType.GetValue();
                                        //Get value of DataExtValue
                                        string DataExtValue536 = (string)DataExtRet.DataExtValue.GetValue();
                                }
                        }
                }




        }
}