Skip to content

Office 365 Add-In

CaseSolo's Office add-in gives Word and Outlook users tenant-scoped case search, matter-context insertion, demand-letter drafting, client update drafting, opposing-counsel drafting, and insert activity logging.

Runtime Surfaces

Auth And Tenant Safety

Every context API request uses getCurrentUser(request.headers). Case search and context loading always include firmId: ctx.firmId; direct case loads use case.findFirst({ where: { id, firmId } }).

The add-in does not expose raw provider credentials or OAuth tokens. Office insertion actions only receive normalized case context for the authenticated firm.

API Contract

GET /api/office-addin/context?search=...&limit=5

GET /api/office-addin/context?caseId=...

POST /api/office-addin/context

Drafting Model

The launch implementation is deterministic and case-record driven. It does not call an external AI model, so it is safe for local tests and predictable for attorney review. Drafts are assembled from:

If source data is missing, the draft states the review gap instead of inserting demo names or fake facts.

Office Insertion

The taskpane attempts insertion in this order:

Verification

Targeted coverage:

Recommended local gates:

npm run test:run -- office-addin-context
npx eslint src/lib/integrations/office-addin-context.ts src/app/api/office-addin/context/route.ts src/app/office-taskpane/page.tsx 'src/app/(dashboard)/integrations/office-addin/page.tsx' src/lib/marketplace/office-addin.ts src/__tests__/lib/office-addin-context.test.ts src/__tests__/api/office-addin-context.test.ts
npm run typecheck

Source: docs/dev/office-addin.md