SDK support for multi location inventory
Starting with QuickBooks Enterprise v11 (2011 - US version) and qbXML spec 10.0, the Desktop SDK supports the QuickBooks multi-location inventory feature. This page is a brief overview the QuickBooks multi-location inventory feature from the perspective of the SDK. It covers the multi-location
inventory impact on company preferences, transactions, list objects and reports. For full information on how this feature works, please consult the in-product help for QuickBooks.
Multi-location inventory support in the SDK
Different aspects of the SDK’s support for multi-location inventory are covered below.
SDK support for activating multi-location inventory
- You cannot set multi-location inventory related preferences (activate or deactivate support) from the SDK. This must be done in the QuickBooks UI. (By default company files are created with multi-location inventory turned off. To turn multi-location inventory on you have to use the QuickBooks UI
with the company file open. From the main menu bar, Edit->Preferences->Item & Inventory->Company tab-> Select Advanced Inventory is enabled.)
- You can use the SDK to get the current company file settings for multi-location inventory by doing a PreferencesQuery using qbXML 10.0 or greater, you’ll get back a MultiLocationInventoryPreferences aggregate that contains the IsMultiLocationInventoryAvailable and IsMultiLocationInventoryEnabled
boolean that indicates if multi-location inventory is used with this company file.
SDK support for working with inventory sites
The SDK supports add, mod, and query requests for inventory sites.
InventorySiteAdd
The SDK can add new inventory sites to the Inventory Site List with this request:
- For this feature to work via SDK, the QuickBooks preference that allows inventory items to be in multiple sites has to be turned on.
- The only required field to add a site is the Name field. The name to be added must be unique.
- The address block of the Inventory site list parallels that of the customer list.
InventorySiteMod
The SDK can modify an existing inventory site through this request.
- Like other list modify requests, this request requires the list ID and edit sequence of the element to be modified.
- The name of an element can be changed as long as the modified name isn’t already in use by another element.
- If the ‘IsDefaultSite’ is set to true for an element, then it can be made false only by setting the <IsDefaultSite> tag true for another element in the list–sending <IsDefaultSite>false</IsDefaultSite> for a site whose <IsDefaultSite> tag is already true has no effect.
InventorySiteQuery
FullName, ActiveStatus, From & To ModifiedDate, NameFilter, NameRageFilter are available as filters.
SDK support for transferring inventory
This SDK supports add, mod, del, and query request for transferring inventory. This set of request messages allows the user to transfer inventory from one site to another.
Transfer inventory add
- This request requires “to” and “from” sites and one entry in the transaction line.
- It also has the provision to set External GUID
Transfer inventory mod
- It allows the modification of a transfer inventory transaction’s body and transaction lines.
- If the transaction line isn’t explicitly mentioned in the modline aggregate, the transaction is deleted
Transfer Inventory Query
Standard filters and Site Filter are available.
SDK support for adding site information to transactions
The SDK supports applying site information to transactions in add requests and modifying site information in mod requests. (Multi-location inventory must be active for the company file.)
Note
Note
Note that the <InventorySiteRef> tag is currently supported for line items only. For group Items, the SDK cannot explicitly specify the site, and it defaults to UnSpecifiedSite.
- For invoice, credit memo, check, bill, item receipt, build assembly, sales receipt, credit card charge, credit card credit, vendor credit, charge, and inventory adjustment transactions:
- For add and mod requests, the site passed with <InventorySiteRef> tag will be applied to a transaction once it is saved.
- If there is more than one <InventorySiteRef> aggregate, the SDK will set the site for all the transactions.
- The add or mod request will succeed if site is not specified, but the site will be set to UnspecifiedSite.
- The response includes the site information.
- If quantity is negative, then the transaction becomes non-posting, and site will be treated as an optional field.
- For charge, build assembly, and inventory adjustment transactions, site is provided in the header and will be copied to all the line items.
- For all other transactions, site will be provided in the line items.
- For estimate, purchase order and sales order transactions:
- These transactions are non-posting and site is not a mandatory field.
- For purchase order transactions, the site is provided in header and is copied to all the line items.
Multi-location inventory support for group items
This functionality has not been implemented. Calls to this request will return as unsupported.
Impact of multi-location inventory on existing applications
If your users are using Enterprise v11 and have multi-location inventory turned on, your application can be affected by multi-location inventory even if your application does not take advantage of the 10.0 features and issues only requests using qbXML spec 8.0 and older.
Here are the new behaviors that impact your app:
- Sites will be set to UnspecifiedSite, if SDK version used is less than 10.0.
These are issues you need to be aware of.