Identity Verification — OnfidoConnector

The identity_verify step type connects to Onfido's biometric KYC API. When an agent or customer initiates verification, Velaris creates an Onfido applicant and launches a check via Onfido's hosted SDK flow — the applicant never interacts with a Velaris-owned verification UI. The SDK collects the document photos and biometric data directly in Onfido's environment.

When the check completes, Onfido fires a check.completed webhook to Velaris. The outcome can be clear, consider, or withdrawn. Velaris stores the outcome in identity_verifications, updates the step status, and auto-advances the case. The case type designer configures which outcome values trigger advancement (typically clear only, with consider routing to a manual review stage).

Privacy by design: The Onfido applicant_id and check_id are internal identifiers stored in the identity_verifications table and used only for webhook correlation. They are never returned in API responses from Velaris — not in case data, not in step responses, not in audit log exports. This prevents inadvertent exposure of third-party biometric record references.

Electronic Signature — DocuSignConnector

The esign_send step type creates a DocuSign envelope from a configured document template and generates a signing URL. The agent copies the signing URL and shares it with the signer (or Velaris sends it via a sms_send or notification step). The signer signs in DocuSign's hosted environment — no Velaris UI involvement.

When signing is complete, DocuSign fires a Connect webhook to Velaris. The envelope completed event is verified using the X-DocuSign-Signature-1 HMAC header (base64-encoded HMAC-SHA256 of the raw payload using DOCUSIGN_HMAC_SECRET). Velaris marks the step complete and auto-advances the case. The esign_requests table stores the envelope ID, signing URL, signer details, and completion timestamp.

Step Types

Step Type Connector Work Center Panel Panel Contents Auto-Advance Trigger
identity_verify OnfidoConnector IdentityVerifyPanel 🔚 Verification status badge, Initiate Check button, outcome display (clear / consider / withdrawn), timestamp Onfido webhook fires check.completed with configured outcome(s)
esign_send DocuSignConnector ESignPanel ✍️ Signer name + email (mapped from case data), Generate Envelope button, signing URL copy, envelope status badge, completion timestamp DocuSign Connect webhook fires envelope completed event

Onfido Configuration

  1. Create an Onfido API token. Log in to the Onfido Dashboard. Navigate to Settings > Tokens and create a new token with the Live or Sandbox environment. Copy the token — it is shown only once.

  2. Create the webhook endpoint. In the Onfido Dashboard, go to Developers > Webhooks > Add webhook. Set the URL to:

    https://your-domain.com/api/identity/webhooks/onfido

    Subscribe to the check.completed event. Save and copy the Webhook token — this is the HMAC signing key Velaris uses to verify incoming events.

  3. Set environment variables. Add the following and restart the case-service:

    ONFIDO_API_TOKEN=api_live.your_token_here
    ONFIDO_WEBHOOK_TOKEN=your_webhook_token_here
  4. Add the connector in Studio. Navigate to Studio > HxConnect > Identity and click Add Connector. Configure:

    • API Token: {{env.ONFIDO_API_TOKEN}}
    • Webhook Token: {{env.ONFIDO_WEBHOOK_TOKEN}}
    • Environment: live or sandbox
    • Advance on outcomes: comma-separated list, e.g. clear
  5. Add an identity_verify step to your case type. In the Case Type Editor, add a step at the appropriate stage. Set Step Type to identity_verify, link the OnfidoConnector, and map the case data fields for First Name, Last Name, and Date of Birth (required for applicant creation). Publish.

DocuSign Configuration

  1. Create a DocuSign Integration Key. Log in to the DocuSign Developer Console (or production admin). Go to Apps and Keys > Add App and Integration Key. Note the Integration Key (UUID format) and your Account ID. Under RSA Keypairs, generate a new keypair and download the private key file. The Base URI for your account (e.g., https://eu.docusign.net) is shown in the account overview.

  2. Configure DocuSign Connect. In the DocuSign admin, go to Connect > Add Configuration. Set the listener URL to:

    https://your-domain.com/api/esign/webhooks/docusign

    Enable Include Document Fields and subscribe to the Envelope Completed event. Under Security, enable HMAC and set a strong secret. Copy the HMAC secret.

  3. Set environment variables. Add the following and restart the case-service:

    DOCUSIGN_INTEGRATION_KEY=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    DOCUSIGN_ACCOUNT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    DOCUSIGN_BASE_URI=https://eu.docusign.net
    DOCUSIGN_PRIVATE_KEY_PATH=/run/secrets/docusign_private.pem
    DOCUSIGN_HMAC_SECRET=your_connect_hmac_secret_here
  4. Add the connector in Studio. Navigate to Studio > HxConnect > E-Sign and click Add Connector. Configure:

    • Integration Key: {{env.DOCUSIGN_INTEGRATION_KEY}}
    • Account ID: {{env.DOCUSIGN_ACCOUNT_ID}}
    • Base URI: {{env.DOCUSIGN_BASE_URI}}
    • HMAC Secret: {{env.DOCUSIGN_HMAC_SECRET}}
    • Document Template ID: The DocuSign template ID to use for envelope creation (e.g., abcd1234-...)
  5. Add an esign_send step to your case type. In the Case Type Editor, add a step and set Step Type to esign_send. Map Signer Name and Signer Email to case data fields (e.g., case.data.customer_name, case.data.customer_email). Publish.

API Reference

Method Endpoint Description Auth
POST /api/identity/cases/{id}/verify Creates an Onfido applicant and initiates a check for the case. Returns status: pending. applicant_id is stored internally only. JWT
POST /api/identity/webhooks/onfido Inbound Onfido webhook. Verifies X-SHA2-Signature HMAC header, processes check.completed, updates case. HMAC (no JWT)
POST /api/esign/cases/{id}/send Creates a DocuSign envelope from the configured template and returns signing_url and envelope_id. JWT
POST /api/esign/webhooks/docusign Inbound DocuSign Connect webhook. Verifies X-DocuSign-Signature-1 HMAC base64, processes envelope completed event, advances case. HMAC (no JWT)

Privacy & Compliance Notes

Privacy by design — applicant_id and check_id are never returned in API responses. The /api/identity/cases/{id}/verify endpoint returns only {"status": "pending", "verification_id": "iv_01HZ..."}. The Onfido-issued applicant_id and check_id are stored in the identity_verifications table but are excluded from all API serializers and audit log exports. This ensures that biometric system references cannot be extracted from Velaris API responses.
Webhook HMAC is enforced for all identity and e-sign events. Onfido uses the X-SHA2-Signature header; DocuSign uses X-DocuSign-Signature-1 (base64 HMAC-SHA256). Both endpoints return HTTP 401 and do not process the payload if verification fails. This ensures only legitimate events from the vendor can trigger case advancement.