- 22 May 2024
- 3 Minutes to read
- Print
- DarkLight
- PDF
Sage Intacct
- Updated on 22 May 2024
- 3 Minutes to read
- Print
- DarkLight
- PDF
Sage Intacct API
Any instance where an entry in the below configuration has a leading $ represents a parameter that needs to be replaced with a static value.
Parameters in this document:
- $sender_id and $sender_password - These two parameters are Web Services Credentials, and are provisioned by Sage Intacct for customers/partners with an active Web Services developer license. Details on these values can be found here.
- $user_id and $company_id and $login_password - These three parameters are Company Credentials, and should be set up as a Web Services user account in the Sage Intacct UI through
Company > Web Services user
. Details on these values can be found here. - $object_name - The Object Name is what Sage Intacct uses to define the data that is to be ingested, and can be found on the definition page of each Resource. For example, for the General Ledger Details, the Object Name is
GLDETAIL
, and can be found here. - $comparison_operator - A comparison operator is used for filtering within a query, such as
equalto
orlessthan
. For a full list of available Comparison Operators, see here.
API Resources
For a list of API Resources available for Sage Intacct, please refer to the list of endpoints found here, where each endpoint can be seen within the API Reference list. For the purposes of this API documentation, we are focusing on resources that utilize the query
API call type (see below section for additional documentation). For any questions on query specifics that aren't outlined below, please reach out to our Support Team and we'd be happy to assist further as needed!
Queries
Getting data from the Sage Intacct API can be done using XML Queries, which we will outline the basics of below. For a full walkthrough of querying, as well as examples, please see the Sage Intacct documentation here.
Required Elements
<object> $object_name </object>
- Example:
<object>GLDETAIL</object>
<select>
<field></field>
<field></field>
...
<field></field>
</select>
- Example:
<select>
<field>RECORDNO</field>
<field>MODULEKEY</field>
</select>
<pagesize>2000</pagesize>
<offset>0</offset>
Optional Elements
<filter>
<and/or>
<$comparison_operator> (See Configuration Parameters for Comparison Operator options)
<field></field>
<value></value>
</$comparison_operator>
<$comparison_operator>
<field></field>
<value></value>
</$comparison_operator>
</and>
</filter>
- Example: Get results where Entry Date is in 2024
<filter>
<and>
<greaterthanorequalto>
<field>ENTRY_DATE</field>
<value>2024-01-01</value>
</greaterthanorequalto>
<lessthan>
<field>ENTRY_DATE</field>
<value>2025-01-01</value>
</lessthan>
</and>
</filter>
Full Example
The below query will pull a selection of fields from the General Ledger Details resource for 2024:
<query>
<object>GLDETAIL</object>
<select>
<field>ACCOUNTNO</field>
<field>ACCOUNTTITLE</field>
<field>AMOUNT</field>
<field>AUWHENCREATED</field>
<field>BATCH_DATE</field>
<field>BATCH_TITLE</field>
<field>BOOKID</field>
<field>CLASSID</field>
<field>CLASSNAME</field>
<field>CREDITAMOUNT</field>
<field>DEBITAMOUNT</field>
<field>DEPARTMENTID</field>
<field>DEPARTMENTTITLE</field>
<field>DESCRIPTION</field>
<field>ENTRY_DATE</field>
<field>GLENTRYKEY</field>
<field>LINE_NO</field>
<field>LOCATIONID</field>
<field>LOCATIONNAME</field>
<field>PROJECTID</field>
<field>PROJECTNAME</field>
<field>RECORDNO</field>
<field>SYMBOL</field>
<field>TRX_AMOUNT</field>
<field>TRX_CREDITAMOUNT</field>
<field>TRX_DEBITAMOUNT</field>
<field>WHENMODIFIED</field>
</select>
<filter>
<and>
<greaterthanorequalto>
<field>ENTRY_DATE</field>
<value>2024-01-01</value>
</greaterthanorequalto>
<lessthan>
<field>ENTRY_DATE</field>
<value>2025-01-01</value>
</lessthan>
</and>
</filter>
<pagesize>2000</pagesize>
<offset>0</offset>
</query>
Connector configuration
- Base url: https://api.intacct.com/ia/xml/xmlgw.phtml
- Method: POST
- POST data: Raw XML
- XML:
<?xml version="1.0" encoding="UTF-8"?>
<request>
<control>
<senderid>{senderid}</senderid>
<password>{senderpassword}</password>
<controlid>Panoply</controlid>
<uniqueid>false</uniqueid>
<dtdversion>3.0</dtdversion>
<includewhitespace>false</includewhitespace>
</control>
<operation>
<authentication>
<login>
<userid>{userid}</userid>
<companyid>{companyid}</companyid>
<password>{loginpassword}</password>
</login>
</authentication>
<content>
<function controlid="Panoply">
<query>
<object>$object_name</object>
<select>
<field></field>
<field></field>
...
<field></field>
</select>
<filter>
<and/or>
<$comparison_operator>
<field></field>
<value></value>
</$comparison_operator>
<$comparison_operator>
<field></field>
<value></value>
</$comparison_operator>
</and>
</filter>
<pagesize>2000</pagesize>
<offset>0</offset>
</query>
</function>
</content>
</operation>
</request>
- Headers: {"Content-Type":"application/xml"}
Destination Table naming convention is ultimately up to you as the data owner. One common structure used for this API is to append the Resource to sage_intact_
. For example, when ingesting the General Ledger Details, the destination table would be sage_intact_general_ledger_details
.
Variables
Variable name | Variable value |
---|---|
sender_id | $sender_id |
sender_password | $sender_password |
user_id | $user_id |
company_id | $company_id |
login_password | $login_password |
object_name | $object_name |
Pagination
- Enable:
- Get next page value: Static (integer to be incremented)
- Start page: 0
- Page step: 2000
- Use next page value: As a parameter in body
- URL/body key: request.operation.content.function.query.offset
- Stop iterating when: Empty data
Advanced Settings
- Data key: response.operation.result.data.$object_name
- Primary Key: {recordno}
The Incremental Key will depend on the fields available in a given resource, and will likely be a date field that represents either when a record is added to Sage Intacct, or when a record has been updated (e.g. a modified or updated date). By setting an incremental value, we can limit the number of records that are extracted and ingested in each run, and thus improve job performance. Upon completion of a collection, the Incremental Key's Column value will automatically update to the maximum value that was ingested, thus creating a continual limiter on scheduled collections.
Example: Filtering a query to only show records where the WHENMODIFIED
date is on or after January 1st, 2024.
- Incremental Key:
Column name: WHENMODIFIED
Column value: 2024-01-01
Filter portion of Query:
<filter>
<greaterthanorequalto>
<field>WHENMODIFIED</field>
<value>{incval}</value>
</Comparison Operator>
</filter>