Originator: Full Integration with Webhooks

Send cases and receive real-time updates on relay activity, invitations, and status.


🎯 Overview

📌 TL;DR

Send cases to Lexamica and get notified instantly when partners are matched, invitations are accepted/declined, and status updates are posted. Full visibility into the case lifecycle.

This guide is for you if:

  • You send referrals to other firms via Lexamica

  • You want real-time notifications for all case activity

  • You need to keep your CRM or system in sync with Lexamica

What you'll build:

  • Case and CaseInvitation mappings

  • Send cases to the Relay Engine

  • Webhook subscriptions for relay, invitation, and update events

  • Multi-event webhook handler

What this does NOT cover:

  • Receiving cases from other firms

  • Responding to invitations (you're the sender, not receiver)


📖 Key Terms

Term
Definition

Originator

The firm that creates and sends out a case for referral

Relay Engine

Lexamica's automatic matching system that finds partner firms

Handler

The firm that accepts and handles the referred case


⚙️ Architecture


📋 Prerequisites

Credentials:

Infrastructure:

Foundational Docs:


💡 Step-by-Step Implementation

Step 1: Create Mappings

You'll need two mappings: one for Case data and one for CaseInvitation data.

Case Mapping (for sending and receiving case data):

CaseInvitation Mapping (for invitation events):

Step 2: Create Webhook Subscriptions

Subscribe to the events you need to track.

Relay Events:

Invitation Events:

Update and Settlement Events:

Step 3: Send Cases

Send cases using your Public Key (same as Lead Form Submissionarrow-up-right).

Step 4: Handle Webhooks

Build a handler that processes multiple event types.


🔧 Complete Code Example


📋 Event Flow Reference

Event
When It Fires
What to Do

Case Relay Matched

Partner firm found

Update status to "Matched"

Case Relay Rejected

No partners available

Alert staff, may need manual handling

Case Relay Missed

Partners invited but all declined

Consider re-routing or manual handling

Case Invitation Accepted

Partner accepted the case

Update status, store handler info

Case Invitation Declined

Partner declined

Log reason, wait for other partners

Case Update Made

Handler posted status update

Sync to your system

Case Settlement

Settlement process started

Update status, track settlement


❓ FAQ

❓ "Do I need all these subscriptions?"

📝 Full Answer: No. Start with what you need:

  • Minimum: Case Invitation Accepted (know when cases are handled)

  • Recommended: Add Case Relay Rejected (know when matching fails)

  • Full visibility: All events listed above


❓ "How do I correlate webhooks with my records?"

📝 Full Answer: Use the customFields.crm_id pattern:

  1. When sending, include your CRM ID in customFields

  2. This ID is returned in webhook payloads

  3. Use it to find the matching record in your system


➡️ Next Steps


Last updated: January 2026

Last updated