GL Accounts
GL (General Ledger) accounts can be used to categorize line items on invoices for accounting purposes. Mercoa provides functionality to manage GL accounts and optionally use AI to predict appropriate GL accounts for invoice line items.
Setting Up GL Accounts
GL accounts are stored in entity metadata. To add or update GL accounts for an entity, update the entity’s glAccountId
metadata key with an array of GL account objects:
Plain string values:
JSON values with subtitles:
GL Accounts can also be automatically synced using Accounting Sync.
Using GL Accounts
If you are using Mercoa’s React Component Library, line items will show a dropdown of GL accounts for the entity.
When selected, the glAccountId
will be added to the line item as a special glAccountId
field in the lineItem
object. It will not be added to the lineItem.metadata
object.
This glAccountId
field can be used to filter invoices by GL account.
Using AI to Predict GL Accounts
Mercoa can use AI to predict GL accounts for line items.
To enable this:
- Make sure the entity has a
glAccountId
metadata key set with the list of GL accounts as seen above. - Make sure the predictMetadata is set to true for the entity (defaults to true).
- Make sure all lineItem ocr fields are set to true (defaults to true).
Mercoa needs the user to manually tag the GL accounts for the first invoice. Once the initial invoice is created and manually tagged with GL accounts, the AI will be able to predict line item GL accounts for new invoices from the same vendor.