Channels
A channel is a named data-source registration. It captures three things you set once and re-use across many requests:
- Field mapping — how your raw bank payload maps to the canonical anti-fraud fields the rules engine reads.
- Sampling — what fraction of inbound events should be evaluated (1–100%). Useful for shadow rollouts.
- Lane —
onboardingortransaction. Scopes which canonical fields apply and which rules can fire.
How channels relate to /api/evaluate today
Today, real-time evaluation goes through POST /api/evaluate with a canonical-shaped body. The channel record carries your field-mapping config + sampling settings + observability metadata — visible in the dashboard's Channels view, used by the field-mapping preview, and consumed by the upcoming POST /api/channels/{id}/ingest route (2026 Q3) which will accept raw bank payloads and resolve them through the channel's mapping before evaluation. Until then, the canonical adapter lives in your service.
Channel object
{
"id": "ch_01HXY...",
"name": "Core banking — transfers",
"type": "transaction",
"lane": "transaction",
"status": "active",
"samplingPct": 100,
"fieldMapping": {
"transaction.amount": "$.payload.nominal",
"transaction.beneficiary_account": "$.payload.no_rek_tujuan",
"transaction.beneficiary_bank": "$.payload.bank_tujuan",
"transaction.channel": "$.payload.saluran",
"transaction.timestamp": "$.payload.tgl_transaksi",
"customer.id": "$.payload.cif",
"customer.account_id": "$.payload.no_rek_asal"
},
"createdAt": "...",
"updatedAt": "..."
}| Field | Meaning |
|---|---|
lane | onboarding (customer creation events) or transaction (per-event monitoring). |
status | active · paused. |
samplingPct | 1–100 integer. Sampling rate as percent. samplingRate (0.0–1.0) is also returned as a UI alias. |
fieldMapping | Object mapping canonical field path → JSONPath into your raw payload. |
Canonical fields
The destination side of the mapping is fixed. These are the canonical fields the rules engine reads.
Onboarding lane
| Field | Req'd | Type | Description |
|---|---|---|---|
identity.nik | required | string | 16-digit Indonesian national ID. |
identity.full_name | required | string | As printed on the KTP. |
identity.email | required | string | Applicant's email. |
identity.phone | required | string | +62 / 08 prefix mobile. |
identity.dob | recommended | date | YYYY-MM-DD. |
address.city | recommended | string | Kota / Kabupaten of residence. |
address.province | recommended | string | Provinsi (e.g. DKI Jakarta, Jawa Barat). |
session.referral | optional | string | Promo / referral code if any. |
Transaction lane
| Field | Req'd | Type | Description |
|---|---|---|---|
customer.id | required | string | Internal customer / CIF — must already exist. |
transaction.amount | required | number | Whole rupiah. |
transaction.beneficiary_account | required | string | Destination account number. |
transaction.channel | required | enum | bi_fast · qris · virtual_account · internal · rtgs · topup_ewallet. |
transaction.beneficiary_bank | recommended | string | Bank code or name (BCA, MANDIRI, BRI, BNI). |
transaction.timestamp | recommended | date | ISO-8601 of the event. |
customer.account_id | recommended | string | Customer's source account number. |
transaction.purpose | optional | string | Free-text berita. |
Endpoints
/api/channelsFilters: lane (onboarding · transaction). Returns channels for the current org with their full fieldMapping and sampling settings.
/api/channels{
"name": "Core banking — transfers",
"type": "transaction",
"lane": "transaction",
"samplingPct": 100,
"fieldMapping": {
"transaction.amount": "$.payload.nominal",
"transaction.beneficiary_account": "$.payload.no_rek_tujuan",
"customer.id": "$.payload.cif"
}
}/api/channels/{id}Partial update — set any of name, type, status, fieldMapping, samplingPct. Admin role required.
/api/channels/{id}Soft-deletes the channel. The fieldMapping config is removed from the dashboard's preview surfaces but evaluation traffic via /api/evaluate is unaffected (the canonical body shape is the contract there).
Sampling
Samples are decided per-event by your service today — samplingPct records intent and surfaces it in the Channels view so an analyst can see "this channel is currently in 10% shadow mode" without grepping config. The forthcoming POST /api/channels/{id}/ingest route (2026 Q3) will enforce sampling server-side when configured.
Don't sample onboarding
Onboarding-lane events should evaluate at 100% — you can't partially onboard a customer. Sampling is intended for high-volume transaction-lane traffic where you want to shadow-test a new rule pack before opening it to full traffic.
Audit
Channel create / update / delete writes an audit-log row with action: channel.created|channel.updated|channel.deleted, the actor, and a diff of what changed.