Customers
Delete a Customer and Recover the Record
Delete removes the customer card from the active customer list and picker. Existing sales stay on record. Confirm the exact dossier first, preserve identifying evidence, and contact support for recovery because the current Customer deletion path does not feed the Settings Recycle Bin restore screen.
- Menu path
- Customers -> Customer List -> select customer -> More -> Delete
- Verified from
- Posnic demo and current POS source reviewed on 2026-09-08
Technical source evidence
frontend/static/script/js/modules/js/customers.js dossier More menu delete confirmation DELETE request and list refresh, api/src/routes/customers.routes.js legacy bulk-delete routing and customer Delete permission, api/src/services/customer.service.js delete existence checks and bulk deletion, api/src/repositories/customer.repository.js customers_recycle_bin backup followed by deletion from customers, frontend/modules/settings_write.html and frontend/static/script/js/modules/js/settings.js shared recycle_bin restore UI, api/src/models/setting.model.js restoreBackup shared recycle_bin implementation, demo.posnic.io customer dossier and delete confirmation reviewed without confirming deletion on 2026-09-11
Before You Delete
Deletion is for an unwanted customer master card, not for correcting a name, settling money or removing a sale. The confirmation is intentionally inside the selected dossier so the operator can verify the record in context.
| Situation | Use Delete? | Correct action |
|---|---|---|
| Wrong phone, email, address, category or GST identity | No | Edit the existing customer profile. |
| Customer owes money | No | Settle or investigate the due before changing the master record. |
| Duplicate or test customer with no continuing use | Possibly | Verify both records, preserve identifiers and delete only the unwanted card under shop policy. |
| Incorrect sale belongs to this customer | No | Correct, return or void the sale through the sales workflow. |
| Customer requests account removal | Only after policy review | Preserve legally required financial records and follow the business privacy process. |
Identify the Exact Customer
- Open Customers -> Customer List.
- Search by phone or email when possible; names alone can be duplicated.
- Select the customer row and read the dossier.
- Compare the name, phone, email, tax type, lifetime sales and recent Sale IDs with the source request.
- Record the customer name, phone or email, branch, and at least one recent Sale ID in the shop's authorized support or audit record.
- Resolve existing dues, wallet value or disputed transactions before deletion. Delete does not settle money.
Delete the Customer Card
- In the verified dossier, open More.
- Choose Delete. The Delete action requires Customer Delete access; a role without that permission should not receive the control.
- Read the confirmation text: the named customer card will go, while sales stay on record.
- Check the displayed name one final time.
- Choose Delete customer only when the request and evidence match. Choose Cancel if anything is uncertain.
- Wait for the success message. Posnic closes the dossier and reloads page 1 of Customer List after a successful response.
What Deletion Changes
| Surface | Expected result | What it does not mean |
|---|---|---|
| Customer List | The card disappears from the active customer collection after refresh. | It does not prove historical sales were deleted. |
| New Sale customer picker | The deleted card should no longer be selectable for a future sale. | A cashier can still use Walk-in Customer or another valid customer. |
| Existing sales | Saved sales remain in Sales History with their recorded customer context and Sale IDs. | Deletion does not void, refund or rewrite those transactions. |
| Customer dossier | The active dossier can no longer be opened from the customer list. | The original transaction evidence still belongs in sales and reports. |
| Credit eligibility | The deleted card can no longer authorize new customer-credit sales. | Deletion is not a payment, write-off or balance settlement. |
Verify After Deletion
- Search Customer List again with the same phone, email and name.
- Start a controlled New Sale and confirm the deleted customer is absent from customer lookup; do not complete the sale unless needed for an approved test.
- Open Sales History and search one of the recorded Sale IDs.
- Confirm the historical sale total, date, status and payment evidence still load.
- Check Outstanding Customers or the customer account workflow if the card had dues before deletion; escalate any mismatch immediately.
- Attach the success message, timestamp and verifying Sale ID to the authorized audit record.
Current Recovery Boundary
The current source contains two different recycle-bin mechanisms. Customer deletion backs the full record up to customers_recycle_bin and then deletes it from the active customers collection. The Settings -> Recycle Bin page reads a different shared recycle_bin collection. Consequently, its Customer filter and Restore button cannot currently be relied on to recover a customer deleted by this dossier action.
- Do not tell an operator that Settings -> Recycle Bin is a verified self-service recovery path for deleted customers in this build.
- Do not create a replacement customer immediately when restoration is required; that can create a second identity and split history.
- Contact Posnic support or the database administrator with the shop/license, branch, deleted customer name, phone or email, approximate deletion time and a recent Sale ID.
- Ask the recovery operator to inspect the license-scoped customers_recycle_bin backup and validate the restored active record against historical sales.
- Treat recovery as complete only after the customer appears in the active list and picker and the historical Sale IDs still reconcile.
Permissions and Data Boundaries
- The UI marks Delete with Customer Delete access. Grant it only to roles allowed to remove customer master data.
- The delete request is license-scoped, so a record from another license must not be affected.
- The customer backup retains the original document plus deleted_date and deleted_by in the dedicated backup collection.
- Historical sales can retain customer IDs and transaction-time snapshots; the customer master and a sale document are separate records.
- Deleting personal contact details from the active customer list does not automatically erase information that must remain in financial records.
Troubleshooting
| Problem | Likely cause | Action |
|---|---|---|
| Delete is not shown | The signed-in role lacks Customer Delete access. | Ask an authorized manager; do not work around role controls. |
| Wrong customer is in the confirmation | The selected row or dossier is not the intended record. | Cancel, close the dossier and search again by phone, email or Sale ID evidence. |
| Customer remains in the list | The request failed, the list is stale or a duplicate card exists. | Refresh, search exact phone/email, read the error message and keep both record IDs distinct. |
| Historical sale cannot be found | The wrong Sale ID, branch, date filter or permission is in use. | Clear filters, choose the correct branch and search the captured Sale ID before escalating. |
| Settings Recycle Bin shows no customer | The current customer delete path writes to a different backup collection. | Stop; use support-assisted recovery with the recorded identifiers. |
| A replacement profile was already created | History may now be split across two customer identities. | Do not delete either card impulsively. Give both records and Sale IDs to support for reconciliation. |
| The customer had unpaid dues | Deletion does not settle or write off the balance. | Escalate to the owner/accounting workflow and reconcile source sales and payments. |