V1 to V2 Breaking Changes
Version 2 has a few changes that can break Version 1 code. These incompatibilities are mentioned below.
LineItem Inserts
In V1, to add a transaction with LineItems, the initial LineItems could be inserted via the Items column for the base transaction. Additional LineItems could be added via the LineItems table by specifying the transaction Id. However, this model posed severe scalability issues and was not intuitive.
In V2, this model has been replaced. There are no more Items or ExpenseItems columns in base transaction tables. Instead, inserts can be made with complete LineItem information directly on the LineItem table.
There are two ways to do this. If you have access to the SQL query, then you can specify the number after the column. For example, to insert an Invoice you can use:
INSERT INTO InvoiceLineItems (CustomerName, ItemName#1, ItemQuantity#1, ItemName#2, ItemQuantity#2) VALUES ('Abercrombie, Kristy', 'Repairs', 1, 'Removal', 2)
If you do not have access to directly modify the SQL query, then you can use the Aggregate column to pass an XML aggregate containing Line items, Expense items, and other similar data. For example:
INSERT INTO Invoices (CustomerName, ItemAggregate)
VALUES ('Abercrombie, Kristy', '<InvoiceLineItems>
<Row><ItemName>Repairs</ItemName><ItemQuantity>1</ItemQuantity></Row>
<Row><ItemName>Removal</ItemName><ItemQuantity>2</ItemQuantity></Row>
</InvoiceLineItems>')
To see an example of an insert for any specific transaction with LineItems, please see Tables.
Addresses
In V1, addresses were handled with a number of columns that did not directly map to the QuickBooks API. These included a Name and Street column for the address, such as a ShipToName and ShipToStreet column.
In V2, addresses now reflect the QuickBooks SDK. The Name and Street columns have been removed and replaced with Line1 through Line5. The address Line1 corresponds directly to the V1 address Name column. In V1, the Street column was a concatenation of Line2 and Line3, but with a newline between the two. There were no corresponding outputs for Line4 and Line5 in V1.
Please also note that Zip has been changed to PostalCode on all addresses to reflect the QuickBooks API.
JournalEntries
In V1, JournalEntries could be inserted using the Credit* and Debit* pseudo-columns. In V2, we have modified this so that JournalEntries can be inserted with the Line* columns. This essentially works the same way as all other LineItem tables. Please see JournalEntries for more info.
EmployeeEarnings
There are a number of column renames to existing columns in the Employee Earnings table. These include renaming WageId to EarningsWageId, WageName to EarningsWageName, Rate to EarningsRate, and RatePercent to EarningsRatePercent.
StartDate/EndDate Pseudo-Columns
The StartDate/EndDate pseudo-columns are no longer supported. These have been renamed to StartTxnDate and EndTxnDate.