DOCUMENTATION · v1.0.0

Decision Management System

Everything you need to design, simulate, operate, govern, and audit lending decisions — from a single, modular control plane.

14Modules
5Categories
SAMAAligned
7 yrsRetention
Getting started

Overview

DMS is a modular decision platform for lending. It turns business policy into deterministic, auditable, simulatable rules — with humans in the loop where it matters.

What is DMS?

DMS sits between your Loan Origination System (LOS), your Loan Management System (LMS), your Collections platform, and your bureau / core-banking data. It receives applicants or events, evaluates them against your live policy, and returns a verdict — with a full forensic trail.

A "decision" in DMS is never a black box. Every rule that fired, every constant it read, every score it computed, and every cell it landed in is recorded and replayable.

One platform, three personas. Risk & policy authors design in the Workspace. Underwriters and operators run the live shop in Operate. Compliance and admins govern in Governance and Administration.

How a decision flows

The end-to-end path of a single application through DMS:

  1. Ingest. LOS posts an application; DMS resolves the IQAMA against bureau, core-banking, and internal tables via Input & Schema.
  2. Score. The active Decisioning Studio scorecard produces a numeric score; Rule Engine rules and Rule Flow diagrams evaluate eligibility (RAC) gates.
  3. Price. Pricing Studio derives a rate from base + risk premium + score discount and clamps it to product floors/ceilings.
  4. Decide. Auto-approve, auto-decline, or route into the Underwriter Queue for human review.
  5. Communicate. Comms Studio alerts the right stakeholders (operators, admins, customer-facing teams).
  6. Record. Every step is captured in Audit Logs and replayable forever via Decision Replay.

Who uses what

Risk & Policy

Rule Engine, Rule Flow, AI Advisor, Decisioning Studio, Pricing Studio, Policy Versioning.

Operations

Dashboard, Underwriter Queue, Decision Replay, Comms Studio, Audit Logs.

Compliance & Admin

Audit Logs, Policy Versioning, Users, Roles & Permissions.

Getting started

Architecture

A clean separation between policy definition, runtime evaluation, human review, and audit.

The four layers

Authoring
Rule Engine · Rule Flow · AI Advisor · Decisioning Studio · Pricing Studio
Data plane
Input & Schema connections, alias maps, global constants & functions
Runtime
Active policy version → deterministic evaluator → verdict + reasons + trace
Human & audit
Underwriter Queue · Comms Studio · Decision Replay · Audit Logs

Design principles

  • Deterministic by default. Same inputs + same policy version → same verdict, always. AI never sits on the critical path; it advises only.
  • Everything is versioned. Rules, flows, RACs, scorecards, matrices, and policies are immutable once activated. Cloning a draft is the only way to evolve.
  • Humans are first-class. Soft policy fails, missing bureau, or grey-band scores route to the queue with a full reason trail.
  • The ledger is sacred. Every action by a user, the system, or an AI is captured in a tamper-evident audit chain.
Getting started

Quickstart

From zero to a first decision in five minutes.

  1. 1

    Connect your data

    Open Input & Schema and add a connection (MySQL, Datalake, or REST). Click Test connection — you should see green tick and a column count.

  2. 2

    Write your first rule

    Go to Rule Engine, click an example like "DBR cap (Personal Loan)", then Run Test with a sample IQAMA. Save it.

  3. 3

    Build a flow (optional)

    Use Rule Flow to visually compose multiple rules + comparisons into one diagram. Right for non-technical authors.

  4. 4

    Bundle into a policy version

    Policy Versioning → New version → pick your rules & flows → Simulate. When happy, Activate (4-eyes optional).

  5. 5

    Watch it run

    Send a real application from your LOS. Watch it land in the Dashboard ticker; click it to open Decision Replay.

Press / anywhere in this page to focus the search bar. ⌘ K jumps to the global nav search.
Getting started

Key concepts

The vocabulary used across all DMS modules.

Rule
A single boolean or numeric expression evaluated against an applicant's fields and global constants. Authored in Rule Engine.
Flow
A visual composition of rules, comparisons, AND/OR gates, function calls, and a START → END path. Authored in Rule Flow.
RAC
Risk Acceptance Criteria. Hard policy gates evaluated before scoring (age, blacklist, DBR cap). Authored in Decisioning Studio.
Scorecard
A weighted-band model that produces a numeric credit score from demographics + behaviour + bureau signals.
Matrix
A lookup table of two dimensions (e.g. score band × tenure) that maps to a rate, limit, or decision.
Policy version
An immutable bundle of rules + flows + RAC + scorecard + matrices, marked draft, active, or archived.
Decision trace
The full record of which rules fired, which values were read, and which path was taken for one application.
Reason code
A short, customer-facing code (e.g. REJ-04) that explains an adverse outcome.
SLA
Service-level agreement. The time budget for a manual review case before it's flagged as breaching.
Trace ID
A unique identifier (e.g. trc_uw_1408) that stitches together every event for one decision.
Workspace

Rule Engine

Author single-output rules in a domain-specific language (DSL) with full schema autocomplete, syntax highlighting, and a live test console.

Overview

The Rule Engine is for one-line-of-business policy expressions — eligibility checks, DBR formulas, credit-score components, fees, IRRs, and adverse-action mapping. Each saved rule produces a single typed output: Boolean, Integer, Decimal, or String.

Anatomy of the page

  • Schema Explorer (left) — a tree of every database, table, and column you've connected via Input & Schema. Click or drag a column to insert it at the cursor.
  • Constants & Functions tabs — reusable values (MIN_SALARY, MAX_DBR_PCT) and helpers (FN_age(dob), FN_dbr(...)).
  • Editor (centre) — CodeMirror with the DMS DSL mode: keywords (IF, THEN, ELSE, AND, OR, NOT), constants, functions, and table.column references are all syntax-coloured.
  • Toolbar — pick the rule type, the output name, run a test, save the rule, or save as a function for reuse.
  • Test Console (right) — type a sample IQAMA or Application ID and click Run Test. See inputs, intermediate steps, and the final output value.
  • Example Scripts modal — 15 BRD-aligned starters (DBR, credit scoring, KYC, collections segmentation, etc.).

Syntax

The DSL is intentionally close to natural English with a sprinkle of math.

// Eligibility — must be 22+, salaried, and DBR within cap
IF Customer_Info.age >= MIN_AGE
   AND Customer_Info.employment_type = "salaried"
   AND FN_dbr(Customer_Info.existing_emi, Application.loan_emi, Customer_Info.monthly_income) <= MAX_DBR_PCT
THEN true
ELSE false
Keywords are case-insensitive (ifIF). Identifiers and string literals are case-sensitive.

Operators & helpers

CategoryTokens
Comparison= != > < >= <=
LogicalAND OR NOT
Arithmetic+ - * / · parentheses for grouping
AggregatesSUM AVG MIN MAX COUNT
ControlIF … THEN … ELSE
Literalstrue false · numbers · quoted strings

Output types

BooleanPass/fail rules — eligibility, KYC, blacklist.
IntegerTenure, score, count of matched conditions.
DecimalDBR ratio, IRR, premium, discount.
StringReason code, policy comment, segment label.

Tips

  • Use the Save as function button to extract a reusable helper. Then call it from any rule as FN_yourName(...).
  • Constants store both the value and a description. Authors and auditors see the description on hover.
  • The Test Console shows every intermediate value — great for debugging long expressions.
  • Keep one rule = one output. If you need branching outputs, use Rule Flow instead.
Workspace

Rule Flow

A visual drag-and-drop designer that produces the same deterministic evaluations as Rule Engine — without writing code.

Overview

Rule Flow gives non-technical authors a friendly canvas. Drag blocks, draw connections, double-click a block to configure it, and you have a runnable diagram. Every flow starts with a START block and ends with RETURN.

Block types

BlockPurposeInputs / Outputs
STARTEntry point of the flow.— / 1
Schema inputReads a column from a connected table.— / 1
ConstantProvides a literal or a Global Constant value.— / 1
Comparison= != > < >= <=2 / 1 (boolean)
AND / ORLogical fan-in (configurable: 2 – 6 inputs).n / 1
NOTInverts a boolean.1 / 1
ConditionIF … THEN … ELSE branch.3 / 1
FunctionCall a Global Function; inputs derive from arity.n / 1
Math+ − × ÷ SUM AVG MIN MAX2–n / 1
RETURNEmits the flow's final output value.1 / —
Multi-input AND/OR. Open a block and set Inputs from 2 to 6. The box grows and shows that many connection circles on the input side.

Canvas controls

  • Pan. Hold space or drag any empty area.
  • Zoom. Trackpad pinch, or use the +/− buttons.
  • Connect. Drag from the small circle on the right of a block to the circle on the left of another.
  • Configure. Double-click a block to open the node editor — here you pick the DB · table · column, comparison operator, literal, or function.
  • Delete. Select a block or edge and press Delete.

Test runner

Click Run flow. DMS highlights the active path step by step from START to RETURN, annotating each block with its input, calculation, and output values. This is the same trace the Underwriter sees in Decision Replay.

Built-in examples

Use the Example flows button to load: DBR check, Credit scoring, Eligibility gates, Collections segmentation, and KYC verification.

Workspace

AI Advisor

An always-on analyst that mines your portfolio data to suggest policy tweaks — never auto-applied, always reviewable.

Overview

The Advisor watches every recorded decision and customer outcome (DPD, write-off, regular pay, legal action) and continuously trains a shadow model. It surfaces opportunities to lift approval rates, tighten loss bands, re-price segments, or expand into adjacent customer cohorts.

AI never decides. The Advisor only produces recommendations. A risk owner must Preview Impact, Simulate, and explicitly Activate a derived policy version.

What it learns from

  • Customer demographics — age, employment, segment, employer tier.
  • Loan history — product, principal, tenure, repayment cadence.
  • Repayment behaviour — DPD buckets, prepayments, delays, defaults.
  • Collections actions — reminders, restructures, legal escalation, write-off.
  • Bureau signals — SIMAH score deltas, foreign-bureau lookups.

Recommendation types

Threshold tweakSuggest a numeric move (e.g. MIN_SALARY 8,000 → 7,400).
Segment expansionPromote a sub-cohort into a higher band.
Matrix re-cellRe-price a specific (band × tenure) cell.
Anomaly alert"Decline rate jumped 9 pp in Segment B" — auto-tickets to Operations.

Preview Impact

Click Preview impact on any recommendation. An animated popup replays the last N production decisions through the proposed change and shows:

  • Δ approval rate (with confidence band).
  • Δ expected loss.
  • Customers newly reachable.
  • Revenue projection at 3 / 6 / 12 months.

If you accept, the Advisor opens a draft policy version pre-populated with the change — ready to Simulate in Policy Versioning.

Workspace

Input & Schema

Manage the connections, tables, and aliases that feed every rule, flow, and matrix.

Overview

DMS reads data; it never mutates upstream systems. Input & Schema is where you register data sources, inspect their schemas, and (optionally) rename columns to friendlier labels for Rule Engine and Rule Flow authors.

Connection types

MySQL / Postgres

Host, port, db, user, password, optional SSH tunnel. Auto-discovers tables & columns on first connect.

Datalake

S3 / ADLS-style buckets with Parquet/CSV. Schema inferred from file headers; partition keys honoured.

REST API

Endpoint, auth type (bearer / OAuth2 / API key), and a sample response. DMS infers fields from the schema you paste.

Workflow

  1. 1

    Add connection

    Top-right + New connection. Fill credentials, hit Test. Green tick = ready.

  2. 2

    Explore schema

    Click a connection in the list to see its tables. Click a table to expand columns — types, nullability, sample values.

  3. 3

    Alias map

    Hit Map columns on any table. Rename ugly columns (cust_dobDate of Birth) for downstream readability. Original schema is never touched.

  4. 4

    Global constants

    Add reusable values like MIN_SALARY = 8000 with a description. They show up in Rule Engine & Rule Flow autocomplete instantly.

Connection credentials are encrypted at rest. Only Admin and Risk-Lead roles can edit or delete a connection.
Workspace

Decisioning Studio

Define your RAC gates, weighted Scorecard, and lookup Matrix — all in one studio.

Three modes

RAC

Risk Acceptance Criteria. Hard policy gates: age, income, DBR, blacklist, IQAMA validity. Any fail = auto-decline.

Scorecard

Weighted-band model. Drag sliders to set weights for demographics, behaviour, bureau, and stability. Animated score ring shows the impact.

Matrix

Two-dimensional lookup (e.g. score band × tenure) for rate, limit, or decision. Click any cell to edit; heatmap shows risk density.

RAC editor

Each RAC has a name, a description, a hard/soft toggle, and a check expression. Soft fails route to the Underwriter Queue with a specific reason code; hard fails decline.

Scorecard editor

Weights must sum to 100. The studio enforces this live as you drag sliders — the score ring re-animates and shows where a sample applicant would land. You can press AI assist to ask the Advisor for weight suggestions based on realised outcomes.

Matrix editor

Define two axes (e.g. score band A–E, tenure 12/24/36/48/60 months) and a payload (rate, limit, or decision). Hover any cell to see its production hit-count and realised loss.

Workspace

Pricing Studio

Build the rate that lands in the customer's contract — from base rate, risk premium, score discount, and product clamps.

The formula

RawPremium     = BaseRate(SIBOR + spread) + RiskPremium(tenure_matrix)
ScoreDiscount  = MAX(score_discount_fn(score), floor_cap)
FinalPremium   = clamp(RawPremium * (1 - ScoreDiscount), min_rp, max_rp)

Products

Three products live side-by-side: Tawaruq 1, Tawaruq 2, and Digital Installments. Each has its own base rate, tenure matrix, and clamps. Pick a product from the card grid; the live calculator on the right re-runs the formula instantly.

Live calculator

  • Drag the Score and Tenure sliders to see Raw → Discount → Final visually flow through the breakdown chain.
  • The risk-to-rate curve plots final premium vs score for the chosen tenure — helpful for sanity-checking edge cases.
  • The heatmap shows realised loss vs priced premium for every (score × tenure) cell.
The full BRD (Pricing Calculation V.3) is reflected here. Changes are logged in Audit Logs with field-level diffs so SAMA can trace every rate move.
Operate

Decision Replay

Forensic inspection of any decision — every rule fired, every value read, every gate passed or failed.

When to use it

  • Customer dispute. "Why was I declined?" — pull the trace, see the failing rule and its reason code.
  • SAMA audit. Export a signed PDF/CSV pack covering any date range or segment.
  • Internal debugging. A new rule producing unexpected outcomes — replay last 1,000 applications through it.

Anatomy of a trace

Each trace shows:

  • Applicant fingerprint (IQAMA, product, requested amount, channel).
  • Active policy version snapshot at decision time.
  • Per-rule evaluation: input values, expression, computed value, outcome (✔ / ✗).
  • Score components and the matrix cell hit.
  • Adverse-action code (if declined).
  • Decision latency timeline (ingest → score → price → verdict).

Filtering & export

Filter the list by date, product, channel, status, or score band. Export produces a signed bundle (PDF + CSV + JSON manifest) with audit checksums — ready for regulator submission.

Operate

Underwriter Queue

The tactical cockpit where humans take over: grey-band scores, soft policy fails, missing bureau — routed here with full context.

What gets routed

ReasonTriggerSLA
RT-GREY-SCOREScore in grey band4h
RT-BUREAU-MISSSIMAH lookup empty / stale2h
RT-SOFT-POLICYSoft RAC failed4h
RT-DOC-PENDINGDocument upload required24h
RT-EXCEPTIONManual escalation1h

The cockpit

  • HUD — live counters for active, breaching, in-review, decided 24h.
  • Radar — each case is a dot placed by reason (angle) and SLA (distance). Breaching cases pulse red.
  • Focus stage — click a dot to lock onto a case. SLA ring, app score, SIMAH score, DBR, and audit ribbon all appear.
  • Up-next deck — horizontally scrolling cards sorted by SLA. Claim next critical is one tap away.

Decisions

Five actions per case:

  • Approve — optionally with override amount and a reason code (e.g. AP-OVR-04).
  • Decline — reason code mandatory (e.g. DC-INC-02).
  • Request info — pause SLA until applicant responds.
  • Assign — hand the case to a specific colleague.
  • Skip — return to queue, log a reason.

Every action triggers the dramatic verdict reveal animation and writes a full ribbon row.

Operate

Comms Studio

Internal alerting — SMS / email templates that reach stakeholders when DMS executes a rule, makes (or can't make) a decision, or needs human attention.

Overview

Comms Studio is not a customer-facing marketing tool. It's the alerting backbone for DMS operators: admins, on-call risk, compliance, and reviewers. Triggers come from DMS events (rule fired, RAC failed, queue breach, anomaly detected).

Trigger types

  • Decision events — approved, declined, manual review needed.
  • System events — service degraded, retrain done, ETL failure.
  • AI events — anomaly above threshold, drift signal, new recommendation.
  • Governance events — policy activated, role permission changed.

Templates & merge fields

Each template has SMS and email variants. Merge fields look like {{applicant.iqama}}, {{decision.reason}}, {{sla.remaining}}. The preview pane shows a fully resolved sample.

Recipients & groups

Add individual contacts (phone + email) or create groups (e.g. Compliance on-call, Underwriting team A). Each trigger can fire to one or many groups. Quiet hours and rate limits are honoured per group.

Governance

Policy Versioning

The control centre for everything that decides. Bundle rules + flows + RAC + scorecard + matrix into immutable, simulatable, replayable versions.

Lifecycle

Draft
Editable. Can be simulated.
Active
Live in production. Immutable. Previous version auto-archives.
Archived
Retained for replay & audit. Cannot be re-activated — clone it.

Creating a version

  1. 1

    Pick or create a policy

    Examples: Personal Loan, Credit Card, Auto Loan, Digital Installments.

  2. 2

    Clone or start fresh

    Most teams clone the latest active version and tweak.

  3. 3

    Add rules & flows

    Open the edit modal, pick from the library, mark each as Mandatory or Soft.

  4. 4

    Simulate

    Run the dry-run simulator against a sample applicant or replay the last 1,000 production decisions through the draft.

  5. 5

    Activate

    4-eyes optional. Activation is logged in Audit Logs as a critical event.

The simulator

A full-screen dry-run with animated execution. Inputs on the left, step-by-step execution flow in the centre (each rule turns running → pass / fail / skip), verdict on the right. Use it before every activation.

A policy in use by an active flow or marketing campaign cannot be deleted — only archived.
Governance

Audit Logs

Forensic ledger — every action, every change, every decision, recorded and signed.

What's captured

  • User actions — rule edits, RAC changes, policy activations, queue decisions, exports, logins, MFA changes.
  • System actions — auto-decisions, ETL jobs, scheduled retrains, webhook deliveries, service health events.
  • AI actions — recommendations, anomaly alerts, drift signals.

Anatomy of an event

FieldDescription
idGlobally unique event ID.
actorPerson, service, or AI agent.
actionVerb — create, update, delete, decision, etc.
targetThe thing acted on (rule, policy, case, connection…).
severityinfo · notice · warning · critical.
diffField-level before/after (for updates).
trace_idStitches related events together.
checksumSHA-256 over the event body for tamper detection.

Retention & export

Events are immutable, signed at write time, retained for 7 years (SAMA aligned). Export filtered slices as CSV directly from the toolbar.

Administration

Users

Profile management, role assignment, MFA, activity timeline.

User list

Searchable, filterable list of every active person in DMS. Each row shows name, role(s), team, MFA status, and last active. Status toggles flip a user between active / suspended / off-boarded.

User profile drawer

  • Identity — name, email, phone, IQAMA, employer ID.
  • Roles — assign one or more (see Roles & Permissions).
  • MFA — enable TOTP / SMS factors.
  • Activity timeline — recent logins, decisions made, edits performed.

Off-boarding

One click: revoke all roles, terminate active sessions, rotate keys, archive activity. The user remains in Audit Logs forever for compliance, but cannot sign in.

Administration

Roles & Permissions

Granular, module-by-module access control with an animated coverage ring.

Permission matrix

A grid of modules × actions. For each role, toggle which actions are allowed:

ActionWhat it grants
readView pages and data in the module.
createAdd new entities (rules, connections, users…).
updateEdit existing entities.
deleteSoft-delete or archive entities.
activatePromote drafts to live (policies, versions).
exportPull data out as CSV/PDF/JSON.
decideTake queue decisions (approve, decline, info).

Built-in roles

Risk ManagerFull authoring + simulate + activate.
Policy AuthorAuthoring only — cannot activate.
UnderwriterQueue decisions + replay reads.
Compliance OfficerRead-everything + export.
Operations LeadComms templates + monitoring.
System AdministratorUsers, roles, connections, system settings.
Permission changes are critical-severity events in Audit Logs, including a before/after diff of the permission list.
Reference

Glossary

BRD
Business Requirements Document — the source of truth for product specs (e.g. Pricing Calculation V.3).
DBR
Debt Burden Ratio — (existing EMI + this EMI) ÷ monthly income.
DPD
Days Past Due — how late a repayment is.
IQAMA
The KSA resident permit number, used as a primary customer identifier.
IRR
Internal Rate of Return on a loan, expressed as an annualised percentage.
KYC
Know Your Customer — identity verification gates.
LOS
Loan Origination System — the upstream channel that submits applications.
LMS
Loan Management System — the post-disbursal book of business.
PSI
Population Stability Index — a drift metric used by the AI Advisor.
RAC
Risk Acceptance Criteria — hard policy gates.
SAMA
Saudi Central Bank — the regulator DMS reports to.
SIBOR
Saudi Interbank Offered Rate — the base rate component used in pricing.
SIMAH
Saudi Credit Bureau — primary external risk signal.
Reference

Keyboard shortcuts

ActionShortcut
Open global nav search K
Jump to Dashboard 1
Jump to Rule Engine 2
Jump to Rule Flow 3
Jump to AI Advisor 4
Jump to Input & Schema 5
Jump to Decisioning Studio 6
Jump to Pricing Studio 7
Jump to Decision Replay 8
Jump to Policy Versioning 9
Jump to Audit Logs 0
Focus the docs search/
Close any modal / overlayEsc
Reference

Changelog

  • v1.0.0
    Audit Logs rebuilt as forensic ledger with live streaming, filters, inspector pane, and CSV export.
  • v1.0.0
    Policy Versioning rebuilt with multi-version history, simulator, and AI-authored badges.
  • v1.0.0
    Underwriter Queue tactical cockpit with radar plotting and live SLA rings.
  • v0.9
    Comms Studio pivoted from customer marketing to internal alerting.
  • v0.9
    Users + Roles & Permissions introduced with permission matrix and animated coverage ring.
  • v0.8
    Pricing Studio aligned to BRD Pricing Calculation V.3; card-based product selector.
  • v0.8
    Decisioning Studio built from PF RAC and Scorecard V2 with three modes.
  • v0.7
    Decision Replay added with forensic trace inspector.
  • v0.7
    Input & Schema revamped with connection types and alias mapping.
  • v0.6
    AI Advisor introduced with Preview Impact popup.