Search code examples
phpquickbooks

How can I import deleted items and customers from Quickbooks in Consolibyte Web Connector?


As the title says, I'm trying to get deleted items and customers imported from Quickbooks. The main Quickbooks.php file has the following:

/**
 * Query QuickBooks for lists of deleted list items (customers, items, etc.)
 */
define('QUICKBOOKS_QUERY_DELETEDLISTS', 'ListDeletedQuery');
define('QUICKBOOKS_IMPORT_DELETEDLISTS', 'ListDeletedImport');

Thus, I was trying to use the QUICKBOOKS_IMPORT_DELETEDLISTS action to import deleted items, but I cannot find anywhere what tag to put in the xml.

I tried the following:

$xml = '<?xml version="1.0"?'.'>
        <?qbxml version="5.0" encoding="utf-8"?'.'>
        <QBXML>
            <QBXMLMsgsRq onError="stopOnError">
                <ListDeletedImport ' . $attr_iterator . ' ' . $attr_iteratorID . ' requestID="' . $requestID . '">
                    <MaxReturned>' . QB_QUICKBOOKS_MAX_RETURNED . '</MaxReturned>
                    <FromModifiedDate>' . $last . '</FromModifiedDate>
                    <OwnerID>0</OwnerID>
                </ListDeletedImport>
            </QBXMLMsgsRq>
        </QBXML>';

But ListDeletedImport does not appear to be the right XML tag though that's what the action is called in the Web Connector code (as shown above). What is it supposed to be? Or where can I find an example?

This is for Quickbooks Desktop.

This is the list of query types from the Schema folder, but I can't find one that appears to have anything to do with deleted items or customers:

AccountQuery.xml
BillingRateQuery.xml
BillPaymentCheckQuery.xml
BillPaymentCreditCardQuery.xml
BillQuery.xml
BillToPayQuery.xml
ChargeQuery.xml
CheckQuery.xml
ClassQuery.xml
CompanyQuery.xml
CreditCardChargeQuery.xml
CreditCardCreditQuery.xml
CreditMemoQuery.xml
CurrencyQuery.xml
CustomerMsgsQuery.xml
CustomerQuery.xml
CustomerTypeQuery.xml
DataExtDefQuery.xml
DateDrivenTermsQuery.xml
DepositQuery.xml
EmployeeQuery.xml
EstimateQuery.xml
HostQuery.xml
InventoryAdjustmentQuery.xml
InvoiceQuery.xml
ItemDiscountQuery.xml
ItemFixedAssetQuery.xml
ItemGroupQuery.xml
ItemInventoryAssemblyQuery.xml
ItemInventoryQuery.xml
ItemNonInventoryQuery.xml
ItemOtherChargeQuery.xml
ItemPaymentQuery.xml
ItemQuery.xml
ItemReceiptQuery.xml
ItemSalesTaxQuery.xml
ItemServiceQuery.xml
ItemSubtotalQuery.xml
JobTypeQuery.xml
JournalEntryQuery.xml
PaymentMethodQuery.xml
PayrollItemWageQuery.xml
PreferencesQuery.xml
PriceLevelQuery.xml
PurchaseOrderQuery.xml
ReceivePaymentQuery.xml
SalesOrderQuery.xml
SalesReceiptQuery.xml
SalesRepQuery.xml
SalesTaxCodeQuery.xml
ShipMethodQuery.xml
StandardTermsQuery.xml
TermsQuery.xml
TimeTrackingQuery.xml
UnitOfMeasureSetQuery.xml
VehicleMileageQuery.xml
VehicleQuery.xml
VendorCreditQuery.xml
VendorQuery.xml
VendorTypeQuery.xml
WorkersCompCodeQuery.xml

Solution

  • I found an answer to this. The name of the qbXML tag is ListDeletedQueryRq.

    This is my source: https://developer-static.intuit.com/qbSDK-current/Common/newOSR/index.html