Sage Intacct
Sage Intacct is a cloud financial management and accounting system covering the general ledger, receivables, payables, contracts and revenue recognition, and multi-entity consolidation.
Bruin supports Sage Intacct as a source for Ingestr assets through the Sage Intacct REST API, and you can use it to ingest ledger, receivables, payables, and contract data into your data platform.
Configuration
Step 1: Add a connection to the .bruin.yml file
Provide client_id and client_secret with either username or refresh_token, or just access_token.
OAuth client credentials for a Web Services user (recommended):
connections:
sageintacct:
- name: "sageintacct"
client_id: "abc.app.sage.com"
client_secret: "your_client_secret"
username: "api_user@acme"
entity: "US-100"A refresh token from the OAuth authorization code flow:
connections:
sageintacct:
- name: "sageintacct"
client_id: "abc.app.sage.com"
client_secret: "your_client_secret"
refresh_token: "your_refresh_token"client_id,client_secret: The credentials of your Sage Intacct application from the Sage developer portal.username: The Web Services user for the client credentials grant, asuserId@companyId, oruserId@companyId|entityIdto sign in to a single entity. Use eitherusernameorrefresh_token, not both.refresh_token: A refresh token from the OAuth authorization code flow. Sage Intacct can issue a new refresh token on every use, which is only kept for the current run, so preferusernamefor scheduled loads.access_token: A ready access token, used withoutclient_idandclient_secret. It can't be renewed and expires after about 12 hours.entity(optional): The ID of the entity to read in a multi-entity company, for exampleUS-100.base_url(optional): The API base URL. Defaults tohttps://api.intacct.com/ia/api/v1.token_url(optional): The OAuth token URL. Defaults to<base_url>/oauth2/token.
To set up client credentials, create an application in the Sage developer portal, create a read-only Web Services user in Sage Intacct, and authorize the application for your company under Company > Setup > Security > Authorized Client Applications.
Step 2: Create an asset file for data ingestion
Create a YAML file (e.g. sageintacct_ingestion.yml) inside the assets folder:
name: public.intacct_customers
type: ingestr
parameters:
source_connection: sageintacct
source_table: 'customers'
destination: postgresname: The name of the asset.type: Set toingestr.source_connection: The name of the Sage Intacct connection defined in.bruin.yml.source_table: One of the tables below. To load only some fields, list them in the table name, for examplecustomers?fields=key,id,name,status.gl_account_activityaccepts adimensionsparameter, for examplegl_account_activity?dimensions=location,department,project.destination: The destination platform/type, for examplepostgres.
Step 3: Run asset to ingest data
bruin run assets/sageintacct_ingestion.ymlAvailable Source Tables
| Table | Primary Key | Incremental Key | Incremental Strategy | Details |
|---|---|---|---|---|
gl_accounts | key | whenModified | merge | The chart of accounts |
gl_journal_entries | key | whenModified | merge | Journal entry headers from every journal |
gl_journal_entry_lines | key | whenModified | merge | Debit and credit lines of journal entries |
gl_account_activity | - | entryDate | delete+insert | Posted GL activity summed per day, account, side, base currency, and dimension |
gl_reporting_periods | key | whenModified | merge | Reporting periods |
customers | key | whenModified | merge | Customers |
vendors | key | whenModified | merge | Vendors |
ar_invoices | key | whenModified | merge | Accounts receivable invoices |
ar_invoice_lines | key | whenModified | merge | Lines of AR invoices |
ar_payments | key | whenModified | merge | Payments received from customers |
ap_bills | key | whenModified | merge | Accounts payable bills |
ap_bill_lines | key | whenModified | merge | Lines of AP bills |
contracts | key | whenModified | merge | Contracts (Contracts module) |
contract_lines | key | whenModified | merge | Contract lines (Contracts module) |
contract_revenue_schedules | key | whenModified | merge | Revenue recognition schedules (Contracts module) |
contract_revenue_schedule_lines | key | whenModified | merge | Scheduled and posted revenue amounts (Contracts module) |
departments | key | whenModified | merge | Departments |
locations | key | whenModified | merge | Locations |
classes | key | whenModified | merge | Classes |
projects | key | whenModified | merge | Projects |
entities | key | whenModified | merge | Entities of a multi-entity company |
Incremental behavior and limitations
- Without an interval, every record is loaded. With an interval, the records modified within it are merged by
key. gl_account_activityreplaces every whole day the interval touches. An account's balance at a date is the sum ofnetAmountup to that date, so load the full history before computing balances.- The REST API doesn't return deleted records, so they stay in the destination. Run a full refresh to remove them.
- Sage Intacct meters API use per company and month. ingestr reads up to 4,000 records per request.