Customer Class
Properties Methods Events Configuration Settings Errors
A Customer is anyone who buys goods or services from the QuickBooks company.
Syntax
InQBCustomer
InQBCustomerSwift
Remarks
A Customer is anyone who buys goods or services from the QuickBooks company. A Customer may also be used to represent a sub-customer or Job.
Required Fields (Add): CustomerName
Supported Methods: Add, Update (contact info only), Get (Id/Name), Delete
Example (Adding a customer to QuickBooks)
Customer1.CustomerName = "John Doe" Customer1.Add()Contact Information: Contact information may be added, retrieved, or changed. The key property is CustomerName. CompanyName, ContactName, and AltContactName may be used to specify additional names/contacts for the customer. BillingAddress, ShippingAddress, Fax, Email, Phone, and AltPhone may all be set or changed as well.
Categorization and Financial Information: the following properties are not used in Update operations, and may only be modified from within the QuickBooks UI.
CustomerType* | The type of customer: residential, commercial, etc. |
SalesRep* | A sales rep for the customer. |
TaxItem*, TaxCode* | Taxation information for the customer. |
Terms* | Terms on which the customer will be billed. |
Tracking Customer Balances:
The Customer class may be used to track the outstanding balances of customers. After invoking Get, simply inspect the Balance property;. The ObjSearch class can be used to find unpaid and paid Invoices tied to this customer.
When a customer is added to QuickBooks, the CreditLimit may be set, and the OpeningBalance (special field) may be set, if there is one. Once a customer is added to QuickBooks, there is no way to modify Balance directly! Instead, Invoices or CreditMemos should be added referencing this customer.
Sub-Customers (Jobs)
QuickBooks allows the user to define customers hierarchically. This allows the QuickBooks user to track transactions involving the Job separately.
To add a job to QuickBooks, set the Parent* property to the parent customer. Then, detailed job information may be provided using Config. When a job is retrieved from QuickBooks, Parent* will refer to the parent customer.
Property List
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
- accountNumber | Account number for this entity. |
- altContactName | Alternate contact person for entity. |
- altPhone | Alternate phone number of entity. |
- balance | Money owed by this Customer , including sub-customers. |
- billingAddress | Billing address for customer. |
- companyName | Company name of customer or vendor. |
- contactName | Contact person for a customer or vendor. |
- creditCardAddress | The address associated with the Number on file for this customer. |
- creditCardExpMonth | The expiration month associated with the Number on file for this customer. |
- creditCardExpYear | The expiration year associated with the Number on file for this customer. |
- creditCardNameOnCard | The name as it appears on the customer's credit card Number . |
- creditCardNumber | The credit card number on file for this customer. |
- creditCardPostalCode | The postal code associated with the Address and Number on file for this customer. |
- creditLimit | Credit limit for this entity. |
- customerName | Customer's name. |
- customerTypeId | Reference to type of customer. |
- customerTypeName | Reference to type of customer. |
Email address of entity. | |
- fax | Fax number of entity. |
- isActive | Whether or not entity is active. |
- notes | Notes for this transaction. |
- parentId | Reference to parent Customer . |
- parentName | Reference to parent Customer . |
- phone | Phone number of entity. |
- QBConnectionString | An aggregate consisting of various QuickBooks connection properties. |
- QBRequestAggregate | The request aggregate. |
- QBRequestId | The Id of the next message to be sent to QuickBooks. |
- QBRequestMode | Defines whether the request is made online or stored offline. |
- QBResponseAggregate | The last QBXML response aggregate received from QuickBooks. |
- QBXMLVersion | The version of QBXML used in the outgoing message. |
- refId | An alphanumerical identifier generated by the server. |
- resaleNumber | Resale number. |
- salesRepId | Reference to (initials of) sales rep. |
- salesRepName | Reference to (initials of) sales rep. |
- shippingAddress | Shipping address for customer. |
- taxCodeId | Whether or not transactions with customer are taxable. |
- taxCodeName | Whether or not transactions with customer are taxable. |
- taxItemId | Reference to detailed taxation information. |
- taxItemName | Reference to detailed taxation information. |
- termsId | Reference to terms of payment. |
- termsName | Reference to terms of payment. |
Method List
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
- add | Adds the record into QuickBooks. |
- checkRequestStatus | Checks whether or not the specified request was processed by QuickBooks. |
- closeQBConnection | Closes a persistent connection to QuickBooks. |
- config | Sets or retrieves a configuration setting. |
- delete | Deletes the record from QuickBooks. |
- get | Gets a single record from QuickBooks. |
- getByName | Gets a single record from QuickBooks. |
- getCustomField | Gets a custom field value from QuickBooks. |
- importQBXML | Imports a QBXML response aggregate. |
- openQBConnection | Opens a persistent connection to QuickBooks. |
- reset | Resets all properties to their defaults. |
- setCustomField | Sets a custom field value within QuickBooks. |
- update | Updates the entity object in QuickBooks. |
Event List
The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.
- onError | Information about errors during data delivery. |
- onSSLServerAuthentication | Fired after the server presents its certificate to the client. |
- onSSLStatus | Shows the progress of the secure connection. |
- onStatus | Shows the progress of the QuickBooks connection. |
- onWarning | Fired when a warning occurs. |
Configuration Settings
The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.
AdditionalContactRefContactName[i] | The name of the additional contact reference. |
AdditionalContactRefContactValue[i] | The value of the additional contact reference. |
AdditionalContactRefCount | The count of additional contact references returned. |
AppendAfter | Appends an XML tag after the specified QBXML element. |
AuthFlags | Connection Flags (use for QuickBooks Simple Start). |
CurrencyId | The type of currency to use. |
CurrencyName | The type of currency to use. |
EditSequence | An identifier for this copy of the object. |
EnforceMaxLength | Indicates whether to enforce max lengths for QB Fields. |
FirstName | A first name. |
FullName | The name of the customer. |
GetHighestVersion | Highest QBXMLVersion supported by the installed instance of QuickBooks. |
GetRequestProcessorDLLVersion | Returns the version of the QB Request Processor that is installed on your system. |
GetSupportedVersions | Returns a list of QBXMLVersions that are supported by QuickBooks. |
IncludePreferredDeliveryMethod | Whether to include the preferred delivery method. |
IsActive | Indicates whether the object is currently enabled for use by QuickBooks. |
IsReadOnly | This causes the QuickBooks authorization dialog to display text informing the user that its access will be read-only. |
JobDescription | Description of the job. |
JobEndDate | Actual end date of the job, YYYY-MM-DD. |
JobProjectedEndDate | Projected end date of the job, YYYY-MM-DD. |
JobStartDate | Start date of the job, YYYY-MM-DD. |
JobStatus | The status of the job. |
JobTypeId | Reference to the type of job. |
JobTypeName | Reference to the type of job. |
LastName | A last name. |
MiddleInitial | A middle initial. |
NonInclusiveBalance | The Balance of the Customer, not including sub-customers. |
OpeningBalance | The opening balance for the customer or vendor. Not used in Update operations. |
OpeningBalanceDate | The opening balance date for the customer or vendor. Not used in Update operations. |
PersonalDataPref | Whether the connecting application will require access to personal data such as SSN or credit card information. |
PreferredDeliveryMethod | The preferred delivery method. |
PreferredPaymentMethodId | The preferred method of payment. |
PreferredPaymentMethodName | The preferred method of payment. |
PriceLevelId | Reference to a price level for the customer. |
PriceLevelName | Reference to a price level for the customer. |
QBConnectionMode | The mode of connection to QuickBooks. |
QBFileStatus | The status of the company file as it pertains to accepting connections. |
QBOpenCompanyFile | The file currently open in QuickBooks. |
Salutation | A salutation, such as Mr., Mrs., etc. |
SendRawXML | Sends specified XML to quickbooks without modification. |
SeparateContact | A contact person other than the person specified by Salutation, FirstName, MiddleInitial, and LastName. |
ShipToAddressAggregate | A list of all shipping addresses associated with a customer. |
ShipToAddressCount | A count of all shipping addresses associated with a customer. |
SSLAcceptServerCert | The SSL certificate being used by the Remote Connector. |
SSLAcceptServerCertFile | The SSL certificate file being used by the Remote Connector. |
StopOnError | Specifies how QuickBooks is to proceed if an error occurs in processing of the current request. |
Sublevel | The number of ancestors this Customer has. |
TimeCreated | The time the object was created. |
TimeModified | The time the object was created. |
UnattendedModePref | Whether connecting while QuickBooks is closed is required or optional for the user. |
WarningCodes | A comma-separated list of QuickBooks warning codes that should not result in an exception. |
BuildInfo | Information about the product's build. |
CodePage | The system code page used for Unicode to Multibyte translations. |
LicenseInfo | Information about the current license. |
ProcessIdleEvents | Whether the class uses its internal event loop to process events when the main thread is idle. |
SelectWaitMillis | The length of time in milliseconds the class will wait when DoEvents is called if there are no events to process. |
UseInternalSecurityAPI | Tells the class whether or not to use the system security libraries or an internal implementation. |