Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.gu1.ai/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The rulesExecutionSummary object is returned whenever the rules engine runs: on Create Transaction, Create Person, Create Company, Create Entity, Create Event, and in webhook payloads for Risk Analysis events. It summarizes which rules matched (hit), which did not (no hit), executed actions, and scoring metadata.

Where it appears

ContextLocation
Create transaction (with executeRules: true)Response root (rulesExecutionSummary)
Create person/company/entity (when risk matrix runs)Response root and rulesResult.rulesExecutionSummary
Create event (when rules run)Response root and rulesResult.rulesExecutionSummary
Risk analysis webhookspayload.rulesExecutionSummary

Field reference

FieldTypeDescription
rulesHitarrayRules whose conditions were met. Each item includes ruleId, ruleExternalId (when configured), riskMatrixId / riskMatrixName when the rule belongs to a matrix (multi-matrix and audit-friendly), plus name, description, score, priority, category, status, conditions, and optionally actions.
rulesNoHitarrayRules evaluated but conditions not met. Same structure as each rulesHit item.
actionsExecutedobjectPresent only when at least one action ran. Aggregated actions from all rules that hit.
totalScorenumberSum of the score of all rules that hit (excluding shadow rules).
scoreResultobjectNormalized score and label: rawScore, normalizedScore, and optional label (name, range, minScore, maxScore).
riskMatrixNamestringName of the risk matrix that was executed.
executionTimeMsnumberExecution time of the rules engine in milliseconds.
triggerstringEvent that triggered the evaluation (e.g. manual_evaluation, entity_created, enrichment_completed, created).
matchedRulesCountnumberNumber of rules that matched (same as rulesHit.length).
riskMatricesExecutedarrayOptional. One entry per risk matrix that contributed evaluated rules in this run: raw score, matched-rule count, and label metadata per matrix. Added when the API enriches the summary after evaluation (for example multi-matrix flows or persisted risk analysis). Omitted when not computed or empty.

rulesHit / rulesNoHit item

FieldTypeDescription
ruleIdstringRule UUID (persisted rule row).
ruleExternalIdstring | nullBusiness rule code when configured (e.g. RG-ENTITY-1).
riskMatrixIdstring | nullUUID of the risk matrix that owns this rule, or null if not tied to a matrix.
riskMatrixNamestring | nullMatrix display name when the execution context includes matrix labels.
namestringRule name.
descriptionstringRule description.
scorenumber | nullRule score (points when it hits).
prioritynumber | nullRule priority.
categorystringRule category.
statusstringRule status (e.g. active, shadow).
conditionsarrayConditions evaluated: each { field, value, operator? }.
actionsobjectFor rulesHit: executed actions. For rulesNoHit: configured actions. See below.

actions (inside each rule item)

FieldTypeDescription
alertsarrayAlert definitions: name, type, severity, description.
suggestionstringSuggestion type: BLOCK, SUSPEND, or FLAG.
statusstringStatus set by the rule.
assignedUserobject{ userId: string } if the rule assigns a user.
customKeysarrayCustom action keys (e.g. for workflows).

actionsExecuted (root)

FieldTypeDescription
alertsarrayAll alerts from rules that hit. Each alert can include ruleId, ruleExternalId, and investigationId (set after consolidation; null in the immediate response).
suggestionstringWinning suggestion by weight: BLOCK, SUSPEND, or FLAG.
statusstringFinal status applied (from the rule with highest weight).
assignedUserobject{ userId: string } if any rule assigned a user.
customKeysarrayAll custom action keys from rules that hit.

riskMatricesExecuted (each array item)

FieldTypeDescription
riskMatrixIdstring | nullMatrix UUID, or null for rules not tied to a matrix row.
riskMatrixNamestring | nullDisplay name of the matrix (resolved from the run or from organization metadata).
rawScorenumberSum of scores from rules that hit in this matrix (non-shadow hits), same basis as matrix-level breakdown in audits.
matchedRulesnumberCount of rules that hit for this matrix in this execution.
labelNamestring | nullRisk label name applied to this matrix’s contribution (when label resolution ran).
labelColorstring | nullHex or token for UI when present.
labelSeveritystring | nullSeverity bucket: low, medium, high, or critical, when resolved.
matrixNormalizedScorenumber | nullNormalized 0–100 score for this matrix when available.

Complete example

The following example shows rulesExecutionSummary with every field populated as it would appear in an API response or webhook payload.
{
  "rulesHit": [
    {
      "ruleId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "ruleExternalId": "RG-ENTITY-1",
      "riskMatrixId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "riskMatrixName": "Default Entity Matrix",
      "name": "High-risk country",
      "description": "Flags entities or transactions linked to high-risk jurisdictions.",
      "score": 30,
      "priority": 1,
      "category": "compliance",
      "status": "active",
      "conditions": [
        { "field": "entity.countryCode", "value": ["IR", "KP", "SY"], "operator": "in" },
        { "field": "entity.type", "value": "person" }
      ],
      "actions": {
        "alerts": [
          {
            "name": "High-risk country alert",
            "type": "create_alert",
            "severity": "high",
            "description": "Entity is linked to a high-risk jurisdiction."
          }
        ],
        "suggestion": "FLAG",
        "status": "PENDING_REVIEW"
      }
    }
  ],
  "rulesNoHit": [
    {
      "ruleId": "f6a7b8c9-d0e1-2345-f678-901234567890",
      "ruleExternalId": "RG-ENTITY-2",
      "riskMatrixId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "riskMatrixName": "Default Entity Matrix",
      "name": "PEP match",
      "description": "Flags when PEP screening returns a match.",
      "score": 25,
      "priority": 2,
      "category": "compliance",
      "status": "active",
      "conditions": [
        { "field": "enrichment.complyadvantage_pep_enrichment.isPep", "value": true }
      ],
      "actions": {
        "alerts": [
          {
            "name": "PEP match",
            "type": "create_alert",
            "severity": "medium",
            "description": "PEP screening returned a match."
          }
        ],
        "suggestion": "SUSPEND"
      }
    }
  ],
  "actionsExecuted": {
    "alerts": [
      {
        "name": "High-risk country alert",
        "type": "create_alert",
        "severity": "high",
        "description": "Entity is linked to a high-risk jurisdiction.",
        "ruleId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "ruleExternalId": "RG-ENTITY-1",
        "investigationId": null
      }
    ],
    "suggestion": "FLAG",
    "status": "PENDING_REVIEW",
    "customKeys": ["required_kyc"]
  },
  "totalScore": 30,
  "scoreResult": {
    "rawScore": 30,
    "normalizedScore": 42,
    "label": {
      "name": "Medium",
      "range": "30-80",
      "minScore": 30,
      "maxScore": 80
    }
  },
  "riskMatrixName": "Default Entity Matrix",
  "executionTimeMs": 156,
  "trigger": "entity_created",
  "matchedRulesCount": 1,
  "riskMatricesExecuted": [
    {
      "riskMatrixId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "riskMatrixName": "Default Entity Matrix",
      "rawScore": 30,
      "matchedRules": 1,
      "labelName": "Medium",
      "labelColor": "#f5a623",
      "labelSeverity": "medium",
      "matrixNormalizedScore": 42
    }
  ]
}

Minimal example (no rules hit)

When no rules match, you still get rulesHit, rulesNoHit, totalScore, and metadata; actionsExecuted is omitted when empty.
{
  "rulesHit": [],
  "rulesNoHit": [
    {
      "ruleId": "f6a7b8c9-d0e1-2345-f678-901234567890",
      "ruleExternalId": "RG-ENTITY-2",
      "riskMatrixId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "riskMatrixName": "Default Entity Matrix",
      "name": "PEP match",
      "description": "Flags when PEP screening returns a match.",
      "score": 25,
      "priority": 2,
      "category": "compliance",
      "status": "active",
      "conditions": [
        { "field": "enrichment.complyadvantage_pep_enrichment.isPep", "value": true }
      ],
      "actions": {
        "alerts": [
          {
            "name": "PEP match",
            "type": "create_alert",
            "severity": "medium",
            "description": "PEP screening returned a match."
          }
        ],
        "suggestion": "SUSPEND"
      }
    }
  ],
  "totalScore": 0,
  "scoreResult": {
    "rawScore": 0,
    "normalizedScore": 0,
    "label": {
      "name": "Low",
      "range": "0-30",
      "minScore": 0,
      "maxScore": 30
    }
  },
  "riskMatrixName": "Default Entity Matrix",
  "executionTimeMs": 98,
  "trigger": "manual_evaluation",
  "matchedRulesCount": 0
}

Notes

  • riskMatricesExecuted is not produced by the rules engine alone; the API merges it into rulesExecutionSummary when a per-matrix score breakdown exists. Single-matrix responses may only include riskMatrixName at the root without this array.
  • investigationId in actionsExecuted.alerts is assigned asynchronously after alert consolidation; it is null in the immediate API response.
  • scoreResult.normalizedScore is the 0–100 value persisted on the entity or audit; totalScore (and scoreResult.rawScore) is the raw sum of rule scores.
  • trigger values include: manual_evaluation, entity_created, enrichment_completed, check_completed, created, updated, and others depending on context.