Customer Activation is the narrow permission flow for approving/rejecting customer requests and toggling whether an existing customer can be used operationally. It affects whether customers can be selected in sales workflows.
App Entry Points
| App | Target |
|---|
| Mobile | customer activation flow under customer/customer-management screens |
| POS Terminal | customerActivation -> CustomerActivationDetailForm |
Activation Workflow
Data And API Rules
Page Actions And Decision Rules
| Action | Guard / effect |
|---|
| Approve | Requires activation permission and a valid customer code; accepts the pending request. |
| Reject | Requires the same permission and confirmation; rejects the request without deleting customer master data. |
| Activate/deactivate | Changes operational status through the status endpoint; it is distinct from approving a request. |
| Refresh | Mandatory after every decision because request and active status are server-owned. |
| Operation | Service |
|---|
| Request list | getCustomerActivationSplitList -> getCustomerSapList({ isRequest: true }) |
| Detail | getCustomerSapById(customerId) |
| Approve request | approveCustomerRequest(customerCode) |
| Reject request | rejectCustomerRequest(customerCode) |
| Toggle active state | updateCustomerStatus(customerCode, { status }) |
Business Rules
| Rule | Behavior |
|---|
| Narrow permission | This menu uses a smaller deptCode set than Customer Management. |
| Request approval | Approve/reject request endpoints are separate from generic status update. |
| Sales dependency | Inactive customers should be blocked from new sales/booking flows. |
| Refresh required | Cards and detail forms must refresh after any status change because downstream flows rely on current state. |
| Audit expectation | Approve/reject operations should preserve server-side actor/time; the UI should not fake status locally without refresh. |
Permissions And Guards
| Topic | Behavior |
|---|
| Terminal menu key | customerActivation |
| deptCode menu set | 2, 4, 7, 16, 29 |
| Branch rule | Restricted by dept code and selected branch customer list context. |
| User action | Only users with this menu should see the activation queue/actions. |
Mobile vs POS Terminal
| Topic | Mobile | POS Terminal |
|---|
| Navigation | Activation entry under customer/customer-management flows | Split-pane detail form |
| List | Customer request/customer list | getCustomerActivationSplitList with isRequest=1 |
| Detail actions | Approve/reject/status change where exposed | CustomerActivationDetailForm actions |
| After action | Refresh list/detail | Refresh split list/detail |
Developer Handoff Map
| Area | Code |
|---|
| Terminal detail | apps/pos-terminal/src/screens/HomeScreen/CustomerActivationDetailForm.tsx |
| Customer service | apps/*/src/services/customers.ts |
| Terminal split data | apps/pos-terminal/src/services/splitMenuData.ts -> getCustomerActivationSplitList |
| Menu config | apps/pos-terminal/src/screens/HomeScreen/config.ts and mobile menu config |
| Sales dependency | Customer selection blocking in sales/booking flows |