Transaction .categorize
POST /{namespace}/transactions/{transaction}/categorize
Categorize codes a Transaction to an account in the chart by the Startup’s Policy and flags a low-confidence code for review.
- Noun
- Transaction
- Mode
do- Event
Transaction.categorized
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
transaction | Transaction | required | The Transaction to code. |
account | string | The account code to use in place of the Policy’s choice. |
Outputs
| Output | Type | Required | Description |
|---|---|---|---|
transaction | Transaction | required | The coded Transaction. |
account | string | required | The account code it was coded to. |
confidence | number | required | How sure the code is, from 0 to 1. |
Effects
- Emits
Transaction.categorized. - Performed by the Finance Lead.
- Two-way: it runs at once, in the
try,sendanddomodes. - Below the Policy’s confidence threshold, opens a review Task for the Finance Lead.
- A new code posts a reversing pair and a new pair; the first pair stays.
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | Transaction.categorize |
When it waits
| Gate | Default |
|---|---|
| Decision class | Low: two-way, nothing at stake |
| Delay window | None: it runs once review passes. |
| Limit | The call Limit of the Permission it runs under. |
| Over the Limit | It waits pending for an Approval from the Founder. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled. |