I heard that using Quick book SDK we can import Quick Books data in our own application using C#.
Let me know how is this possible.
- I am developing desktop applicaton using Silverlight.
- This a SaaS app (I am allowing customers to connect their QuickBooks files to my app)
Are there any resources to go through (any links, examples)?
Go install the QuickBooks SDK.
After installation, navigate to this directory on your computer:
C:\Program Files (x86)\Intuit\IDN\QBSDK12.0\samples\qbdt\c-sharp
In that directory you will find many examples, provided by Intuit, which show how to do this. In addition, you'll find about 600 pages of PDF documentation included with the SDK, which detail every single aspect of what you're trying to do.
Desktop connections to QuickBooks using C# and the SDK are pretty easy - you basically set up a COM object and feed XML to QuickBooks. QuickBooks processes the XML request and sends you back an XML response.
Here's some QuickBooks C# example code.
rp = new RequestProcessor2();
rp.OpenConnection("", "IDN CustomerAdd C# sample");
ticket = rp.BeginSession("C:\\path\\to\\file.QBW", QBFileModeE.qbFileOpenDoNotCare);
//ticket = rp.BeginSession("C:\\path\\to\\file.QBW", QBFileMode.qbFileOpenDoNotCare);
Random random = new Random();
string input = @"<?xml version=""1.0"" encoding=""utf-8""?>
<?qbxml version=""2.0""?>
<QBXML>
<QBXMLMsgsRq onError=""stopOnError"">
<CustomerAddRq requestID=""15"">
<CustomerAdd>
...
</CustomerAdd>
</CustomerAddRq>
</QBXMLMsgsRq>
</QBXML>";
response = rp.ProcessRequest(ticket, input);
You should refer to the QuickBooks OSR for details on the XML requests you can send. Also included in the SDK is the QBFC library, which allows you to create the XML requests with objects, and marshall the object to an XML string.