Link to home
Create AccountLog in
Avatar of Rajkumar Gs
Rajkumar GsFlag for India

asked on

QuickBooks - Add Bill - qbXML format (AddBillRq.xml)

Do anyone have the working qbXML format to add a new bill to QuickBooks ?

I am trying to sync the new bill data to QuickBooks by passing qbXML to QuickBooks Web Connect (QBWC). Add Vendor is success, but stuck on Add Bill qbXML.

Attached the qbXML file I have right now. But this not works for me.
 BillAddRq.xml
When I try to add an item in the bill, it returns an error
User generated image
If I am right, something wrong in this part of qbXML.
<ItemRef> 
     <ListID>LCD Monitor</ListID> 
</ItemRef> 

Open in new window


My question is to represent an Itemname in Quickbook, is there anything other than 'ListID' ?

Hope it is clear ?
Thanks
Raj
ASKER CERTIFIED SOLUTION
Avatar of Rajkumar Gs
Rajkumar Gs
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Rajkumar Gs

ASKER

So ListID may be some internal unique ID of QuickBooks representing that item.

Raj
I got the solution of my own. I am not deleting this question, but providing the solution that worked.
Hope this would help someothers who will be searching for the same in Experts-Exchange

Thanks
Raj
1. qbXML to add a NEW VENDOR in QuickBooks - VendorAddRq.xml

<?xml version="1.0" ?> 
  <?qbxml version="4.0"?> 
 <QBXML>
 <QBXMLMsgsRq onError="stopOnError">
 <VendorAddRq requestID="1">
 <VendorAdd>
  <Name>DELL Computer Ltd</Name> 
  <IsActive>1</IsActive> 
  <CompanyName /> 
  <Salutation /> 
  <FirstName /> 
  <LastName /> 
 <VendorAddress>
  <Addr1>1234 KingsHway</Addr1> 
  <Addr2 /> 
  <City>Cherry Hill</City> 
  <State>NJ</State> 
  <PostalCode>08034</PostalCode> 
  <Country /> 
  </VendorAddress>
  <Phone>(856) 482-2424</Phone> 
  <AltPhone>650-214-6549</AltPhone> 
  <Fax>(301) 927-8398</Fax> 
  <Email /> 
  <Contact>Shaun</Contact> 
  <NameOnCheck /> 
  <AccountNumber /> 
 <VendorTypeRef>
  <FullName>Materials</FullName> 
  </VendorTypeRef>
 <TermsRef>
  <FullName>1% 10 Net 30</FullName> 
  </TermsRef>
  <CreditLimit /> 
  </VendorAdd>
  </VendorAddRq>
  </QBXMLMsgsRq>
  </QBXML>

Open in new window


2. SUCCESS RESPONSE to Add Vendor Request

 
<?xml version="1.0" ?> 
 <QBXML>
 <QBXMLMsgsRs>
 <VendorAddRs requestID="1" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
 <VendorRet>
  <ListID>8000004D-1293529277</ListID> 
  <TimeCreated>2010-12-28T04:41:17-05:00</TimeCreated> 
  <TimeModified>2010-12-28T04:41:17-05:00</TimeModified> 
  <EditSequence>1293529277</EditSequence> 
  <Name>DELL Computer Ltd</Name> 
  <IsActive>true</IsActive> 
 <VendorAddress>
  <Addr1>1234 KingsHway</Addr1> 
  <City>Cherry Hill</City> 
  <State>NJ</State> 
  <PostalCode>08034</PostalCode> 
  </VendorAddress>
  <Phone>(856) 482-2424</Phone> 
  <AltPhone>650-214-6549</AltPhone> 
  <Fax>(301) 927-8398</Fax> 
  <Contact>Shaun</Contact> 
 <VendorTypeRef>
  <ListID>80000006-1292947257</ListID> 
  <FullName>Materials</FullName> 
  </VendorTypeRef>
 <TermsRef>
  <ListID>80000001-1292873933</ListID> 
  <FullName>1% 10 Net 30</FullName> 
  </TermsRef>
  <IsVendorEligibleFor1099>false</IsVendorEligibleFor1099> 
  <Balance>0.00</Balance> 
  </VendorRet>
  </VendorAddRs>
  </QBXMLMsgsRs>
  </QBXML>

Open in new window


3. qbXML to ADD BILL with Expense & Item data in QuickBooks - BillAddRq.xml

<?xml version="1.0" ?> 
  <?qbxml version="4.0"?> 
 <QBXML>
 <QBXMLMsgsRq onError="continueOnError">
 <BillAddRq requestID="1">
 <BillAdd>
 <VendorRef>
  <FullName>DELL Computer Ltd</FullName> 
  </VendorRef>
  <TxnDate>2010-10-17</TxnDate> 
  <DueDate /> 
  <RefNumber /> 
 <TermsRef>
  <FullName>N/A</FullName> 
  </TermsRef>
  <Memo /> 
 <ExpenseLineAdd>
 <AccountRef>
  <FullName>Automobile Expense</FullName> 
  </AccountRef>
  <Amount>1000.00</Amount> 
  <Memo>Test Comments</Memo> 
  </ExpenseLineAdd>
 <ExpenseLineAdd>
 <AccountRef>
  <FullName>Computer and Internet Expenses</FullName> 
  </AccountRef>
  <Amount>555.15</Amount> 
  <Memo>Test Comments</Memo> 
  </ExpenseLineAdd>
 <ItemLineAdd>
 <ItemRef>
  <FullName>Digital Camera</FullName> 
  </ItemRef>
  <Desc>Digital Camera</Desc> 
  <Quantity>2</Quantity> 
  <Cost>6500.00</Cost> 
  <Amount>13000.00</Amount> 
  </ItemLineAdd>
 <ItemLineAdd>
 <ItemRef>
  <FullName>Laser Printer</FullName> 
  </ItemRef>
  <Desc>Laser Printer</Desc> 
  <Quantity>1</Quantity> 
  <Cost>5000.00</Cost> 
  <Amount>5000.00</Amount> 
  </ItemLineAdd>
  </BillAdd>
  </BillAddRq>
  </QBXMLMsgsRq>
  </QBXML>

Open in new window


4. SUCCESS RESPONSE to add a new bill from QuickBooks

<?xml version="1.0" ?> 
 <QBXML>
 <QBXMLMsgsRs>
 <BillAddRs requestID="1" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
 <BillRet>
  <TxnID>182-1293529466</TxnID> 
  <TimeCreated>2010-12-28T04:44:26-05:00</TimeCreated> 
  <TimeModified>2010-12-28T04:44:26-05:00</TimeModified> 
  <EditSequence>1293529466</EditSequence> 
  <TxnNumber>113</TxnNumber> 
 <VendorRef>
  <ListID>8000004D-1293529277</ListID> 
  <FullName>DELL Computer Ltd</FullName> 
  </VendorRef>
 <APAccountRef>
  <ListID>8000002A-1292874349</ListID> 
  <FullName>Accounts Payable</FullName> 
  </APAccountRef>
  <TxnDate>2010-10-17</TxnDate> 
  <DueDate>2010-10-17</DueDate> 
  <AmountDue>19555.15</AmountDue> 
 <TermsRef>
  <ListID>80000008-1293434720</ListID> 
  <FullName>N/A</FullName> 
  </TermsRef>
  <IsPaid>false</IsPaid> 
 <ExpenseLineRet>
  <TxnLineID>184-1293529466</TxnLineID> 
 <AccountRef>
  <ListID>80000018-1292873933</ListID> 
  <FullName>Automobile Expense</FullName> 
  </AccountRef>
  <Amount>1000.00</Amount> 
  <Memo>Test Comments</Memo> 
  </ExpenseLineRet>
 <ExpenseLineRet>
  <TxnLineID>185-1293529466</TxnLineID> 
 <AccountRef>
  <ListID>8000001A-1292873933</ListID> 
  <FullName>Computer and Internet Expenses</FullName> 
  </AccountRef>
  <Amount>555.15</Amount> 
  <Memo>Test Comments</Memo> 
  </ExpenseLineRet>
 <ItemLineRet>
  <TxnLineID>186-1293529466</TxnLineID> 
 <ItemRef>
  <ListID>80000006-1293435012</ListID> 
  <FullName>Digital Camera</FullName> 
  </ItemRef>
  <Desc>Digital Camera</Desc> 
  <Quantity>2</Quantity> 
  <Cost>6500</Cost> 
  <Amount>13000.00</Amount> 
  </ItemLineRet>
 <ItemLineRet>
  <TxnLineID>187-1293529466</TxnLineID> 
 <ItemRef>
  <ListID>80000007-1293435039</ListID> 
  <FullName>Laser Printer</FullName> 
  </ItemRef>
  <Desc>Laser Printer</Desc> 
  <Quantity>1</Quantity> 
  <Cost>5000</Cost> 
  <Amount>5000.00</Amount> 
  </ItemLineRet>
  </BillRet>
  </BillAddRs>
  </QBXMLMsgsRs>
  </QBXML>

Open in new window