Use client rules for onboarding screening and for changes to a client’s country or risk data. Use session rules for login and access checks: a new device, a VPN or Tor connection, a burst of IP addresses, or a device shared by many clients.
Client rules and session rules are rolled out per platform behind feature flags. If you don’t see the Client or Session option when you create a rule, ask your Corsa contact to enable it. With either enabled, the Transaction Monitoring module is called Monitoring Rules.
How they work
- You create a rule and choose Client or Session as what it applies to. You can’t change this later.
- When a client is created or updated, Corsa evaluates the active client rules whose trigger matches the change. When a session is created, Corsa evaluates the active session rules. Evaluation runs right after the write is stored, or inline when you ask for a decision.
- The rule’s conditions are checked against the client’s current data and, for a session rule, the new session.
- When the rule matches, Corsa creates an alert linked to the client (and, for a session rule, to the session). These alerts are not linked to a transaction.
What client and session rules can check
A client or session rule always checks one client (and one session), so you don’t choose a sender or receiver.
Client properties are the same as in transaction rules, and custom fields follow the custom field rules. In transaction history aggregations on a client rule, choose All of the client’s transactions, Outgoing or Incoming.
Some conditions need a transaction in progress, so neither kind offers them:
- transaction properties (amount, type, currency) outside an aggregation;
- wallet, bank account, payment account and merchant conditions;
- include current transaction on aggregations;
- conditions that match the current transaction’s counterparty or wallet.
Client rules
When a client rule runs
Each client rule has a trigger:Only when specific fields change
A rule that runs on updates can be narrowed to only when these fields change. List the client fields as dotted paths, as they appear in the client API (for example,address.country or address.city). The rule runs on an update only when one of those fields changed:
- A field matches a change to itself or to anything below it:
addressmatches a change toaddress.city. - A change to a whole parent object matches the fields inside it.
- Other fields don’t count: a rule on
address.citydoesn’t run when onlyaddress.countrychanges.
Alerts from client rules
- One alert per match (default): a rule alerts when a client starts matching. While the client keeps matching on later updates, no new alert is created. If the client stops matching and later matches again, the rule alerts again.
- Alert on every match: turn this on to create an alert every time the rule runs and matches.
Session rules
A session rule runs once, when the session is created, and checks that session together with its client. Updating a session (for example, settingendedAt) doesn’t run session rules again, and a rule alerts at most once for a session, even if the session event is delivered twice.
Session Activity
Session Activity compares the session being evaluated with earlier sessions: the client’s own, or every client’s sessions on the same IP or device. In the Rule Builder it appears under Client → Session Activity, and each condition reads as one row: Client · Session Activity · attribute · measure · time window · comparison Attributes
Measures
clients sharing it and sessions from this IP or device, any client are only available for IP Address and Device.
Time windows
- Ever (all of the client’s history), or in the last N minutes, hours, days or weeks.
- The window ends at the start of the session being evaluated and includes it. The session that crosses a threshold is the one that raises the alert.
- Measures that look across clients need an in the last window.
- If the session has no value for the attribute (for example, no device fingerprint or no ASN), the condition doesn’t match. A missing value never counts as zero.
property: "sessions" on the client entity:
“Device is new” is a same-value count equal to 1: the only session with this device is the current one. See Create a session rule for a full example.
Alerts
The only action on a client or session rule is Create alert. These rules can’t halt transactions.- Category: always
CLIENT_MONITORINGfor client rules andSESSION_MONITORINGfor session rules. Priority, assignee, sub-category and due date come from the rule’s alert settings, as for transaction rules. - Client Monitoring and Session Monitoring alerts appear in the Alerts queue with the client’s details (and the session, for session rules). You can filter, assign, escalate and resolve them like any other alert.
Build a rule in the dashboard
- Go to Monitoring Rules → Rules and click Create Rule.
- Choose Client or Session. You can’t change this after the rule is created.
- Define conditions. The condition menu offers client, device and IP data, plus Session Activity on session rules. Aggregations on client rules let you choose the direction of the client’s transactions.
- Configure the response:
- Client rules: Run on (Client created, Client created or updated, or Client updated), Only when these fields change when the rule runs on updates, and Alert on every match (off by default).
- Session rules always run when a session is created, so there’s no Run on choice.
- Alert priority and routing, as for transaction rules.
- Test the rule. Session rules replay recent sessions. Client rules can Backtest clients or Test one client. Tests create no alerts. See Testing client and session rules.
- Review and activate.
Get an inline decision
By default, client and session rules run right after the write is stored. To get the result in the response instead, setevaluateSynchronously: true when you:
- create or update a client (Ingesting clients). A create evaluates the rules that run on Client created; an update evaluates the rules that run on updates. Bulk updates never evaluate inline.
- create a session (Ingesting sessions), for example to step up authentication on a risky login.
evaluationResult:
The client or session is stored in every case, and matching rules create alerts as for asynchronous evaluation.
To check a stored client or session again without creating anything, use Evaluate a client or session.
Manage client and session rules with the API
Client and session rules use the same Rules API as transaction rules, with these extra fields:triggers and alertOnEveryMatch are refused on session rules. A request is also refused with 400 if the rule kind isn’t enabled for your platform, if a condition needs a transaction, if an action other than CREATE_ALERT is used, or if a Session Activity condition isn’t valid (for example, anyClient on IP country, or all_time with anyClient).
Rules are created as drafts. Activate a rule to start evaluating clients or sessions.
Create a client rule
Create a session rule
Change when a client rule runs
Sendtriggers or alertOnEveryMatch on update. Fields you omit keep their stored values.
List client or session rules
Filter onbaseEntity: $eq:client or $eq:session.
baseEntity, triggers and alertOnEveryMatch. A transaction or session rule returns triggers: null.
What’s next?
Ingesting sessions
Send sessions with IP and device data, and ask for an inline decision.
Testing rules
Backtest a client or session rule before you activate it.
Conditions reference
Operators, entities, aggregations and time windows.
Workflows
Start a workflow when a client session is created.