Search code examples
phpquickbooksdevkit

quickbooks web connector "edit" function


I am using the quickbooks PHP web connector and am able to send new customer data to quickbooks desktop. However I couldn't find any documentation on editing a customer(i.e. I want to send an edit done on the web application to the qb desktop). Is this possible to do in the web connector?


Solution

  • Sending new customer data to QuickBooks is almost identical to sending updated data to QuickBooks.

    If you refer to the OSR:

    You can look up the qbXML syntax for:

    • CustomerMod

    And you'll see that really the only huge difference is that you have to specify these two fields:

    <ListID >IDTYPE</ListID> <!-- required -->
    <EditSequence >STRTYPE</EditSequence> <!-- required -->
    

    So your request will look something like this:

    <?xml version="1.0" encoding="utf-8"?>
    <?qbxml version="8.0"?>
    <QBXML>
      <QBXMLMsgsRq onError="stopOnError">
        <CustomerModRq requestID="15">
          <CustomerMod>
            <ListID>ABCD-1365684445</ListID>
            <EditSequence>1365684445</EditSequence>
    
            <Name>Test Customer UPDATED</Name>
            ... more fields here ... 
          </CustomerMod>
        </CustomerModRq>
      </QBXMLMsgsRq>
    </QBXML>
    

    That's taken from this site with more examples:

    And if you take the time to post your code so we can see what you've done so far for CustomerAdd then we can give you more details about how to move forward and modify it to get it so you can send the above request.