Policy
1. Overview
The Policy module in Sumo Ledger allows administrators to define reusable rule sets that govern how transactions and balances are validated across the system. A policy acts as a template of constraints --- specifying which transaction types are permitted, what balance types are allowed, and the minimum/maximum thresholds for both transaction amounts and account balances.
Policies are designed to be created once and then mapped (via the Policy Mapping module) to specific entities, making them a central building block of Sumo Ledger's compliance and risk framework.
Navigation: Configurations > General Settings > Policy
URL: https://las.ledger.raralabs.dev/settings/policy/list
2. Policy List View
The Policy list view displays all configured policies in a table with the following columns:
| Column | Description |
|---|---|
| Slug | A unique identifier string for the policy (e.g., sumo). Used as a reference key when mapping policies. |
| Allowed Transaction Types | Which transaction directions the policy permits: Credit, Debit, or BOTH. |
| Allowed Balance Type | Which balance directions the policy permits: Credit, Debit, or BOTH. |
| Is Active | Whether the policy is currently enforced (Yes / No). |
| Min Cr Amount | Minimum credit transaction amount allowed under this policy. |
| Min Dr Amount | Minimum debit transaction amount allowed under this policy. |
| Max Cr Amount | Maximum credit transaction amount allowed under this policy. |
| Max Dr Amount | Maximum debit transaction amount allowed under this policy. |
| Min Cr Balance | Minimum credit balance the account must maintain under this policy. |
| Min Dr Balance | Minimum debit balance the account must maintain under this policy. |
| Max Cr Balance | Maximum credit balance the account can hold under this policy. |
| Max Dr Balance | Maximum debit balance the account can hold under this policy. |
| Aggregated Policy | A gear icon linking to aggregated policy settings for this policy. |
List View Actions
- Refresh: Reload the list to reflect the latest data.
- View: Customize visible columns.
- + Add Policy: Opens the form to create a new policy.
3. Creating a New Policy
Click "+ Add Policy" in the top-right corner. A modal dialog opens with the following sections:
3.1 Slug
A text field where you enter a unique identifier for the policy. This slug is used as a reference key throughout the system --- for example, when linking the policy to entities via Policy Mapping.
Guidelines:
- Use lowercase letters, numbers, and underscores only.
- Keep it short and descriptive (e.g.,
standard_wallet,premium_user,daily_limit). - The slug cannot be changed after creation, so choose carefully.
3.2 Allowed Transaction Types
A toggle with three options:
| Option | Description |
|---|---|
| Credit | Only credit transactions are permitted under this policy. |
| Debit | Only debit transactions are permitted under this policy. |
| Both | Both credit and debit transactions are permitted. |
3.3 Allowed Balance Type
A toggle with three options:
| Option | Description |
|---|---|
| Credit | The account may only hold a credit balance. |
| Debit | The account may only hold a debit balance. |
| Both | The account may hold either a credit or debit balance. |
3.4 Transaction Limits
These fields define the per-transaction amount boundaries:
| Field | Description |
|---|---|
| Minimum Credit Amount | The smallest credit transaction allowed. Transactions below this value are rejected. |
| Minimum Debit Amount | The smallest debit transaction allowed. Transactions below this value are rejected. |
| Maximum Credit Amount | The largest credit transaction allowed. Transactions above this value are rejected. |
| Maximum Debit Amount | The largest debit transaction allowed. Transactions above this value are rejected. |
3.5 Balance Limits
These fields define the account balance boundaries:
| Field | Description |
|---|---|
| Minimum Credit Balance | The lowest credit balance the account must maintain. The system prevents transactions that would drop the balance below this threshold. |
| Minimum Debit Balance | The lowest debit balance the account must maintain. |
| Maximum Credit Balance | The highest credit balance the account can hold. The system prevents transactions that would push the balance above this threshold. |
| Maximum Debit Balance | The highest debit balance the account can hold. |
3.6 Is Active
A checkbox that determines whether the policy is enforced. When checked, the policy is active and its rules are applied. When unchecked, the policy exists in the system but is not enforced.
3.7 Saving
Click "Create Policy" to save the new policy.
4. Editing an Existing Policy
Click on any row in the Policy list to open the Edit Policy modal. All fields described above are editable. After making changes, click "Update Policy" to save.
5. Aggregated Policy
The Aggregated Policy column in the list view shows a gear icon for each policy. This feature allows you to configure how multiple policies are aggregated when more than one policy applies to the same entity or transaction. This is useful in complex setups where layered policies (e.g., a global policy plus a user-type-specific policy) must be resolved.
6. How Policies Interact with Other Modules
- Policy Mapping: Policies are linked to specific aggregation slugs via the Policy Mapping module, which determines where and how a policy is applied.
- Txn Controls: While Txn Controls define limits at the model level (user type, channel, process), Policies define limits as reusable rule sets. Both are evaluated during transaction processing --- a transaction must satisfy both the applicable policy and any active transaction controls.
7. Best Practices
- Use meaningful slug names. Since slugs are permanent and used as references, a descriptive name like
savings_basicis far better thanpolicy1. - Set both transaction and balance limits. Transaction limits alone won't prevent an account from accumulating an unsafe balance over time.
- Use "Both" for transaction and balance types unless you have a specific reason not to. Restricting to credit-only or debit-only is a strong constraint that should be deliberate.
- Create policies before creating policy mappings. The mapping step references policies by slug, so the policy must exist first.
- Keep inactive policies for reference. Instead of deleting a policy you no longer need, uncheck "Is Active" to preserve it for auditing.