Skip to main content

Overview

This guide demonstrates the complete automated onboarding flow for companies (businesses) using gu1’s automatic entity creation with integrated risk assessment. The system will:
  1. Fetch official company data from business registries (e.g., CNPJ in Brazil)
  2. Extract shareholder structure automatically (up to 5 levels deep)
  3. Create shareholder entities recursively with their own enrichments
  4. Execute enrichments for the company and all shareholders
  5. Run compliance enrichments (sanctions, adverse media, ownership verification)
  6. Execute risk matrix rules for the company (shareholders can also trigger rules)
  7. Generate alerts and investigations if rules are triggered
  8. Send notifications via Socket.IO and webhooks
This is ideal for KYB (Know Your Business) processes where you need complete company verification including beneficial ownership structure.

Prerequisites

Before starting, you need:
  1. API Key - Get one from API Keys (/org-api-keys)
  2. Risk Matrix - Create and configure a risk matrix with rules for the entity_created trigger
  3. Active Integrations - Enable enrichment providers from the Marketplace
  4. Valid Tax ID - A real company tax ID from a supported country (e.g., CNPJ for Brazil)

The Complete Flow

Here’s what happens when you create a company automatically with shareholder traversal and risk matrix:

Quick Start Example

Basic Company Onboarding with Shareholders and Risk Assessment

Complete Response Example

When the process completes successfully, you’ll receive a comprehensive response with the full ownership structure:

Understanding Shareholder Traversal

The depth Parameter

The depth parameter controls how many levels of the ownership structure to traverse:
  • depth: 0 - Only create the main company (no shareholders)
  • depth: 1 - Create main company + direct shareholders (1 level)
  • depth: 2 - Create main company + shareholders + their shareholders (2 levels)
  • depth: 3-5 - Continue recursively up to 5 levels

Shareholder-Specific Integrations

You can configure different integrations for company vs person shareholders:
This is more efficient than running all enrichments on everyone.

Step-by-Step Implementation

Step 1: Set Up Your Risk Matrix for Companies

Create a risk matrix specifically for company onboarding:

Step 2: Create Company with Full Ownership Structure

Step 3: Visualize Ownership Structure

After creating the company, fetch and visualize the ownership graph:

Step 4: Handle Complex Scenarios

Scenario 1: Circular Ownership Detection

The system automatically prevents circular ownership loops:

Scenario 2: Large Shareholder Structures

For companies with many shareholders (e.g., 50+), consider:

Scenario 3: Foreign Shareholders

When shareholders are from different countries:

Real-Time Updates for Company Creation

Listen for events during the onboarding process:

Understanding Risk Assessment for Companies

Company-Specific Risk Factors

Companies are evaluated differently than persons:

Shareholder Risk Propagation

Risks from shareholders can affect the main company:

Best Practices

1. Choose Appropriate Depth

2. Differentiate Shareholder Integrations

3. Handle Partial Failures Gracefully

4. Monitor Performance

Troubleshooting

Issue: Timeout Errors

Issue: Too Many Entities Created

Issue: Circular Ownership Detected

Company API Reference

Complete API documentation for company creation

Person Onboarding

Learn about person entity onboarding

Risk Matrix Guide

Configure risk matrices and rules

Relationships API

Work with entity relationships