Reviewing transactions
Build a transaction review workflow
The goal of categorizing transactions is to ensure that your user’s accounting reports are accurate. Teal’s auto-categorization pipeline streamlines much of this tedious process, but sometimes you will want to prompt your users to confirm some transactions.
We call this key accounting workflow Reviewing Transactions, and versions of this workflow exist in most popular accounting products. Using a combination of the Transactions and Ledger endpoints, you can build a customizable transaction review workflow for your users.
Implementation example
Display a list of Transactions for review
Display the transactions that you want your users to review. In this example, all transactions with review_status
= unreviewed
are displayed. This is the default status for all newly created transactions.
Use the List Transactions endpoint with the source_account_id
of a specific transaction source account to get a list of all unreviewed
transactions.
Display these to the user by iterating over data.records
.
Update the category (Optional)
Sometimes a user needs to change how a Transaction is categorized. To do this, you need a list of all Ledgers and then allow the user to select which one they would like to assign as the new category.
- Use
/v0/ledgers
to retrieve all Ledgers.
Display the possible ledgers in a <select>
element by iterating over data.records
.
- After a user has selected a category, submit the
ledger_id
of the new category to the Recategorize Transaction endpoint.
Confirm the Transaction and remove from the list
Once the user has reviewed the transaction and confirm the category, update the Transaction review_status
from unreviewed
to reviewed
using the Update Transaction endpoint with source_account_id
and transaction_id
, passing along the new review status.
Notes
- When a Transaction is processed in Teal’s auto-categorization pipeline and it does not match any ledger, it will be categorized as either an Uncategorized Cash Inflow or Uncategorized Cash Outflow. You can choose to only display transactions with these categories in your review list.
- Use the
categorization_method
attribute to filter transactions based on what categorization step they were categorized at. For example, you may want users to only review transactions that have gone through the AI categorization step, but not those categorized by Instance level rules.