Skip to main content
Locker turns every completed document into an active part of your workflow. Deadlines are extracted from the document’s data and surfaced as obligations in the command center; the full document repository is searchable with natural-language queries.

Obligations

An obligation is a deadline or financial commitment derived from a document’s canonical data. For typed OREA/TRREB packs, obligations are derived deterministically—no AI is involved, and the result is exact.

Obligation types

TypeSourceExample
closingdates.completionDateClosing on March 15, 2027
condition_waiverEach condition’s waiver dateFinancing condition waiver due March 1, 2027
deposit_duemoney.deposit timingDeposit due within 24 hours of acceptance
expiryIrrevocability dateOffer irrevocable until March 10, 2027 at 11:59 PM
renewalLease term expiryLease renewal decision due June 30, 2027
When a document is generated, obligations are written to the DocumentObligation table and linked to the document’s deal (if one is set). When a document is signed (DOCUMENT_SIGNED event), the obligations are re-synced to reflect the executed state.

Urgency

Each obligation carries an urgency level computed from its due date relative to today:
UrgencyMeaning
pendingDue date is in the future and not yet urgent
due_soonDue within the next few days
overdueDue date has passed

The obligations feed

The obligations feed (GET /api/documents/obligations) returns upcoming and overdue obligations across your organization’s documents, sorted soonest first. By default it looks ahead 30 days; pass ?withinDays=N to adjust the window (maximum 365).
{
  "obligations": [
    {
      "id": "obl_abc123",
      "documentId": "doc_def456",
      "dealId": "deal_ghi789",
      "type": "condition_waiver",
      "description": "Financing condition waiver",
      "dueDate": "2027-03-01T00:00:00.000Z",
      "amountCents": null,
      "urgency": "due_soon"
    }
  ]
}
Locker indexes every document’s content as a vector embedding, enabling natural-language search over your document repository. Example queries:
  • “leases expiring this summer with rent over $3,000”
  • “condo purchase agreements for Harbour Street”
  • “rental applications with pets clause”
Search returns a ranked list of document IDs with similarity scores. Your application or the in-app search bar can then fetch the matched documents for display.
Semantic search requires the AI gateway to be configured (@repo/ai, including an embedding model accessible via the AI_EMBEDDING_MODEL environment variable). Without it, documents are still stored and their obligations are tracked, but natural-language search will return no results.
Embeddings are generated automatically when a document is rendered (generated). They are also regenerated when a signed document is re-indexed. The embedding model defaults to text-embedding-3-small and is configurable via the AI_EMBEDDING_MODEL environment variable.

What is indexed

The embedding is built from the document’s canonical data (all string values, traversed up to six levels deep) prefixed with the form key. For a typed OREA pack this includes parties, addresses, dates, amounts, conditions, and schedules. For uploaded generic templates it includes whatever text is in the fill data.

Obligation extraction from uploaded documents

For uploaded (generic) PDF templates and completed documents imported from external providers (such as DocuSign Connect), Locker can extract obligations using the AI gateway. The extraction is Zod-validated—the model’s output is checked against the obligation schema and rejected if it does not conform. AI-extracted obligations are flagged with extractedByAi: true so you can distinguish them from the deterministic OREA-pack derivation.
AI extraction requires the AI gateway to be configured. Typed OREA/TRREB packs never use AI extraction for obligations—their deadlines are derived exactly from the canonical data.

CRM wiring

Obligations link to deals via dealId. The morning command center reads the obligations feed and displays upcoming deadlines in urgency order. A DOCUMENT_SIGNED event also triggers a downstream workflow that can advance the deal stage and spawn a closing checklist for purchase agreements.