forked from Yara724/api
2.6 KiB
2.6 KiB
last_updated, tags, source
| last_updated | tags | source | |||
|---|---|---|---|---|---|
| 2026-08-08 |
|
fanavaran-module-docs |
11 — Onboard a new insurance client
Use Parsian as the behavioral template. API shapes stay the same; only tenant config + lookup ids change.
Checklist
1. Register tenant key
- Add key to
FanavaranClientKey/FANAVARAN_CLIENT_KEYSinfanavaran-client.config.ts - Add
SEED_FANAVARAN_CLIENT_PROFILES[key]with auth + defaults - Boot app once so
FanavaranClientConfigServiceseeds Mongo if missing
2. Auth verification
scripts/fanavaran-auth.sh <key>succeeds- Login returns
authenticationToken - Business call with CorpId/ContractId/Location succeeds (any small lookup)
3. Warm lookups
- Fetch
file-types,vehicle-kinds,insurance-corp,car-components,inspection-place,accident-level, expert-related lists - Confirm cache under
files/fanavaran-lookups/<key>/
4. Choose tenant-specific ids
| Field | How to pick |
|---|---|
ClaimExpertId (GEN.03) |
Financial case owner role for that insurer |
ExpertiseClaimExpertId (GEN.08) |
Assessor role — different from GEN.03 |
ClaimFileTypeId |
Must exist in that tenant’s file-types.json |
| Shared codebook defaults | Start from SHARED_FANAVARAN_DEFAULTS; override if Fanavaran rejects |
5. Deploy env
FANAVARAN_CLIENT=<key>
INSURANCE_CORP_ID='<exact Caption from insurance-corp lookup>'
6. Dry-run on a test claim
- Preview base → PolicyId resolves
- Submit base →
claimId/claimNo - Outer parts →
dmgCaseId - Upload → attachments with correct FileTypeId
- Expertise →
expertiseId - Review
fanavaranAuditLogsand history events
7. Document deltas
- Add a short section under 04-tenant-matrix.md for the new key
- Note any non-Parsian business rules (validation, required fields)
Do / Don’t
| Do | Don’t |
|---|---|
| Copy orchestration from existing code | Copy Parsian expert/file-type ids blindly |
| Verify FileTypeId in tenant lookup | Use template sample 70 without checking |
| Keep null fields in payloads | Strip nulls from GEN.03/12 templates |
| Soft-fail auto-submit | Block user UX on Fanavaran outage |
Acceptance for “docs-only onboarding”
A backend engineer should be able to complete the checklist above using only:
- This docs set (
docs/fanavaran/) docs/external-api-curls.md- Seed/config + System Settings for credentials
- Parsian proven values as the reference baseline