
Implementation example
1
Display a list of Transactions for review
Display the transactions that you want your users to review. In this example, all transactions with Display these to the user by iterating over
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.data.records
.2
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.Display the possible ledgers in a
- Use
/v0/ledgers
to retrieve all Ledgers.
<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.
3
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.