Skip to main content

Policy Mapping

1. Overview

The Policy Mapping module in Sumo Ledger provides the linkage between policies and the aggregation layer. Its purpose is to map an Aggregate Slug to a human-readable Description, creating a named grouping that can then be referenced by the system when applying aggregated policy rules.

In simpler terms: while the Policy module defines what the rules are, Policy Mapping defines how those rules are grouped and labeled for aggregation. This is particularly useful when multiple policies need to be combined under a single reference point --- for example, grouping all daily-frequency policies under a daily aggregate slug.

Navigation: Configurations > General Settings > Policy Mapping

URL: https://las.ledger.raralabs.dev/settings/policymappings/list


2. Policy Mapping List View

The list view displays all existing policy mappings in a simple two-column table:

ColumnDescription
Aggregate SlugThe unique identifier for this mapping group (e.g., daily). This slug is used elsewhere in the system to reference this aggregation.
DescriptionA human-readable description of what this mapping represents (e.g., daily).

List View Actions

  • Search Bar: Filter mappings by typing a keyword.
  • Refresh: Reload the list.
  • View: Customize column visibility.
  • + New Mapping: Opens the form to create a new policy mapping.

3. Creating a New Policy Mapping

Click "+ New Mapping" in the top-right corner. A modal dialog opens with the title "New Policy Mapping" and the subtitle "Map aggregate policy slug to description."

Form Fields

FieldDescription
Aggregate SlugEnter a unique slug that will serve as the identifier for this aggregation group. Use lowercase letters, numbers, and underscores. This slug is referenced by the Aggregated Policy settings in the Policy module.
DescriptionEnter a plain-text description that explains the purpose of this mapping. This is for administrative clarity and does not affect system behavior.

Saving

Click "Create Policy Mapping" to save the new mapping.


4. Editing an Existing Policy Mapping

Click on any row in the list to open the Edit Policy Mapping modal. Both the Aggregate Slug and Description fields are editable. After making changes, click "Update Policy Mapping" to save.


5. How Policy Mapping Works in Practice

Policy Mapping serves as the naming layer for policy aggregation. Here is the typical workflow:

Step-by-Step Workflow

  1. Create one or more Policies in the Policy module, each with its own slug, limits, and rules.
  2. Create a Policy Mapping with an aggregate slug (e.g., daily) and a descriptive label.
  3. Link the aggregate slug to policies via the Aggregated Policy settings (the gear icon in the Policy list view). This tells the system: "When evaluating this aggregate group, apply all the policies linked under this slug."
  4. When a transaction occurs, the system looks up which aggregate slug applies, retrieves all linked policies, and validates the transaction against each one.

Example

Suppose you have two policies:

  • wallet_basic --- Max Cr Amount: 5000, Max Dr Amount: 5000
  • wallet_premium --- Max Cr Amount: 50000, Max Dr Amount: 50000

You create a Policy Mapping with aggregate slug daily and description Daily transaction limits. You then configure the Aggregated Policy to link wallet_basic under the daily aggregate for basic wallet users, and wallet_premium under daily for premium users. The system now applies the correct daily limits based on the user's wallet tier.


6. Best Practices

  1. Use descriptive aggregate slugs. Slugs like daily, monthly_standard, or high_value_channel are self-documenting and reduce confusion.
  2. Keep descriptions informative. While the slug is the machine reference, the description is what administrators read. A good description saves time when reviewing configurations.
  3. Plan your aggregation structure before creating mappings. Think through how policies will be grouped and layered before defining slugs, since renaming slugs later may require updating references elsewhere.
  4. Coordinate with Policy creation. Always create the policies first, then create the mapping to group them, and finally configure the aggregation link.