API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

Data retrieval performance


I am currently developing integration solution using 'e-conomic' .NET API. Basically, it is a reporting tool which queries lots of data from related objects. For example, I have a report which shows lists of top customers, top employees, top products etc. It is almost identical to the info that is displayed on the 'Sales' tab in 'e-conomic' web-interface

The point of concern is performance of data retrieval. I use fetch classes like 'IDebtorData' and for some reports performance is quite good. But when I build a report by products there are too much round-trips:

1. Getting 'IProduct[]' array
2. Getting 'IProductData[]' array
3. Getting 'IInvoiceLine[]' for each product
4. Getting 'IInvoiceLineData[]' for each 'IInvoiceLine[]'

Maybe somebody can suggest a better flow, but what is interesting for me is the following

I notice that in web-interface (for example 'Top customers' list) all the info is updated immediately. I assume this is because ASP pages use database queries (join, sum, sort etc), which allow to retrieve the data extremely fast

So, my question: is there some way of making such sort of quieries through .NET API or SOAP?  I looked through the documentation and haven't found an answer. If this is not supported, do you consider it is possible to have something similar in the future?

Thanks in advance
created Feb 4, 2011 by anonymous

2 Answers

Hi Sergey,

You can bulk-pull data objects using the relevant GetDataArray() methods.

This way, you can e.g. build a consolidated array of all products' InvoiceLine's, and then use InvoiceLine.GetDataArray() to pull all invoice line data in much fewer gos.

In fact, you don't even have to pull invoice lines for each product. You can simply pull all invoice lines (preferably all changed since your last sync ); use InvoiceLine.GetDataArray() on these - and then use the InvoiceLineData objects' Product property to distribute between products.

Best regards,
answered Feb 4, 2011 by Christian Estrup
Thanks, I will try this way
answered Feb 4, 2011 by anonymous
Visma e-conomic A/S