QuickBooks Integrator V6 - Online Help
QuickBooks Integrator V6
Questions / Feedback?

Item Class

Properties   Methods   Events   Configuration Settings   Errors  

The Item component is used to add any of eight types of items to QuickBooks's item list. It may also get item data, and in some cases, may modify it as well.

Class Name

InQB_Item

Procedural Interface

 inqb_item_open();
 inqb_item_close($res);
 inqb_item_register_callback($res, $id, $function);
 inqb_item_get_last_error($res);
 inqb_item_get_last_error_code($res);
 inqb_item_set($res, $id, $index, $value);
 inqb_item_get($res, $id, $index);
 inqb_item_do_add($res);
 inqb_item_do_checkrequeststatus($res, $requestid);
 inqb_item_do_closeqbconnection($res);
 inqb_item_do_config($res, $configurationstring);
 inqb_item_do_delete($res);
 inqb_item_do_get($res, $id);
 inqb_item_do_getbyname($res, $fullname);
 inqb_item_do_getcustomfield($res, $fieldname);
 inqb_item_do_importqbxml($res, $xmldata);
 inqb_item_do_openqbconnection($res);
 inqb_item_do_reset($res);
 inqb_item_do_setcustomfield($res, $fieldname, $fieldvalue);
 inqb_item_do_update($res);

Remarks

The Item component may be used to add or retrieve any of the following types of items: service, inventory, non-inventory, sales tax, discount, payment, subtotal, or other charge. To add an item to QuickBooks, first set the ItemType property to the appropriate value as well as ItemName. Then, you may set a variety of other properties and special fields, which differ depending on the type of item.

Service, Non-Inventory, and Other Charge Items

These types of items may be purchased from vendors, sold to customers, or both.

In case the item is purchased but not sold, or sold but not purchased, the Description, Price, PricePercent, and Account properties are used. The Account property is the only one required; it should specify an income account if the item is sold, or an expense account if the item is purchased.

Equivalently, you may specify PurchaseExpenseAccount, PurchaseCost, and PurchaseDescription. This will have the same effect, because QuickBooks does not distinguish between items that are purchased only and items that are sold only. However, QuickBooks data will always be returned in Description, Price, and Account.

In case the item is both sold and purchased, you should specify Description, Price, PricePercent, and Account for sales, and PurchaseDescription, PurchaseCost, PurchasePreferredVendor, and PurchaseExpenseAccount for purchase transactions. This will cause different default rates to appear on sales transactions (such as invoices) and purchase transactions (such as bills).

Example (Adding a service item)

Item1.ItemType = itService              '1
Item1.ItemName = "Accounting Services"
Item1.Description = "General accounting services"
Item1.Price = "70.00"                   '$70.00 per hour
Item1.AccountName = "Accounting:Labor"
Item1.Add()
Inventory Items

Inventory items are always both sold and purchased, so the interface is similar to that for non-inventory items that are sold and purchased. Set Description, Price, and Account for sales, and PurchaseDescription, PurchaseCost, and PurchasePreferredVendor for purchases. Instead of setting PurchaseExpenseAccount you must instead set two separate accounts: PurchaseCOGSAccount refers to your Cost Of Goods Sold account, and PurchaseAssetAccount refers to your Inventory Assets account.

Other details are also available as special fields: See Config for details on how to set or query the quantity on hand and on order, reorder point, and the inventory date.

Example

Item1.ItemType = itInventory                    '2
Item1.ItemName = "French Door"
Item1.Description = "Glass French Door"         'this will appear on invoices
Item1.Price = "245.00"                          'Charge $245.00 to customers
Item1.AccountName = "Construction:Materials"
Item1.PurchaseDesciption = "Glass French Door"  'this will appear on bills
Item1.PurchaseCost = "160.00"
Item1.PurchasePreferredVendorName = "Joe's Doors, Inc."
Item1.PurchaseCOGSAccountName = "Cost Of Goods Sold"
Item1.PurchaseAssetAccountName = "Inventory Asset"
Item1.Add()
Other Items

Other types of items are considerably less complex.

To add a discount item to QuickBooks, set ItemName and the SalesTaxCode, as well as the Description, Price or PricePercent (here these properties refer to the rate of discount), as well as an Account.

To add a payment item to QuickBooks, set ItemName, Description, Account, and the PaymentMethod special field.

To add a sales tax item to QuickBooks, set ItemName, Description, and the TaxRate and TaxVendor special fields.

To add a subtotal item to QuickBooks, set ItemName and Description.

Example (Adding a sales tax item) Item1.ItemType = itSalesTax '6 Item1.ItemName = "San Jose, CA" Item1.Config("TaxRate=6.75") Item1.Config("TaxVendorName=San Jose Board of Taxation") Item1.Add()

Modifying Items

This functionality requires QuickBooks 2003. You must first set QBXMLVersion to "2.0" or higher before you may modify items.

Update functionality is limited to service, inventory, and non-inventory items. You may update the name, sales tax code, description(s), and price(s). However, with the exception of inventory, you may not change any of the accounts associated with items, nor can you convert items into other types of items.

In the case of inventory items, you may modify PurchaseCOGSAccount and PurchaseAssetAccount, but not the sales income account.

Getting Items

You may also use the class to get items from QuickBooks using their RefId or ItemName: simply call Get or GetByName.

It is not necessary to set ItemType before getting items from QuickBooks. Both Get and GetByName will get any type of item from QuickBooks, and will populate ItemType automatically. In case ItemType is itUnknown the SpecialItemType special field will contain QuickBooks's description of the type of item. In some cases (such as for inventory assembly items) properties such as Description, Account, etc. may contain relevant information.

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

AccountIdAn account for this item.
AccountNameAn account for this item.
DateSoldIndicates Date asset was sold.
DescriptionA description for the item.
InventoryQuantityOnHandThe quantity in stock for this inventory item.
InventoryReorderPointThe reorder point for this inventory item.
InventoryTotalValueThe total value of this inventory item.
ItemNameName of the item.
ItemTypeThe type of item.
LineItemCountThe number of records in the LineItem arrays.
LineItemIdId of the Line Item.
LineItemNameName of the Line Item.
LineItemQuantityQuantity of the Line Item indicated by ItemName or ItemId .
ParentIdReference to parent Item .
ParentNameReference to parent Item .
PriceThe price for this item.
PricePercentA price percent for this item.
PurchaseAssetAccountIdThe inventory asset account for this item.
PurchaseAssetAccountNameThe inventory asset account for this item.
PurchaseCOGSAccountIdThe Cost Of Goods Sold account for this item.
PurchaseCOGSAccountNameThe Cost Of Goods Sold account for this item.
PurchaseCostThe purchase cost for this item.
PurchaseDateIndicates Date asset was purchased.
PurchaseDescriptionThe purchase description for this item.
PurchaseExpenseAccountIdThe expense account charged when this item is purchased.
PurchaseExpenseAccountNameThe expense account charged when this item is purchased.
PurchasePreferredVendorIdThe preferred vendor for this item.
PurchasePreferredVendorNameThe preferred vendor for this item.
QBConnectionStringAn aggregate consisting of various QuickBooks connection properties.
QBRequestAggregateThe request aggregate.
QBRequestIdThe Id of the next message to be sent to QuickBooks.
QBRequestModeDefines whether the request is made online or stored offline.
QBResponseAggregateThe last QBXML response aggregate received from QuickBooks.
QBXMLVersionThe version of QBXML used in the outgoing message.
RefIdAn alphanumerical identifier generated by the server.
SalesTaxCodeIdWhether or not this item is taxable.
SalesTaxCodeNameWhether or not this item is taxable.
SalesTaxItemCountThe number of records in the SalesTaxItem arrays.
SalesTaxItemIdUsed to calculate sales tax.
SalesTaxItemNameUsed to calculate sales tax.

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

AddAdds the record into QuickBooks.
CheckRequestStatusChecks whether or not the specified request was processed by QuickBooks.
CloseQBConnectionCloses a persistent connection to QuickBooks.
ConfigSets or retrieves a configuration setting .
DeleteDeletes the record from QuickBooks.
GetGets a single record from QuickBooks.
GetByNameGets a single record from QuickBooks.
GetCustomFieldGets a custom field value from QuickBooks.
ImportQBXMLImports a QBXML response aggregate.
OpenQBConnectionOpens a persistent connection to QuickBooks.
ResetResets all properties to their defaults.
SetCustomFieldSets a custom field value within QuickBooks.
UpdateUpdates the item 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.

ErrorInformation about errors during data delivery.
SSLServerAuthenticationFired after the server presents its certificate to the client.
SSLStatusShows the progress of the secure connection.
StatusShows the progress of the QuickBooks connection.
WarningFired 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.

SendRawXMLSends specified XML to quickbooks without modification.
TimeCreatedThe time the object was created.
TimeModifiedThe time the object was created.
EditSequenceAn identifier for this copy of the object.
FullNameThe name of the Item.
SublevelThe number of ancestors this Item has.
PartNumberThe Manufacturer's Part Number for the Item.
InventoryAverageCostThe average purchase cost for this inventory item.
InventoryQuantityOnOrderThe number of these items that have been ordered from vendors, but not received.
InventoryQuantityOnSalesOrderThe number of these items that have been ordered by customers, but not delivered.
InventoryDateThe date when the item was converted into an inventory item.
PaymentMethodNameThe method of payment, i.e., 'Check', 'Credit Card', etc.
PaymentMethodIdThe method of payment, i.e., 'Check', 'Credit Card', etc.
TaxRateThe percentage rate of tax.
TaxVendorNameThe VENDOR or tax agency to whom taxes are due.
TaxVendorIdThe VENDOR or tax agency to whom taxes are due.
IsActiveIndicates whether the object is currently enabled for use by QuickBooks.
SpecialItemTypeThe type of the item when ItemType is Unknown.
AssetAcquiredAsIndicates whether this item was new or used when the business acquired it.
VendorOrPayeeNameName of the vendor from whom this asset was purchased.
SalesExpenseAny expenses that were incurred during the sale of a fixed asset.
AssetDescriptionDescription of the asset.
AssetLocationWhere the asset is located or has been placed into service.
AssetPONumberThe purchase order number associated with this asset.
AssetSerialNumberThe serial number of the asset.
AssetWarrantyExpiresThe date when the warranty for this asset expires.
AssetNotesAdditional information about the asset.
AssetNumberThe number used by the QuickBooks Fixed Asset Manager to identify this asset.
AssetCostBasisThe total cost of the fixed asset.
AssetDepreciationThe amount the fixed asset has lost in value since it was purchased, as of the end of the year.
AssetBookValueA reasonable estimate of the sales value of the fixed asset, as of the end of the year.
UnitOfMeasureNameName of the units that the item is measured in.
UnitOfMeasureIdId of the units that the item is measured in.
StopOnErrorSpecifies how QuickBooks is to proceed if an error occurs in processing of the current request.
SSLAcceptServerCertThe SSL certificate being used by the Remote Connector.
SSLAcceptServerCertFileThe SSL certificate file being used by the Remote Connector.
EnforceMaxLengthIndicates whether to enforce max lengths for QB Fields.
AuthFlagsConnection Flags (use for QuickBooks Simple Start).
GetHighestVersionHighest QBXMLVersion supported by the installed instance of QuickBooks.
GetSupportedVersionsReturns a list of QBXMLVersions that are supported by QuickBooks.
GetRequestProcessorDLLVersionReturns the version of the QB Request Processor that is installed on your system.
IsReadOnlyThis causes the QuickBooks authorization dialog to display text informing the user that its access will be read-only.
UnattendedModePrefWhether connecting while QuickBooks is closed is required or optional for the user.
PersonalDataPrefWhether the connecting application will require access to personal data such as SSN or credit card information.
QBOpenCompanyFileThe file currently open in QuickBooks.
QBConnectionModeThe mode of connection to QuickBooks.
QBFileStatusThe status of the company file as it pertains to accepting connections.
WarningCodesA comma-separated list of QuickBooks warning codes that should not result in an exception.
CodePageThe system code page used for Unicode to Multibyte translations.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 6.0.6240.0