Skip to main content

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

Trigger location: 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

object
The entity that was analyzed: id, type (person | company | transaction), name, taxId, externalId
object
Summary of rule execution: rulesHit, rulesNoHit, actionsExecuted (optional), totalScore, scoreResult, riskMatrixName, executionTimeMs, trigger, matchedRulesCount. May be null. Full structure and example: Rules Execution Summary.
number
Final risk score from the risk matrix execution
number
Total number of rules evaluated
number
Number of rules that ran successfully
number
Execution time of the risk analysis in milliseconds
string
What triggered the analysis (e.g. entity_created, enrichment_completed, manual)
string
Name of the risk matrix that was executed, or null
string
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
Payload: Same structure as above; 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
Payload: Same structure; 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-Signature as described in the security guide.
  • Respond quickly: Return 200 as soon as you receive the webhook; process asynchronously if needed.

Next Steps

Entity Events

Handle entity lifecycle events

Transaction Events

Process transaction webhooks

Webhook Security

Secure your webhook endpoints

Configuration

Configure webhook settings