Zones, Regions & Pincodes

The three building blocks AIR uses to describe "where" — a coarse sales Zone, a fine-grained administrative Region tree, and the postal Pincodes that sit under a region. Warehouses, customer addresses and carrier serviceability all point back to these records.

Permissions

All three resources on this page — Zones, Regions and Pincodes — are restricted to super administrators only. The console checks this with a hardcoded "is this user a super admin?" test, not a permission string, so granting someone the seeded zone.view, region.view or pincode.view permissions on a non-super-admin role has no effect — they still will not see these pages. Only the super_admin role can open Geography today.

How the three fit together

A Zone is a broad grouping used for sales/administrative rollups — think of it as a label you attach to a set of Regions. A Region is the real geographic unit and is organised as a tree: every region (except the top-level country row) has a Parent Region, and the console tracks how deep in the tree a region sits via a computed Depth column. The conventional depth of the tree runs Country → State → District → Sub-District → Town/Village, one region_type per level. A Pincode is a postal code record that belongs to exactly one Region (its region_id) and, in turn, is where carrier serviceability and warehouse/customer addresses are ultimately anchored.

Zones

Zones live under Geography → Zones in the sidebar. A Zone is a flat, non-hierarchical grouping — it has no parent of its own, and any number of Regions can be tagged into it via the Regions tab.

Zone list

ColumnShows
nameZone name. Searchable, sortable.
codeShort unique code, shown as a Code badge. Searchable.
assignedUser.u_idLabel "Assigned User" — the User ID of the staff member responsible for the zone, if one is set.
regions_countLabel "Regions" — count of Regions currently tagged to this zone. Sortable.
is_activeLabel "Active" — a tick/cross icon.
created_atDate/time created. Sortable; hidden by default — switch it on from the column toggle.

Filter: Active Status (yes/no/either) is the only filter on this list.

Screenshot placeholderThe Zones list — Name, Code badge, Assigned User, Regions count, Active icon columns, with the Active Status filter panel open.

Create / edit a Zone

Select New zone on the list, or Edit on a row. The form is a single section, "Zone Details":

FieldTypeRequiredNotes
codeTextYesMax 20, unique. Locked (disabled) once the zone exists — you cannot rename the code on edit.
nameTextYesMax 100, unique.
descriptionTextareaNoFull width.
assigned_user_idSelect (searchable)NoLabel "Assigned User". Options list every user as "{u_id} — {full_name}". Nullable.
is_activeToggleNoDefaults on.
Screenshot placeholderThe Zone create/edit form — Code, Name, Description, Assigned User select and the Active toggle.
Deleting a Zone is not guarded

Unlike Regions (below), Delete on a Zone has no safety check at this level — the console will let you delete a zone even if Regions are still tagged to it. Deleting simply removes the zone grouping; the Regions themselves are not deleted, but they lose their zone tag. Double-check the Regions count column before deleting a zone you are not sure is empty.

Regions tab

Open a Zone and switch to its Regions relation manager to see and manage which Regions are tagged into it.

ColumnShows
nameRegion name, searchable.
region_typeType badge (Country/State/District/SubDistrict/TownVillage) — plain styling, not colour-coded.
is_activeLabel "Active" — tick/cross icon.

Actions here: header Create (adds a brand-new region, pre-tagged to this zone), row Edit, and row Delete. Unlike the Zone delete you just read about, this Delete is guarded — it reuses the same protective check described in Deleting a Region below, even though you triggered it from inside a Zone's tab.

Regions Built

Regions live under Geography → Regions. This is the console's fullest geography editor: create, edit and delete, plus two relation managers for the region's children and its pincodes.

Region list

ColumnShows
nameRegion name. Searchable, sortable.
short_nameAbbreviated name. Searchable.
region_typeType badge — plain styling (no colour map).
zone.nameLabel "Zone" — the tagged Zone, if any.
parent.nameLabel "Parent" — the region one level up the tree.
depthHow many levels below the top of the tree this region sits. Sortable. Computed/maintained by the system — never entered by hand.
is_activeLabel "Active" — tick/cross icon.
created_atSortable; hidden by default.

Filters:

FilterNarrows to
Region TypeOne of the 5 RegionType cases: Country, State, District, Sub-District, Town/Village.
ZoneRegions tagged to a chosen Zone.
Active StatusYes / No / Either.
Parent RegionAll direct children of a chosen parent region — searchable select.
Screenshot placeholderThe Regions list with the Region Type, Zone, Active Status and Parent Region filters open, showing Name, Short Name, Type, Zone, Parent and Depth columns.

Create / edit a Region

The form is organised into four sections. Only "Region Details" is expanded by default — the rest are collapsible and start collapsed.

Region Details

FieldTypeRequiredNotes
nameTextYesMax 255.
short_nameTextNoMax 100.
report_nameTextNoMax 255 — the name used on printed reports.
region_typeSelectYesCountry / State / District / Sub-District / Town-Village.
parent_idSelect (searchable)NoLabel "Parent Region". See the cycle-prevention note just below — nullable (a Country-level region has no parent).
zone_idSelect (searchable)NoLabel "Zone". Nullable.
sub_zoneTextNoMax 50, free-text sub-grouping within a zone.
is_selectableToggleNoDefaults on.
is_aliasToggleNoDefaults off — marks the region as an alternate name for another, rather than a real place.
is_activeToggleNoDefaults on.
You cannot make a region its own ancestor

When you edit an existing region, the Parent Region list is filtered to remove that region's own row and every one of its descendants. This is a deliberate cycle guard — without it you could pick a child of the region as its own parent and corrupt the tree. If a region you expect to see as a possible parent is missing from the list, it is almost certainly because it sits underneath the region you are editing.

Government Codes (collapsible)

FieldTypeRequiredNotes
st_codeTextNoMax 10 — state code.
dt_codeTextNoMax 10 — district code.
sdt_codeTextNoMax 10 — sub-district code.
tv_codeTextNoMax 10 — town/village code.
gst_st_codeNumberNoGST state code, numeric form.
gst_st_code_charTextNoMax 10 — GST state code, character form.

Assignments (collapsible)

FieldTypeRequiredNotes
region_account_holder_idSelect (searchable)NoLabel "Account Holder". Nullable.
region_user_idSelect (searchable)NoLabel "Region User" — the staff member responsible for this region. Nullable.

Sort Orders (collapsible, 3 columns)

FieldTypeRequiredNotes
sort_order_1NumberNoNullable — custom display ordering, use 1–3 as your reporting needs demand.
sort_order_2NumberNoNullable.
sort_order_3NumberNoNullable.
Depth and path are not form fields

The depth column you see on the list, and the underlying materialized_path the system uses for fast tree lookups, are never typed in by hand. They are derived automatically from where you place the region in the tree via Parent Region, and kept in sync by the system whenever a region moves.

Screenshot placeholderThe Region create/edit form with Region Details expanded and Government Codes, Assignments and Sort Orders shown collapsed.

Deleting a Region

Select Delete on a region row, or the header Delete action on a region's edit page. Before anything is removed, the console runs a protective check and will refuse to delete a region that is still in use:

Delete is blocked, with a red notification, when…

…the region still has one or more active child regions underneath it in the tree, or the region is referenced by any geography scope (a user's assigned area of responsibility). In either case the delete is halted before it happens and you see a red "cannot delete" notification explaining why. To proceed, first re-parent or deactivate the region's children, and remove any geography scopes pointing at it — then delete will succeed.

This same guard is reused in two other places, so the rule is consistent everywhere you can delete a region: the Delete action inside a Region's own Children tab, and the Delete action inside a Zone's Regions tab.

Children tab

Open a Region and switch to Children to see every region one level directly beneath it.

ColumnShows
nameChild region name, searchable.
region_typeType badge.
is_activeLabel "Active" — tick/cross icon.

Header Create adds a new child directly under this region (name, type and active toggle only — the parent is set automatically). Row Edit and Delete are available; Delete uses the same guard described above.

Pincodes tab

Open a Region and switch to Pincodes to see every pincode filed under it.

ColumnShows
pincodeThe postal code, searchable.
office_namePost office name.
state_nameState name as recorded on the pincode record.
is_activeLabel "Active" — tick/cross icon.

Header Create opens a short form (pincode, office name, state name, district name, active toggle) that files a new pincode straight under this region. Row Edit and Delete are plain — unlike the region-delete guard above, deleting a pincode here is not blocked by any check.

Screenshot placeholderA Region's edit page with the Children and Pincodes tabs visible below the form, each showing its own mini-table and Create button.

Pincodes Built

Pincodes also have their own full page at Geography → Pincodes — the same records you can reach from a Region's Pincodes tab, but listing every pincode in the system regardless of which region it sits under, with its own filters.

Pincode list

ColumnShows
pincodeThe postal code. Searchable, sortable.
office_namePost office name. Searchable.
office_typeFree-text office type (plain text, not a badge).
state_nameState name as recorded on the pincode.
district_nameDistrict name as recorded on the pincode.
region.nameLabel "Region" — the region this pincode is filed under.
is_activeLabel "Active" — tick/cross icon.
created_atSortable; hidden by default.

Filters: Active Status (yes/no/either) and Region (searchable select over every region).

Screenshot placeholderThe Pincodes list with the Region filter open, showing Pincode, Office Name, State, District, Region and Active columns.

Create / edit a Pincode

The form has four sections; "Pincode Details" and "System Links" are expanded, "Location" and "Contact" are collapsible.

Pincode Details

FieldTypeRequiredNotes
pincodeTextYesMax 10, unique.
office_nameTextNoMax 255.
office_typeTextNoMax 50, e.g. "Sub Office".
delivery_statusTextNoMax 50.

Location (collapsible)

FieldTypeRequiredNotes
state_name, district_name, taluka, division_nameTextNoMax 150 each — free-text location descriptors, not linked to the Region tree.
region_nameTextNoLabel "India Post Region" — max 150. Not the same thing as the region_id link below; this is India Post's own regional label.
circle_name, head_office, sub_officeTextNoMax 255 each — India Post administrative hierarchy names.

Contact (collapsible, starts collapsed)

FieldTypeRequiredNotes
telephoneTextNoMax 50.
general_notesTextareaNoFull width.

System Links

FieldTypeRequiredNotes
region_idSelect (searchable)NoLabel "Region" — the actual AIR Region this pincode is filed under (the link used by the Region's Pincodes tab). Nullable.
ivr_dial_to_user_idSelect (searchable)NoLabel "IVR Dial To User" — which staff member's phone an inbound IVR call from this pincode's area should ring. Nullable.
is_activeToggleNoDefaults on.
Screenshot placeholderThe Pincode create/edit form showing Pincode Details and System Links expanded, Location and Contact collapsed.

Carrier Serviceability tab

Open a Pincode and switch to its relation manager to record which delivery carriers can serve this pincode.

ColumnShows
carrier_codeSearchable — the carrier's code.
is_serviceableLabel "Serviceable" — tick/cross icon.
is_metroLabel "Metro" — tick/cross icon, flags a metro-rate pincode.
zoneFree-text carrier zone code for this pincode.

Header Create opens a form: carrier_code (required, max 50), is_serviceable (toggle, defaults off), is_metro (toggle, defaults off), zone (text, max 5). Row Edit and Delete are plain, with no guard.

Bulk pincode import — Planned

A permission named pincode.import ("Bulk import pincode data") exists, and it is tempting to assume there is a spreadsheet-upload screen somewhere. There is not. No import button, file-upload dialog, or bulk-import service is wired into the console today. Every pincode — India has tens of thousands of them — must currently be entered one at a time through the create form described above, either from Geography → Pincodes directly or from a Region's Pincodes tab. Treat any workflow that assumes a bulk upload exists as aspirational until this is built.

Where else these records are used

Regions and Pincodes are not self-contained — other modules point at them:

See also Warehouses & Carriers for how Regions attach to a Warehouse's serviceable area, and Schedulers for the background jobs that read warehouse/region data every day.