Transaction Categorization
In order to get an accurate picture of their accounting, your customers must categorize and reconcile their bank account and credit card activity. This ensures all banking activity is recorded into the correct revenue and expense categories and matched with any other revenue, payroll, or bill data that has been imported into Layer.
Transaction categorization is one of the most common workflows performed within accounting software and will usually be done by either your customer or a bookkeeper hired by your customer.
Layer’s embedded accounting platform allows your customers to complete their transaction categorization workflows directly within your platform. There are two ways to offer transaction categorization within your platform:
- Embedded UI component - Embed Layer’s Transaction List UI component within your experience.
- API - Build a customized transaction categorization workflows on top of Layer’s transaction categorization API.
Embedded component
Install Layer’s Transaction List UI component via npm and embed it directly within your frontend. The Transaction List component handles all workflows related to transaction categorization including: displaying the list of transactions to categorize, surfacing suggested categorizations, matching transactions with invoices, and displaying the list of already categorized transactions. More detail on using Layer’s embedded UI components is available here.
API
For full control over the transaction categorization experience, you can build all transaction categorization workflows on top of Layer’s API.
Retrieving categorized transactions
The first step of transaction categorization is to retrieve Layer’s assigned categories and recommended categorization flows for all bank account and credit card transactions that have been imported into Layer. This is done by making a call to the List all Bank Transactions endpoint.
The API will respond with a list of all imported transactions.
Each Bank Transaction in the returned list will include two fields:
category
is the journaled category that has been assigned to the transaction and determines how the transaction will be journaled to the general ledger of the business in Layer’s systems. When Layer has high confidence in the category of a transaction, this will be set automatically. It can also be populated using input from the end user on your platform.categorization_flow
is Layer’s recommended approach for categorizing the transaction. In some cases, this will be automatically categorizing the transaction without any human input. In other cases, Layer will recommend prompting the end user to select from a list of suggested categories.
Categorizing transactions
Transactions can be categorized via API any time after they’ve been imported, regardless of whether the business has SMS based categorized flows turned on or off.
Transactions are categorized one at a time with a PUT
request to the Categorize Bank Transaction endpoint. Transactions can be recategorized after an original categorization is assigned, however this will change reports for any time period including the transaction.
The API will respond with a single Bank Transaction object.
The categorization_method
field will be populated to identify how the category was set (ex. “API”)
Even after categorization, the categorization_flow
and nested suggestions
array are retained on the Bank Transaction object so that they can be re-displayed in a UI if a user wants to recategorize.