Customers & Categories

Everything for maintaining customer master records — their linked user account, addresses, categories, sales and credit settings, and tax identifiers — plus the two supporting look-up lists: Customer Categories and Advocate Associations.

What a "customer" is

A customer record is always attached to an existing User (see /staff/users) — every advocate, library, government office or company that AIR sells to must first exist as a user, and the Customer record adds the sales-facing details on top: addresses, credit terms, tax identifiers and category memberships. A user can exist without a customer record (staff, for example); a customer record cannot exist without a user.

Customer Resource

Nav: Customers → Customers. This is the master list of every customer account.

Permissions

The Customers list is the one resource in this whole cluster that is not super-admin-only. You need customer.view or customer.create to see it at all (any one of the two is enough). Every other resource on this page — Customer Categories and Advocate Associations — is super-admin only, with no granular permission honoured.

Columns

ColumnShows
User IDuser.u_id — the linked user's ID (e.g. C-12345), searchable.
NameThe linked user's full name (via user.profile.full_name); shows if the profile has no name set.
Delivery PriorityBadge showing Normal, High or Urgent — plain styling, no colour map.
VerifiedIcon (tick/cross) for is_verified.
No OrdersIcon for do_not_accept_order — when on, this customer's orders are blocked further down the sale-order flow.
Salespersonsalesperson.u_id — the staff user this customer is assigned to.
Createdcreated_at, date + time. Hidden by default — switch it on from the column toggle.

Filters

FilterWhat it narrows
VerifiedThree-way (yes / no / all) on is_verified.
Do Not Accept OrderThree-way on do_not_accept_order.
Delivery PrioritySelect over Normal / High / Urgent.
Screenshot placeholderThe Customers list at /staff/customers — User ID, Name, Delivery Priority badge, Verified/No Orders icon columns, Salesperson, and the three filters (Verified, Do Not Accept Order, Delivery Priority) open in the filter panel.

Creating or editing a customer

Select New customer on the list, or Edit on a row. The form is the same for both, except User is locked once the record is created (a customer can never be re-pointed at a different user).

Section: Customer Details

Every relationship field here is a search-as-you-type Select over User records, and each one displays candidates using the same label pattern: "{u_id} — {full name}" — so you're always choosing a person by their ID and name together, never a bare ID.

FieldTypeRequiredNotes
user_idSelect — User, label "{u_id} — {full_name}"YesSearchable. Disabled on edit — the linked user cannot be changed after creation.
delivery_prioritySelect — DeliveryPriorityNoNormal / High / Urgent.
parent_customer_idSelect — Parent Customer, same label patternNoSearchable, nullable. Links a sub-account (e.g. a branch) to a parent customer.
salesperson_idSelect — Salesperson, same label patternNoSearchable, nullable. Disabled for non-super-admins — see callout below. Still saved even while disabled.
ho_contact_person_idSelect — HO Contact Person, same label patternNoSearchable, nullable. The HO staff member this customer's queries route to.
recovery_partner_idSelect — Recovery Partner, same label patternNoSearchable, nullable. Staff responsible for chasing overdue recovery on this account.
so_confirm_by_idSelect — SO Confirmed By, same label patternNoSearchable, nullable. The staff member who confirms this customer's sale orders.
Why the Salesperson field is sometimes greyed out

If you are not a super administrator, when you create a customer the console automatically sets you as the Salesperson and disables the field — you cannot hand a new customer to a colleague by editing this field yourself, only a super admin can. If you leave it blank as a super admin, it defaults to you too. The field still submits its value even though it looks locked — it isn't simply ignored, it's fixed to your own user.

Section: Sales & Credit

Collapsible, collapsed by default.

FieldTypeRequiredNotes
is_verifiedToggleNoMarks the customer as verified (e.g. KYC/identity checked).
do_not_accept_orderToggleNoWhen on, this customer is blocked from having new orders accepted.
enforce_credit_limitToggleNoTurns on credit-limit checking for this customer's orders.
credit_limitNumericNoNullable. The ceiling checked when enforce_credit_limit is on.
send_first_three_parts_on_creditToggleNoAllows the first three monthly parts of a Full Set to go out even while payment is still pending.
subscriber_expiredToggleNoMarks the subscription as lapsed.

Section: Tax & ID

Collapsible, collapsed by default.

FieldTypeRequiredNotes
gst_registration_numberText (GSTIN)NoMax 15 characters.
gst_registration_typeSelect — GstRegistrationTypeNoRegular / Composition / Unregistered / Consumer / DeemedExport / Sez. Nullable.
permanent_account_numberText (PAN)NoMax 10 characters.
tan_numberText (TAN)NoMax 10 characters.
aadhar_numberText (Aadhaar)NoMax 12 characters.
company_cinText (CIN)NoMax 21 characters.
Screenshot placeholderThe customer create/edit form — the "Customer Details" section fully expanded showing the six user-relationship selects each rendered as "u_id — full name", with "Sales & Credit" and "Tax & ID" shown collapsed beneath it.

Relation managers

Open a customer record (via Edit) to reach two tabs beneath the form.

Addresses

Every delivery, billing or office address recorded for this customer.

  1. Select New address

    Opens the address form below. There is no limit on how many addresses a customer can have.

  2. Choose the Type

    One of Primary, Billing, Shipping, Office or Other — required. A customer can have more than one address of the same type; the type is a label, not a uniqueness constraint.

  3. Fill in the address

    label (a free-text name for the address, e.g. "Chamber No. 4"), street, street2, city, pincode_id and region_id (both searchable Selects — see Geography for how pincodes and regions are structured), state_code, country_code (defaults to IN), phone, mobile.

  4. Set Default and Verified as needed

    is_default marks this as the address the customer's orders use unless another is chosen; address_verified marks that HO has confirmed the address is deliverable.

  5. Save

    The address appears in the table with its Type, Street, City, and the Default/Verified icon columns. Use the row's Edit or Delete to change or remove it later.

Categories

The set of Customer Categories this customer belongs to (a customer can hold more than one — for example both Advocate and a firm-level category).

  1. Select Attach

    Opens a pre-loaded picker of existing categories — you choose from categories already defined on the Customer Categories list, you cannot create a new one from here.

  2. Pick the category and confirm

    The category's Name, Code and Air Type badge appear in the table.

  3. To remove a membership, use Detach on its row

    Detaching only removes the link between this customer and the category — it does not delete the category itself. Select multiple rows and use the bulk Detach action to remove several at once.

Screenshot placeholderA customer's "Addresses" relation-manager tab open, showing two address rows (one Primary, one Shipping) with their Default and Verified icon columns, and the "New address" button top-right.

Planned: merge and bulk import

Planned — no console button yet

Two customer permissions are seeded but not wired to anything in this resource: customer.merge (merging two duplicate customer records into one) and customer.bulk_import (importing many customers at once, e.g. from a spreadsheet). Today, the Edit/Delete actions on the Customers list are the only actions available — there is no Merge button and no Import button anywhere on this page. When built, these will most likely appear as header actions on the Customers list (a bulk action for merge given two selected rows, and a header import action next to where New customer sits today) — but that UI does not exist in the console yet. Until then, duplicate customers must be reconciled manually and bulk data must be loaded by another means (e.g. a database seeder or a future API endpoint), not through this screen.

Customer Category Resource

Nav: Customers → Customer Categories. Categories classify customers by their nature — used for commission calculation and to control whether a customer needs manual re-validation when they already have a draft sale order. Built — full create/edit/delete.

Permissions

Super administrator only. There is a seeded customer.manage_categories permission, but this resource's access check does not honour it — only the super_admin role can open this page today.

Columns

ColumnShows
NameSearchable, sortable.
CodeBadge, searchable.
Air TypeBadge — Advocate, Library, Government, Individual, Company or Other; plain styling, no colour map.
Consider For CommissionIcon boolean.
ActiveIcon boolean.
CreatedDate + time, hidden by default.

Filters

FilterWhat it narrows
Air TypeSelect over all six AirType cases.
Active StatusThree-way on is_active.

Creating or editing a category

Section "Category Details":

FieldTypeRequiredNotes
nameTextYesMax 100, unique.
codeTextYesMax 50, unique. Disabled once created.
air_typeSelect — AirTypeYesAdvocate / Library / Government / Individual / Company / Other.
consider_for_commissionToggleNoWhen on, sales to customers in this category count toward salesperson commission calculations.
validate_existing_draft_soToggleNoWhen on, a customer already holding a draft sale order in this category is flagged for re-validation rather than proceeding silently.
descriptionTextarea, full widthNoFree text.
is_activeToggleNoDefault on.

There are no relation managers on this resource — category membership is managed from the customer's own Categories tab described above, using Attach/Detach.

Advocate Association Resource

Nav: Customers → Advocate Associations. A reference list of advocate/bar associations by district and state, used elsewhere to associate a customer with the local bar body they belong to. This is the simplest resource in the whole console — plain field-level CRUD with no relationships in its form and no relation managers. Built.

Permissions

Super administrator only — no granular permission string is checked.

Columns

ColumnShows
NameSearchable, sortable.
DistrictPlain text — not searchable or sortable.
State CodePlain text.
ActiveIcon boolean.
CreatedDate + time, hidden by default.

Filters

Only one: Active Status, a three-way filter on is_active.

Creating or editing an association

Section "Association Details":

FieldTypeRequiredNotes
nameTextYesMax 255, unique.
districtTextNoMax 100.
state_codeTextNoMax 2.
is_activeToggleNoDefault on.
Screenshot placeholderThe Advocate Associations list — Name, District, State Code and Active columns, with the "Active Status" filter open and the "New association" button visible.

Where customer data is used next

A customer record's salesperson, credit settings and category feed directly into the sale-order lifecycle documented in Sale Orders — for example enforce_credit_limit/credit_limit govern whether an order needs credit approval, and do_not_accept_order blocks new orders outright. Addresses and their linked pincodes/regions come from the structures explained in Geography.