Overview
Risk analysis webhook events allow you to receive real-time notifications when a risk matrix is executed on an entity (person or company) or on a transaction. Gu1 sends HTTP POST requests to your configured webhook endpoint after each risk analysis completes, so you can sync risk scores with external systems, feed BI tools, or trigger workflows.Why Use Risk Analysis Events?
Risk Score Sync
Keep external systems updated with the latest risk scores
Workflow Automation
Trigger processes when analysis completes (e.g. escalation, reporting)
Audit Trail
Log every risk matrix execution for compliance
Analytics & BI
Feed risk results into dashboards and reports
Available Events
| Event Type | Description | When Triggered |
|---|---|---|
risk_analysis_entity_executed | Risk matrix run on person or company | When a risk matrix is executed on a person or company (manual run or automatic: entity_created, enrichment_completed, etc.) |
risk_analysis_transaction_executed | Risk matrix run on transaction | When a risk matrix is executed on a transaction (e.g. on create/update with rules applied) |
apps/api/src/services/rules-execution.service.ts (after successful rules engine execution).
Event Payload Structure
All risk analysis webhooks follow this structure:Key Payload Fields
The entity that was analyzed:
id, type (person | company | transaction), name, taxId, externalIdSummary of rule execution:
rulesHit, rulesNoHit, actionsExecuted (optional), totalScore, scoreResult, riskMatrixName, executionTimeMs, trigger, matchedRulesCount. May be null. Full structure and example: Rules Execution Summary.Final risk score from the risk matrix execution
Total number of rules evaluated
Number of rules that ran successfully
Execution time of the risk analysis in milliseconds
What triggered the analysis (e.g.
entity_created, enrichment_completed, manual)Name of the risk matrix that was executed, or null
ID of the risk analysis audit record, or null
risk_analysis_entity_executed
Sent when a risk matrix is executed on a person or company entity. When it fires:- Manual risk analysis from the dashboard
- Automatic trigger on entity creation (when rules are applied)
- After enrichment completes (when configured to run rules)
- Other automatic triggers that run the rules engine on an entity
entity.type is person or company.
risk_analysis_transaction_executed
Sent when a risk matrix is executed on a transaction. When it fires:- Transaction created or updated with rules applied
- Any flow that runs the rules engine on a transaction
entity.type is transaction. For transactions, entity.name is typically the transaction external ID or identifier.
Code Example
Node.js β Handling Risk Analysis Events
Best Practices
- Idempotency: Use
entity.id+auditId(or timestamp) to avoid processing the same analysis twice. - Verify signature: Always validate
X-Webhook-Signatureas described in the security guide. - Respond quickly: Return 200 as soon as you receive the webhook; process asynchronously if needed.