Overview
This guide covers the complete flow for person entity management, from creation through enrichment, KYC validation, and risk analysis. The flow is designed to be flexible, supporting both automatic and manual processes at each stage.Automatic vs Manual: Which Should You Use?
Quick Answer: Use Automatic for most cases. It handles everything in one API call and is faster to integrate.
| Feature | Automatic Creation | Manual Creation |
|---|---|---|
| API Calls Required | 1 call (POST /entities/automatic) | 2-3 calls (POST /entities, then POST /entities/:id/analyze) |
| Enrichment | Automatic - runs in background | Manual - you trigger it separately |
| Risk Analysis | Automatic - executes after enrichment | Manual - you trigger it separately |
| Shareholder Discovery | Optional - configure in request | Not available |
| Integration Complexity | Simple - one-step process | Complex - orchestrate multiple steps |
| Credits Deduction | Automatic | Automatic (per operation) |
| Use When | Standard onboarding flows | Need granular control over timing |
| Best For | Production apps, batch processing | Testing, debugging, custom workflows |
- You need to collect user data incrementally over multiple steps
- You want to show users a progress indicator between stages
- You’re debugging and want to inspect data between operations
- You have custom business logic between entity creation and risk analysis
Risk Matrix Configuration
What is a Risk Matrix?
A Risk Matrix is a collection of rules that define how entities are scored for risk. Think of it as your compliance playbook - it determines:- Which data points to check (PEP status, sanctions, adverse media, etc.)
- What risk score to assign when conditions are met
- Whether to approve, reject, or flag entities for review
- Custom risk labels (Low/Medium/High) based on score ranges
How to Configure Your Risk Matrix
- Log in to the gu1 Dashboard: https://app.gu1.ai
- Navigate to Risk Matrices: Settings → Risk Matrices
- Create a New Matrix: Click “New Risk Matrix”
- Configure Rules: Add rules that match your compliance requirements
- Example: “If PEP detected → add 25 points to risk score”
- Example: “If sanctions match → reject and create alert”
- Set Custom Labels: Define score ranges (e.g., 0-25: Low, 26-50: Medium, 51-100: High)
- Save and Copy ID: Save the matrix and copy the UUID - you’ll use this in API calls
Using Risk Matrix in API
Option 1: Specify in API request (recommended for multi-tenant setups):- Navigate to Settings → Organization
- Set “Default Risk Matrix for Persons”
- All person entities will use this matrix unless overridden
Tutorial: Setting Up Your First Risk Matrix
For a detailed walkthrough, see our guides:Flow Diagram
Step 1: Create Person Entity
Option A: Automatic Creation (Recommended)
Automatic creation handles enrichment, shareholder discovery, and risk analysis in a single operation. Endpoint:POST /entities/automatic
Request:
- Basic Data Enrichment: Executes providers from
basiclist - Entity Creation: Maps normalized data to entity structure
- Additional Enrichment: Executes providers from
additionallist - Shareholder Discovery: Recursively creates shareholder entities (if enabled) - ⚠️ Companies only
- Risk Matrix Assignment: Assigns the provided risk matrix (or default)
- Risk Analysis: Executes risk matrix rules automatically (unless
skipRulesExecution: true)
Note on Shareholders (createShareholders): This feature is only applicable for company entities (KYB), not person entities (KYC).When verifying a company, you can enable
createShareholders: true to automatically discover and create entities for all beneficial owners and corporate shareholders.For person entities (KYC), this field is ignored since individuals don’t have shareholders. If you’re implementing person verification (KYC), you can omit this field entirely.Option B: Manual Creation
Create a person entity with basic information only, then enrich and analyze separately. Endpoint:POST /entities
Request:
Step 2: Enrich and Analyze (Manual Flow)
If you created the entity manually, you need to enrich it and execute risk analysis. Endpoint:POST /entities/:entityId/analyze
Request:
Available Provider Codes for KYC
Available Provider Codes for KYC
Standard Provider Codes (most commonly used):
global_gueno_validation_kyc- Recommended for full KYC - Comprehensive identity verification including document + liveness + face matchworld_check- PEP and sanctions screening (Refinitiv WorldCheck)sanctions_api- Global sanctions list screeningpep_database- Politically Exposed Persons detectionadverse_media- Negative news and media monitoringlegal_records- Court records and legal proceedingsidentity_verification- Basic identity validation
-
For Complete KYC Verification (document + selfie + face match):
-
For AML Screening Only (no document upload):
-
For Enhanced Due Diligence:
- Optional Enrichment: If
enrichIfNeeded: trueorproviderCodesprovided, runs enrichment first - Risk Analysis: Executes risk matrix rules on the entity
- Score Update: Updates entity risk score and status
Step 3: Enrichment Process (Deep Dive)
How Enrichment Works
The EnrichmentOrchestrator service handles all enrichment operations:-
Provider Selection:
- If
providerCodesspecified: uses those specific providers - Otherwise: auto-selects based on organization subscriptions and entity type
- If
-
Balance Validation:
- Calculates total cost of all selected providers
- Checks organization’s credit balance
- Throws
InsufficientBalanceErrorif balance too low
-
Parallel Execution:
- ALL providers execute concurrently (up to 15 simultaneous)
- Each provider has individual timeout (default: 7.5s, judicial: 15s)
- Failures in one provider don’t affect others
- Total execution time = slowest provider
-
Data Normalization:
- Raw provider data normalized to standard format
- Field-level conflict resolution (highest confidence, most recent, majority)
- Intelligent merging with existing enrichment data
- Quality scores calculated from all provider results
-
Data Storage:
normalized_enrichmenttable: normalized/mapped dataenrichment_data_currenttable: current enrichment snapshotaudit_enrichmenttable: individual provider execution auditentities.metadata.enrichment: execution metadata cache
-
Credit Deduction:
- Balance deducted only AFTER successful execution
- Costs: varies by provider (e.g., WorldCheck: 0.25)
How Credit Management Works
Credit Deduction Flow:- Pre-validation: Before enrichment starts, the system checks if you have sufficient balance
- Execution: Providers run in parallel (you’re only charged for successful executions)
- Deduction: Credits are deducted AFTER successful completion (not upfront)
- Failed providers: No charge if a provider fails or times out
global_gueno_validation_kyc: $2.00 per verificationworld_check: $0.50 per checksanctions_api: $0.25 per screeningpep_database: $0.25 per checkadverse_media: $0.30 per searchlegal_records: $0.40 per search
- Navigate to Dashboard → Billing → Credits
- Purchase credit packages or set up auto-reload
Enrichment Result Structure
Step 4: Risk Analysis (Deep Dive)
How Risk Analysis Works
The RulesExecutionService handles all risk analysis operations:-
Strategy Selection:
- Uses entity’s assigned risk matrix
- Risk matrix defines which rules apply and evaluation strategy
-
Data Loading:
- Loads entity with enrichment data
- Loads entity with KYC validation (if exists)
- Prepares execution context
-
Coverage Validation (Person/Company only):
- Extracts all fields required by rule conditions
- Validates that executed providers cover all required enrichment fields
- Validates that KYC validation exists if KYC fields required
- Returns error with missing fields and recommended providers if incomplete
-
Rules Execution:
- Filters rules by trigger event (e.g., “enrichment_completed”, “manual_evaluation”)
- Executes rules in parallel using UniversalRulesEngine
- Each rule evaluates conditions and executes actions if matched
-
Score Calculation:
- Accumulates scores from matched rules
- Applies evaluation strategy (score_based or confidence_based)
- Normalizes score if custom labels configured
- Calculates custom label based on score range
-
Status Updates:
- Updates entity risk score and risk factors
- Updates entity status if rules triggered status change
- Sends ENTITY_STATUS_CHANGED notification
-
Audit Trail:
- Creates evaluation record
- Logs execution event
- Creates risk analysis audit with full execution details
- Logs alerts created by rule actions
-
Alert Consolidation:
- After 5-second delay, consolidates related alerts
- Creates or updates investigations
- Sends appropriate notifications
Risk Analysis Result Structure
Step 5: KYC Validation (Optional)
If your risk matrix rules require KYC validation fields (likekyc.documentVerified, kyc.livenessCheck), you need to create a KYC validation.
Create KYC Validation
Endpoint:POST /kyc-validations
Request:
User Completes KYC
- Send user to
validationUrl - User completes KYC flow (uploads documents, takes selfie, etc.)
- KYC provider sends webhook to your
callbackUrl
Webhook: KYC Status Update
When KYC is completed, your webhook receives:Re-run Risk Analysis After KYC
Once KYC is completed, re-run risk analysis to evaluate KYC-dependent rules: Endpoint:POST /entities/:entityId/analyze
Request:
kyc.* fields will evaluate properly and the entity’s final risk score will be calculated.
Step 6: Monitor and Manage
Query Entity Status
Endpoint:GET /entities/:entityId
Response includes:
- Current risk score (normalized and original)
- Risk factors and flags
- Enrichment status and providers used
- KYC validation status
- Last risk evaluation timestamp
View Risk Analysis History
Endpoint:GET /risk-analysis-audits?entityId=:entityId
Returns:
- All risk analysis executions
- Rules matched in each execution
- Score changes over time
- Enrichment data used
View Alerts and Investigations
Endpoint:GET /investigations?entityId=:entityId
Returns:
- Consolidated alerts related to the entity
- Investigation status and priority
- Assigned analysts and resolution notes
Best Practices
-
Use Automatic Creation: For most cases, use
POST /entities/automaticto handle enrichment and risk analysis in one operation. -
Balance Management: Always ensure sufficient credits before enrichment. Monitor balance using
GET /billing/balance. -
Provider Selection: Use specific
providerCodeswhen you know which data you need. Auto-selection may include unnecessary providers. - Risk Matrix Assignment: Always assign a risk matrix when creating entities. Without a risk matrix, risk analysis won’t execute for person/company entities.
- KYC Timing: Initiate KYC validation early in the onboarding flow. Some rules may require KYC data.
-
Coverage Validation: If risk analysis fails due to incomplete coverage, check the
metadata.missingFieldsand run the recommended providers. - Webhook Security: Always validate webhook signatures from KYC providers to prevent spoofing.
- Monitoring: Set up alerts for high-risk entities and failed enrichments.
Error Handling
Common Errors
Insufficient Balance:PATCH /entities/:id.