--- last_updated: 2026-08-08 tags: [fanavaran, tenant, matrix] source: fanavaran-module-docs --- # 04 — Tenant-specific vs shared ## Comparison table | مورد | مشترک | وابسته به شرکت | |------|:-----:|:--------------:| | API host (`apimanager.iraneit.com`) | ✅ | ❌ | | Endpoint paths (GEN.03/07/08/12, auth) | ✅ | ❌ | | HTTP methods & payload **shape** | ✅ | ❌ | | Auth flow (GetAppToken → Login) | ✅ | ❌ | | Auth credentials (app/user/secret) | ❌ | ✅ | | `CorpId` / `ContractId` / `Location` | ❌ | ✅ | | `ClaimExpertId` (GEN.03) | ❌ | ✅ | | `ExpertiseClaimExpertId` (GEN.08) | ❌ | ✅ | | `ClaimFileTypeId` (GEN.07) | ❌ | ✅ | | Lookup **Id values** (file-types, experts, …) | ❌ | ✅ | | Lookup **endpoint URLs** | ✅ | ❌ | | Policy inquiry algorithm | ✅ | ❌ | | YARA orchestration / soft-ensure / retry | ✅ | ❌ | | YARA internal routes `/v2/fanavaran/...` | ✅ | path `:client` only | | `INSURANCE_CORP_ID` caption / resolved id | ❌ | ✅ | | `FANAVARAN_CLIENT` env | ❌ | ✅ per deploy | | Mapping YARA→Fanavaran field names | ✅ | ❌ | | Validation: PolicyId required, EstimateAmount > 0 | ✅ | ❌ | | Validation: FileTypeId ∈ tenant lookup | logic ✅ | allowed ids ✅ | | Business: THIRD_PARTY only | ✅ | ❌ | | Provisional address / dummy licence | ✅ today | may customize later | | SMS template after base claim | shared orchestration | provider/templates may ✅ | | Mongo collections / audit schema | ✅ | ❌ | | Offline inquiry seeds | may exist per client | ✅ | ## Current tenants | Key | Status | Notes | |-----|--------|-------| | `parsian` | **Template / proven E2E** | Use as reference for new clients | | `tejaratno` | Working shape | Different experts + FileTypeId 23 | | `moallem` | Auth seeded | Confirm expert + file-type ids via lookups before go-live | ## What is reusable when adding a client 1. Entire staged pipeline in `ClaimRequestManagementService` 2. `FanavaranAuthService`, audit, lookup cache machinery 3. Controllers + preview/submit surface 4. Policy selection helper 5. Soft-ensure + retry + history events ## What must be configured per client 1. Auth block + Corp/Contract/Location 2. GEN.03 / GEN.08 expert ids (from that tenant’s expert lists) 3. `ClaimFileTypeId` present in that tenant’s `file-types.json` 4. `INSURANCE_CORP_ID` caption for deploy 5. Warm lookups under `files/fanavaran-lookups/{key}/` 6. Optional: override city/cause/inspection ids if shared defaults fail validation See [11-onboard-new-client.md](./11-onboard-new-client.md).