Users
Every person who signs into any part of the portal — staff and customers alike — starts life as one record here. This page covers the Users screen: who can open it, the multi-table model behind a "user", how to create and edit one, and its four relation-manager tabs.
The multi-table user model, simply
Nothing in the portal has a single "user" row with everything on it. A person's account is spread across up to four tables, each doing one job. This page edits all four at once, but it helps to know why they're separate:
users, profiles and staff together; the separate Customers module owns the customers row.The Users form includes a Staff Details section, so it is best understood as where you create and manage staff logins — Sales Executives, cashiers, approvers, administrators. Customer-specific fields (delivery priority, GST details, credit limit…) live on the separate customers row, managed from Customers, which points back at a users row via its user_id field. You can still open any user here — customer or staff — to fix their login, contacts, roles or scopes.
Finding the screen
In the left navigation: Access Control → Users. The list shows every user in the system, most recent first.
List columns
| Column | Shows |
|---|---|
| User ID | u_id, e.g. S-001 or C-12345. Searchable, sortable. |
| Name | The linked profile's full name. Searchable, sortable. |
| The user's primary e-mail contact (blank if none set). Not searchable — use the Contacts tab to search by e-mail directly. | |
| Phone | The user's primary phone contact (blank if none set). |
| Active | Check icon when is_active is true. |
| Roles | Every role currently attached, as badges (plain grey — no colour coding). |
| Created | created_at, date + time. Hidden by default — switch it on from the column toggle. Sortable. |
Filters
| Filter | Effect |
|---|---|
| Active Status | Three-way toggle: all / active only / inactive only, on is_active. |
| Role | Restrict the list to users holding a specific role (select box, preloaded with all roles). |
Creating a user Built
- Select New user
Opens the create form with three sections: Account, Profile and Staff Details.
- Choose a User ID
Type a u_id following the house convention —
S-001style for staff,C-12345style for customers (the exact numbers are a manual convention, not auto-generated; the field just enforces a 15-character maximum). Once saved, the User ID is locked — it cannot be edited afterwards. - Set a password
Enter the person's initial password. It is required when creating a user; if you leave it blank later while editing, the existing password is left unchanged.
- Decide on "Must change password"
This toggle defaults to on. When on, the new user is expected to change their password the first time they authenticate — the account is provisioned but not yet fully self-serviced. Leave it on for every new login unless you have a specific reason to hand over a permanent password immediately.
- Fill in the Profile section
At minimum, the person's full name.
- Fill in Staff Details, if this is a staff login
Discount ceilings, credit ceiling, and whether they can accept payments or sale orders directly (see field table below). Leave blank for a pure customer-side user.
- Save
The user, profile and staff rows are created together in one submission.
Account section
| Field | Type | Required | Notes |
|---|---|---|---|
| u_id (User ID) | Text | Yes | Max 15 characters. Locked (disabled) once the user is created. Helper text on screen: "e.g. S-001 for staff, C-12345 for customer". |
| Password | Password (revealable) | Create only | Max 255. On edit, leaving it blank keeps the current password — it is only saved if you type a new one. |
| Must change password | Toggle | — | Defaults to on for new users. Governs whether this account is forced through a password-change flow the next time it authenticates via the API/field app. |
| Active | Toggle | — | Defaults to on. Switch off to block sign-in without deleting the account. |
Profile section
| Field | Type | Required | Notes |
|---|---|---|---|
| Full name | Text | Yes | Max 255. |
| Title | Text | No | Max 20 (e.g. "Adv.", "Mr", "Dr"). |
| Date of birth | Date picker | No | — |
| Anniversary date | Date picker | No | — |
| Gender | Select | No | Male / Female / Other. |
| Marital status | Select | No | Single / Married / Divorced / Widowed. |
Staff Details section
Collapsed by default (select it to expand). Relevant when this login is a staff account.
| Field | Type | Required | Notes |
|---|---|---|---|
| Immediate superior | Select (searchable) | No | Picks another user, shown as {u_id} — {full_name}. |
| Max party discount % | Number | No | Decimal, step 0.01. |
| Max BA discount % | Number | No | Decimal, step 0.01. |
| Max special discount % | Number | No | Decimal, step 0.01. |
| Max overall discount % | Number | No | Decimal, step 0.01. |
| Max customer credit outstanding | Number | No | Decimal, step 0.01, in ₹. |
| Accept payments | Toggle | — | Defaults off. |
| Accept Sale Orders | Toggle | — | Defaults off. |
| Commission rule | Text | No | Max 100 — a free-text label/code, not a live rule picker. |
Editing a user
Select any row to open the same three-section form pre-filled. The only field that changes behaviour on edit is User ID (locked) and Password (optional — blank means unchanged). Use Delete in the row actions to remove a user entirely; there is no separate deactivate/reactivate action beyond the Active toggle.
The four relation-manager tabs
Opening a user for editing reveals four tabs beneath the form: Contacts, Roles, Geography Scopes and Customer Scopes.
Contacts Built
Every e-mail address and phone number recorded against the user, and whether each is the primary one and whether it has been verified. Sign-in to this console only succeeds against a verified e-mail contact — see Getting started.
- Select New contact
Opens a small form.
- Choose the type
Email or Phone — required.
- Enter the value
The address or number itself, max 255 characters — required.
- Set Primary and Verified as needed
Primary defaults off; Verified defaults on. Only a verified e-mail contact lets its owner sign into this console.
- Save
The contact appears in the tab's table immediately; use the row Edit/Delete to change or remove it later.
Roles Built
Every role the user currently holds, when it was assigned, and when (if ever) it expires. See Roles & Permissions for how roles carry permissions.
- Select Attach
Opens a picker preloaded with every existing role.
- Choose the role
- Optionally set an expiry date and time
The attach form includes an Expires at date-time field alongside the role picker. Leave it blank for a role that never expires; set it to have the role's permissions automatically drop out of the user's effective permissions once the moment passes.
- Save
The role appears in the table with its Assigned at timestamp and its expiry (or "Never").
Use the row Detach action (or select several rows and use the bulk Detach action) to remove a role from the user. Detaching only removes the assignment — it never deletes the role itself.
Geography Scopes Partial
Which regions this user owns, manages, or may only view — the mechanism that, once wired into query scoping elsewhere in the console, will restrict which records (e.g. sale orders, customers) a non-super-admin user can see by geography.
- Select New
- Enter the Region ID by hand
A plain number field, required. There is no searchable region picker here yet.
- Choose the scope type
Owns (default), Manages or Views.
- Save
The on-screen helper text under the Region ID field still reads "Regions module not yet built — enter region ID manually" — a leftover from when the Regions module genuinely didn't exist yet. The Geography module is built now, but this tab was never updated to use a live picker against it, so you must still look up and type the numeric region ID by hand. Open Geography in another tab to find the ID you need.
Customer Scopes Partial
A direct, per-customer override that takes precedence over geography scoping — grant a user ownership/management/view rights on one specific customer regardless of which region that customer sits in.
- Select New
- Enter the Customer ID by hand
A plain number field, required — the same stub pattern as Geography Scopes.
- Choose the scope type
Owns (default), Manages or Views.
- Optionally set an expiry
Date-time field; blank means the scope never expires.
- Optionally add a reason
Free text, explaining why the scope was granted. Shown in the table but hidden from the default column set.
- Save
The helper text here reads "Customers module not yet built — enter user ID manually". Like Geography Scopes above, the underlying module (Customers) is now built, but this tab still expects you to type the numeric customer ID by hand rather than search for it. Look the customer up in Customers first.
See Roles & Permissions for how a role's permissions combine into a user's effective access, and Customers for the customer-side record that a customer's u_id links back to.