List Account Balances (Legacy)

Account balances include a starting balance, for period/net change amounts, ending balance, and adjustments together with all book and dimension combinations. Parent-child hierarchy dimensions can be included as well. This function provides information in a readable format similar to that provided by the Sage Intacct Account Balance standard report.

get_accountbalances

List an account of balances for a reporting period:

<get_accountbalances>
    <reportingperiodname>Calendar Year Ended December 2016</reportingperiodname>
    <glaccountno>4000</glaccountno>
    <showzerobalances>false</showzerobalances>
</get_accountbalances>

List an account group of balances for a date range:

<get_accountbalances>
    <startdate>
        <year>2016</year>
        <month>01</month>
        <day>01</day>
    </startdate>
    <enddate>
        <year>2016</year>
        <month>01</month>
        <day>31</day>
    </enddate>
    <accountgroupname>Total Revenue</accountgroupname>
    <showzerobalances>false</showzerobalances>
</get_accountbalances>

List an account range of balances for a date range:

<get_accountbalances>
    <startdate>
        <year>2016</year>
        <month>01</month>
        <day>01</day>
    </startdate>
    <enddate>
        <year>2016</year>
        <month>01</month>
        <day>31</day>
    </enddate>
    <startaccountno>4000</startaccountno>
    <endaccountno>4999</endaccountno>
    <showzerobalances>false</showzerobalances>
</get_accountbalances>

List an account of balances for GAAP adjustment accrual book for a reporting period:

<get_accountbalances>
    <reportingperiodname>Calendar Year Ended December 2016</reportingperiodname>
    <glaccountno>4000</glaccountno>
    <showzerobalances>false</showzerobalances>
    <reportingbook>ACCRUAL</reportingbook>
    <adjbooks>
        <adjbook>GAAP</adjbook>
    </adjbooks>
    <includereportingbook>false</includereportingbook>
</get_accountbalances>

Parameters

Name Required Type Description
reportingperiodname Optional string Reporting period name. Required if not using startdate and enddate.
startdate Optional object Opening balance date. Required if not using reportingperiodname.
enddate Optional object Closing balance date. Required if not using reportingperiodname.
glaccountno Optional string GL account number. Required if not using accountgroupname or startaccountno and endaccountno.
accountgroupname Optional string Account group name. Required if not using glaccountno or startaccountno and endaccountno.
startaccountno Optional string Starting GL account number. Required if not using glaccountno or accountgroupname.
endaccountno Optional string Ending GL account number. Required if not using glaccountno or accountgroupname.
locationid Optional string Location ID or location group ID. (If you pass an empty element, it will filter for balances where that dimension is null.)
departmentid Optional string Department ID or department group ID. (If you pass an empty element, it will filter for balances where that dimension is null.)
showzerobalances Optional boolean Return zero balances. Use true or false. (Default: false)
reportingbook Optional string Reporting book ID. Reporting book ID. Use ACCRUAL or CASH depending on the company configuration. If Global Consolidations is enabled, you can provide a consolidation book ID instead. (Default: Configured reporting book ID)
adjbooks Optional adjbook[0...n] Adjustment book ID’s for journals that are enabled in the GL configuration. Use GAAP, TAX, and/or the IDs of user defined books. Do not append text to the ID’s. If you need help, look at the Account Balances page in the Sage Intacct UI to see what is enabled.
includereportingbook Optional boolean Combine reporting book with other adjustment books. Use true to include the reporting book entries with entries from the specified adjustment books, or false to return only entries for the specified adjustment books.
statistical Optional string Statistical accounts. Use either include, exclude, or only. (Default: include)
dept_subs Optional boolean Include department sub dimensions. (Default: true)
loc_subs Optional boolean Include location sub dimensions. (Default: true)
projectid Optional string Project ID or project group ID.
projectid_subs Optional boolean Include project sub dimensions. (Default: true)
projecttypeid Optional string Project type. Do not use if project ID is set.
customerid Optional string Customer ID or customer group ID
customerid_subs Optional boolean Include customer sub dimensions. (Default: true)
customertypeid Optional string Customer type. Do not use if Customer ID is set.
vendorid Optional string Vendor ID or vendor group ID
vendorid_subs Optional boolean Include vendor sub dimensions. (Default: true)
vendortypeid Optional string Vendor type. Do not use if Vendor ID is set.
employeeid Optional string Employee ID or employee group ID
employeeid_subs Optional boolean Include employee sub dimensions. (Default: true)
employeetypeid Optional string Employee type. Do not use if Employee ID is set.
itemid Optional string Item ID or item group ID
productlineid Optional string Product line. Do not use if Item ID is set.
classid Optional string Class ID or class group ID
classid_subs Optional boolean Include class sub dimensions. (Default: true)
contractid Optional string Contract ID or contract group ID
contractid_subs Optional boolean Include contract sub dimensions. (Default: true)
warehouseid Optional string Warehouse ID or warehouse group ID
warehouseid_subs Optional boolean Include warehouse sub dimensions. (Default: true)
userDefinedDimensions Optional userDefinedDimension[0...n] User defined dimension filters

userDefinedDimension

Name Required Type Description
objectName Required string UDD object integration name.
recordId Optional string UDD record ID. Do not use if Record name is set.
recordName Optional string UDD record name. Do not use if Record ID set. If UDD name is not unique, must use record ID instead.

List Raw Account Balances

Raw account balances include an opening balance, for period/net change amounts, ending balance, and adjustments together with all book and dimension combinations. This data is very complex and requires intricate Sage Intacct financial reporting knowledge in order to list the appropriate data so that it represents that of the Sage Intacct Account Balance standard report and Financial Report Writer.

There can be performance issues as well since filtering, for let’s say a single GL account, may actually return thousands of records since it includes all combinations of transaction and base currencies, reporting books, and all dimensions. This list also does not roll up parent-child hierarchical balances nor allow for filtering by a parent. You also need an understanding of how multiple base currency entities and consolidation books work, so you can properly filter out the transactional currency amounts—you should likely run the list slide from the context of an entity and not the top shared level.

Using the legacy function above is recommended instead—it provides information in a summarized format similar to that provided by the Sage Intacct Account Balance standard report and Financial Report Writer.

readByQuery

List account balances for the given period:

<readByQuery>
    <object>GLACCOUNTBALANCE</object>
    <fields>*</fields>
    <query>PERIOD = 'Month Ended June 2016'</query>
    <pagesize>100</pagesize>
</readByQuery>

List account balances for the given period, excluding entries with the specified zero balances:

<readByQuery>
    <object>GLACCOUNTBALANCE</object>
    <fields>*</fields>
    <query>PERIOD = 'Month Ended May 2017' AND NOT (TOTDEBIT = 0 AND TOTCREDIT = 0 AND TOTADJDEBIT = 0 AND TOTADJCREDIT = 0 AND FORBAL = 0 AND ENDBAL = 0)</query>
    <pagesize>100</pagesize>
</readByQuery>

Parameters

Name Required Type Description
object Required string Use GLACCOUNTBALANCE
fields Optional string Comma-separated list of fields on the object to list. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value.
query Required string SQL-like query based on fields on the object. Illegal XML characters must be properly encoded. The following SQL operators are supported: <, >, >=, <=, =, like, not like, in, not in. When doing NULL comparisons: IS NOT NULL, IS NULL. Multiple fields may be matched using the AND and OR operators. Joins are not supported. Single quotes in any operands must be escaped with a backslash - For example, the value Erik's Deli would become 'Erik\'s Deli'. Must provide PERIOD as a parameter.
pagesize Optional integer Custom page size between 1 and 1000 items (Default: 100)

query

Name Required Type Description
PERIOD Required string Budgetable reporting period name. These are the reporting periods shown on the Reporting Periods list with the budgetable flag set to true. System periods (Today, Current Month, Current Year to Date, etc) and non-budgetable reporting periods are not supported.
BOOKID Optional string Reporting book ID. System standard book ID’s include ACCRUAL, CASH, GAAPADJACCRUAL, GAAPADJCASH, TAXADJACCRUAL, TAXADJCASH, GAAPACCRUAL, GAAPCASH, TAXACCRUAL, TAXCASH, GAAPTAXACCRUAL, and GAAPTAXCASH. Keep in mind, these are dependent on the company/GL configuration. In addition to these, a Sage Intacct company may also have User Defined Books and/or Consolidation books. In the case of User Defined Books, the system appends ACCRUAL and CASH to the end of the User Defined Book ID to come up with the appropriate Book ID for GL Account Balances. For example, a UDB setup with the ID of TEST would have balances using the book ID’s TESTACCRUAL and TESTCASH.
CURRENCY Optional string Currency code. If the company is multi-currency and the request is run at the top level, your list will contain all currencies and not just the base. You should run the request privately in an entity or provide a currency filter with the base currency and whatever entity/location hierarchy needed.
OPENBAL Optional currency Opening account balance
TOTDEBIT Optional currency Total debits
TOTCREDIT Optional currency Total credits
TOTADJDEBIT Optional currency Total adjusting debits
TOTADJCREDIT Optional currency Total adjusting credits
FORBAL Optional currency For period account balance (debits - credits)
ENDBAL Optional currency Ending account account balance (opening + debits - credits)
WHENCREATED Optional string When the account balance was created in mm/dd/yyyy hh:mm:ss format
WHENMODIFIED Optional string When the account balance was last modified in mm/dd/yyyy hh:mm:ss format
CREATEDBY Optional integer User record number that created the account balance
MODIFIEDBY Optional integer User record number that last modified the account balance
ACCOUNTREC Optional integer Account record number
ACCOUNTNO Optional string Account number
ACCOUNTTITLE Optional string Account title
DEPARTMENTDIMKEY Optional integer Department record number
DEPARTMENTID Optional string Department ID
DEPARTMENTTITLE Optional string Department title
LOCATIONDIMKEY Optional integer Location record number
LOCATIONID Optional string Location ID
LOCATIONNAME Optional string Location name
PROJECTDIMKEY Optional integer Project record number
PROJECTID Optional string Project ID
PROJECTNAME Optional string Project name
CUSTOMERDIMKEY Optional integer Customer record number
CUSTOMERID Optional string Customer ID
CUSTOMERNAME Optional string Customer name
VENDORDIMKEY Optional integer Vendor record number
VENDORID Optional string Vendor ID
VENDORNAME Optional string Vendor name
EMPLOYEEDIMKEY Optional integer Employee record number
EMPLOYEEID Optional string Employee ID
EMPLOYEENAME Optional string Employee name
ITEMDIMKEY Optional integer Item record number
ITEMID Optional string Item ID
ITEMNAME Optional string Item name
WAREHOUSEDIMKEY Optional integer Warehouse record number
WAREHOUSEID Optional string Warehouse ID
WAREHOUSENAME Optional string Warehouse name
CLASSDIMKEY Optional integer Class record number
CLASSID Optional string Class ID
CLASSNAME Optional string Class name
CONTRACTDIMKEY Optional integer Contract record number
CONTRACTID Optional string Contract ID
CONTRACTNAME Optional string Contract name
GLDIM* Optional integer User defined dimension id field. UDD object integration name usually appended to GLDIM

Tips

If you only need to list the changes to account balances, you can use something like WHENMODIFIED &gt;= '04/19/2017 12:00:00' as part of your query.

Consider excluding fields you don’t need in order to avoid the underlying table joins in the Sage Intacct system. For example, query for DEPARTMENTDIMKEY instead of DEPARTMENTID and DEPARTMENTNAME. Then query DEPARTMENTID and DEPARTMENTNAME separately and join them in your system with the DEPARTMENTDIMKEY.


Provide feedback