Data model
Lists by area and tenancy rules.
Tenancy and access
DealerGroupis the tenant root. ARooftopis one store. Most operating lists carry arooftopfield and are filtered to the rooftops the user can reach.- Access comes from the user's
Role. Operating permissions can also come from an activeDealerGroupMembership(optionally all rooftops) orRooftopMembership, for that scope only. Memberships change only throughchangeDealerMembership, which writes aMembershipAuditEvent. - Some permissions are role-only: people, users, roles, settings, onboarding, API keys, and payments.
- Leads, deals, approvals, and trade-ins are limited to the assigned salesperson unless the user has
canViewAllLeadsacross all rooftops. Dealer cost needs inventory or financing management across all rooftops. - API keys (
ApiKey) are owned by a user and limited to scopes:read_inventory,write_inventory,write_leads,write_deals,write_service,read_reports. - Most operational lists are command-only. Their Keystone create and update are denied, so writes go through named mutations. Each command writes a
DomainAuditEventand aDomainOutboxEventin the same transaction, keyed by an idempotency key.
Lists
| Area | Lists |
|---|---|
| Organization | User, Role, DealerGroup, Rooftop, DealerGroupMembership, RooftopMembership, MembershipAuditEvent, DealershipProfile, ApiKey, AuthenticationThrottle |
| Inventory | Make, Model, Vehicle, VehicleImage, VehicleConditionReport, VehicleHistory, PriceHistory, InventoryAcquisition, InventoryAcquisitionEvent, InventoryStock, InventoryStockEvent, InventoryReconWorkItem, InventoryMerchandisingVersion, InventoryFeedRun, InventoryFeedError |
| CRM | Customer, CustomerMergeEvent, CustomerHousehold, CustomerContactPreferenceEvent, Lead, LeadAssignmentEvent, LeadRoutingRule, CustomerInteraction, Task, SalesVisit, TestDrive, TradeIn |
| Deals and finance | Deal, DealApproval, FinancingApplication, LenderSubmission, LenderDecision, FinanceProduct, FinanceProductQuote, FinanceMenuVersion, FinanceComplianceCheck, FinanceContractPackage, FinanceFundingCase, FinanceProductCancellation |
| Delivery | DeliveryCase, WeOweItem |
| Service and parts | ServiceAppointment, ServiceOrder, RepairOrderLineItem, ServiceLaborOperation, ServicePackage, PartsInventory, PartsMovement, PartsPurchaseOrder |
| Payments and accounting | PaymentProvider, PaymentTransaction, PaymentRefund, PaymentProviderEvent, AccountingMapping, AccountingBatch, AccountingProviderResponse |
| Reporting and system | SavedReport, ReportRun, RetentionPolicy, DomainAuditEvent, DomainOutboxEvent |
A CRM Customer is separate from the login User. Public submissions find or create a Customer per rooftop by email or phone. A storefront account is linked to Customers only after it confirms its email with confirmCustomerEmailVerification.