Skip to main content

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:

ColumnDescription
SlugA unique identifier string for the policy (e.g., sumo). Used as a reference key when mapping policies.
Allowed Transaction TypesWhich transaction directions the policy permits: Credit, Debit, or BOTH.
Allowed Balance TypeWhich balance directions the policy permits: Credit, Debit, or BOTH.
Is ActiveWhether the policy is currently enforced (Yes / No).
Min Cr AmountMinimum credit transaction amount allowed under this policy.
Min Dr AmountMinimum debit transaction amount allowed under this policy.
Max Cr AmountMaximum credit transaction amount allowed under this policy.
Max Dr AmountMaximum debit transaction amount allowed under this policy.
Min Cr BalanceMinimum credit balance the account must maintain under this policy.
Min Dr BalanceMinimum debit balance the account must maintain under this policy.
Max Cr BalanceMaximum credit balance the account can hold under this policy.
Max Dr BalanceMaximum debit balance the account can hold under this policy.
Aggregated PolicyA 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:

OptionDescription
CreditOnly credit transactions are permitted under this policy.
DebitOnly debit transactions are permitted under this policy.
BothBoth credit and debit transactions are permitted.

3.3 Allowed Balance Type

A toggle with three options:

OptionDescription
CreditThe account may only hold a credit balance.
DebitThe account may only hold a debit balance.
BothThe account may hold either a credit or debit balance.

3.4 Transaction Limits

These fields define the per-transaction amount boundaries:

FieldDescription
Minimum Credit AmountThe smallest credit transaction allowed. Transactions below this value are rejected.
Minimum Debit AmountThe smallest debit transaction allowed. Transactions below this value are rejected.
Maximum Credit AmountThe largest credit transaction allowed. Transactions above this value are rejected.
Maximum Debit AmountThe largest debit transaction allowed. Transactions above this value are rejected.

3.5 Balance Limits

These fields define the account balance boundaries:

FieldDescription
Minimum Credit BalanceThe lowest credit balance the account must maintain. The system prevents transactions that would drop the balance below this threshold.
Minimum Debit BalanceThe lowest debit balance the account must maintain.
Maximum Credit BalanceThe highest credit balance the account can hold. The system prevents transactions that would push the balance above this threshold.
Maximum Debit BalanceThe 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

  1. Use meaningful slug names. Since slugs are permanent and used as references, a descriptive name like savings_basic is far better than policy1.
  2. Set both transaction and balance limits. Transaction limits alone won't prevent an account from accumulating an unsafe balance over time.
  3. 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.
  4. Create policies before creating policy mappings. The mapping step references policies by slug, so the policy must exist first.
  5. Keep inactive policies for reference. Instead of deleting a policy you no longer need, uncheck "Is Active" to preserve it for auditing.