Glossary
The words that carry specific meaning on Orascom Portals. Where a term has a page, it’s linked.
Ability token — a Laravel Sanctum personal-access token scoped to exactly one ability
(access-<persona>-api); what every end-user persona authenticates with. See the auth model.
Broker — an external sales agent persona (orascom-broker-app); submits leads, EOIs, sees commissions.
client_credentials — the Passport OAuth2 grant used for service-to-service auth (portal ↔ middleware ↔ CRM); never for end users.
country header — the HTTP header (egypt/oman/montenegro) the backend sets on every middleware call; it selects the Dynamics org. On the wire it’s the slug; inside a CRM write body it’s a numeric id (1/2/3).
crm-mock — a Laravel/SQLite dev stand-in for the CRM (its oauth2/token returns a literal fake-token); mocks a handful of endpoints, not the Logic-App writes. See Run the stack locally.
crm_status — a column on unit_sale mirroring the CRM’s status. Inconsistently typed (raw integer from the webhook, string elsewhere) — lean on status instead. Distinct from the local status (UnitSaleStatus).
crms-middleware — the Laravel service that is the only component allowed to talk to the CRMs. See the CRM integration model.
Deal — the broker app’s UI word for a lead. Same entity; the API/routes/code all say lead.
Destination — a development location (El Gouna, Makadi Heights, O-West, Jebel Sifah, Hawana Salalah, Lustica Bay) under a Country; parent of Projects and Units.
Dynamics 365 — the Microsoft CRM; three orgs, one per country (Egypt, Oman, Montenegro), holding the authoritative sale/lead/customer data.
EOI (Expression of Interest) — a paid interest an agent submits against a Launch on behalf of a client; the client pays a holding amount via a tokenized link. See Submitting an EOI.
Launch — a grouping of projects/unit-types being released, that EOIs are submitted against.
Lead — the code/API name for a Deal; a prospective customer a broker or sales-man submits to the CRM.
Link-Dev — the vendor/tier behind the Azure Logic Apps + Azure-AD token used for CRM writes (LINK_DEV_*).
Logic App — the Azure HTTP endpoint every CRM write posts to (one per operation); the Logic App routes to the right Dynamics org by the country in the body.
OData — the Dynamics Web API (/api/data/v9.1|v9.2/…) that CRM reads hit directly, per country. The v9.1-vs-v9.2 split is by resource, not country.
Passport — Laravel’s OAuth2 server, used here only for client_credentials service-to-service tokens (its scopes: middleware-webhook, portals-api, crm-webhook).
payment_reference_id — the key that matches a transactions row to a gateway payment (Paymob order id; Thawani/WSPG app UUID). The anchor for payment reconciliation.
Pipeline — a sales-man’s CRM opportunity (ldv_interest/ldv_pipeline), between a lead and a sale.
Published mirror — the local units/inventory tables are a read-mostly projection of CRM data keyed by source_id; a unit is public only when it and its whole parent chain are is_published. See the data model.
Reservation fee — the amount a shopper pays (via a gateway) to reserve a unit; recorded on the Transaction + the sale’s reservation_amount.
Reserved status (ReservedSaleStatusEnums) — a derived, read-time broker-listing status (reserved/closed/lost/…) computed from the CRM integer per country — not stored. See state machines.
salePayment binding — the route-model binding on the shopper payment route that resolves a UnitSale only if it’s still DRAFT — so paying a non-draft sale 404s before the controller.
Sales-Man — an internal ODH agent persona (orascom-sales-man-app, Microsoft SSO); the only persona that creates a formal sale.
Sales-Manager — a reporting role inside the broker app (not a separate app); analytics only.
Sanctum — Laravel’s token auth for end-user personas (ability-scoped Bearer tokens, 24h). Contrast Passport.
Shopper — the public customer persona (orascom-shopper-app, phone + OTP).
Shopper-Admin — the analytics persona over shopper behaviour (orascom-shopper-analytics-app), ability access-shopper-analytics-api.
source_id / *_source_id — a Dynamics GUID referencing a CRM record (sale_source_id, lead_source_id, broker_source_id, …); how the local mirror points at the CRM.
status_after_success_transaction — the 0/1 flag written after a successful charge recording whether the CRM reserve succeeded; 0 = charged but not reserved, the key support signal.
Taskeen — the sales-man handover surface (taskeen = “housing/settling in”, Arabic).
Transaction — the single polymorphic payment ledger (transactions) shared by UnitSale / UnitAddonSale / EOIRequest.
unit_sale — the local table (singular) mirroring a CRM sale; model UnitSale, workflow enum UnitSaleStatus.
Voyager — the Laravel admin panel (/admin) where ODH admins review Oman pre-registrations, etc.
