Data Model
The Customer Lifecycle Status is modeled in a dedicated table to track the current lifecycle stage, historical changes, and related metadata. This structure supports tenant-level customization and full auditability.
Note: A historical table for lifecycle transitions is also maintained for auditing purposes.
Security & Permissions
Access Control
Role | View Lifecycle | Update Lifecycle | View History | Configure Stages |
|---|---|---|---|---|
Customer Viewer | ✅ | ❌ | ❌ | ❌ |
Account Manager | ✅ | ✅ | ✅ | ❌ |
Tenant Admin | ✅ | ✅ | ✅ | ✅ |
Super Admin (Internal) | ✅ | ✅ | ✅ | ✅ |
Permission Checks
Lifecycle operations are secured using JWT-based role verification and tenant-bound access filters.
function hasLifecyclePermission(user, action) { return user.roles.includes('ROLE_ACCOUNT_MANAGER') && user.tenant_id === customer.tenant_id; }
Lifecycle updates must validate:
User has permission for the customer’s tenant
Stage transition is allowed (based on tenant config)
Reason (if required) is present
Data Protection
Encryption at Rest: AES-256 encryption for lifecycle tables
Encryption in Transit: All APIs served via HTTPS only
Rate Limiting: API Gateway limits updates to 1000 per user per hour
Audit Logging: All lifecycle transitions are written to an immutable audit store
Warning: Lifecycle Status May Trigger Business Processes
Changing a customer's lifecycle stage may automatically trigger business logic such as:
Renewal campaign emails
Escalation alerts for "At-Risk" customers
Churn forecasting updates
Please ensure all updates are intentional and authorized.