Sage Intacct Custom Report Data through Web Services APIs

By | September 9, 2020

Sage Intacct Web Services are the standardized means of direct communication between external applications and Intacct. It supports interoperable interaction over a network using some protocol. Web service API calls are XML-based data exchange systems.

In our previous blog we saw how we can pull a report of the Drop-ship transactions in Sage Intacct. Although the report can be exported in excel or other formats, sometimes just the report won’t be enough and we might want the report data to be retrieved through web services and then perform some actions on the gathered data. Even this is possible using the Sage Intacct web service call for reading a custom report.

Read Report

You have to mention the custom report name in the report tag and the waitTime is the amount of time to wait for getting the response. It can be between 0-30 milliseconds.

The above API request will get the first 100 records from the report data queue (as default page size is 100), a Report Id and a status.
Pagesize can be set in the call according to your need.
The ReportId is to be use in another web service call for fetching the next set of records.
Status indicates the response state. If it is “Done”, then the first 100 records are fetched in that call itself, otherwise for “Pending” status, the response seems to have timed out so you need to call the readMore function using the generated reported.

Read More

Keep on calling the readMore function until number of remaining records is zero.
In this manner, data from a Custom Report can be fetched with such an ease. Conceptualize it as a queue is created to hold the data when readReport function is called, further from which we fetch the data with every readMore request.

Also, you can check out the report definition (all the sorting, groupings, arguments applied) for the desired Custom Report by adding an attribute in the readReport function like this <readReport returnDef=”true”> following the rest of the api call.

Through this the parameter names can be fetched for passing any run-time parameters to the report data.

Hard-coded parameters are the ones that are internally applied while creating the custom report. Run-time parameters can be passed when requesting report data using readReport web service call.

Read More with Arguments

This is how we can fetch the Custom Report data through web services so conveniently. Once we get the data in XML, we can further carry out actions that cannot be accomplished through reporting and then can also feed it to some external program that would write it in desired format(eg. like the way we want.