Back to ER Diagram
Master Data

Master Data Governance Logic

UOM, currency, material master, cost codes, approval matrix, custom fields, holiday calendar, notification templates, and sequence configuration.

PostgreSQL
11 Tables
Schema: master_data
Configuration Hub

Overview

Master Data Governance ensures consistent reference data across all InfraTraq modules. Unit of Measurement (UOM) standardization prevents conversion errors. Material master provides a single source of truth for material codes. Cost codes enable uniform project cost tracking. Approval matrix defines approval levels by amount and document type. Custom fields extend entity schemas without database changes. Notification templates standardize system communications.


Define Standards

Configure Rules

Distribute

Maintain

Audit
11
Master Tables
Central
Configuration
Multi-Tenant
Support
Versioned
Change Tracking

Status States

StatusDescriptionAllowed ActionsNext States
ActiveMaster record in use across systemEdit, DeactivateInactive
Pending ReviewNew/changed record awaiting approvalApprove, RejectActive, Rejected
InactiveRecord deactivated, not available for selectionReactivateActive
DraftRecord being preparedSubmit for ReviewPending Review

Database Schema

master_data.material_master

  • material_id — PK
  • tenant_id — FK → organization.tenant
  • material_code, material_name — Unique identification
  • category, sub_category — Classification hierarchy
  • uom_id — FK → master_data.uom
  • hsn_code — GST HSN/SAC classification
  • is_active — Availability flag

master_data.cost_code

  • cost_code_id — PK
  • code, description — Cost code identifier and meaning
  • category — material | labour | equipment | overhead | subcontract
  • parent_cost_code_id — FK → self (hierarchical)
  • is_active — Active flag

master_data.approval_matrix

  • matrix_id — PK
  • document_type — po | mr | payment | budget | change_order
  • min_amount, max_amount — Amount range for this level
  • approver_role_id — FK → admin.role
  • level_order — Sequential approval level (1, 2, 3...)
  • is_active — Active flag

master_data.uom

  • uom_id — PK
  • uom_code, uom_name — e.g., MT (Metric Ton), CUM (Cubic Meter)
  • category — length | area | volume | weight | count
  • base_uom_id, conversion_factor — For UOM conversion

master_data.notification_template

  • template_id — PK
  • event_type — po_approved | grn_received | invoice_due etc.
  • channel — email | sms | push | in_app
  • subject_template, body_template — Templates with {{variables}}
  • is_active — Enabled/disabled

master_data.custom_field

  • field_id — PK
  • entity_type — project | vendor | material etc.
  • field_name, field_type — text | number | date | dropdown
  • options_json — Dropdown options if applicable
  • is_required, is_active — Validation flags

Master Data Operations

1

Standard Definition

Define UOMs, currencies, cost codes, and material categories following industry standards (IS codes, HSN/SAC). Establish naming conventions and code structures.

2

Approval Matrix Setup

Configure multi-level approval matrix per document type and amount range. Higher amounts require higher authority. Matrix reviewed quarterly as org structure changes.

3

Material Master Maintenance

New materials added through approval workflow. Duplicates detected by name/code similarity. Inactive materials hidden from selection but retained for historical reference.

4

Custom Field Configuration

Administrators extend entity forms with custom fields. Field types include text, number, date, and dropdown. No database schema changes needed — stored in JSONB columns.

5

Change Management

All master data changes logged in audit trail. Bulk changes (e.g., HSN code update) go through approval workflow. Version history maintained for compliance.

Master Data Queries

Approval Matrix Lookup

-- Find approval chain for a purchase order amount
SELECT am.level_order, r.role_name, am.min_amount, am.max_amount
FROM master_data.approval_matrix am
JOIN admin.role r ON r.role_id = am.approver_role_id
WHERE am.document_type = 'po'
  AND am.is_active = TRUE
  AND :po_amount BETWEEN am.min_amount AND am.max_amount
ORDER BY am.level_order;

Validation Rules

Business Rules

  • UOM Conversion: Conversion factor must be > 0; base UOM maps to itself with factor 1
  • Cost Code Uniqueness: Cost codes must be unique per tenant
  • Approval Gap: Amount ranges in approval matrix must be continuous with no gaps
  • Material Duplicate: System blocks materials with >90% name similarity within same category

Integration Points

Connected Modules

  • All Modules: Material master, UOM, cost codes, and currencies referenced across entire system
  • RBAC: Approval matrix enforced through workflow engine
  • Finance: Cost codes structure the chart of accounts and budget allocation
  • Procurement: Material master drives MR, PO, and GRN item selection

Best Practices

Recommended

  • Establish a Master Data Steward role for ongoing governance
  • Review approval matrix quarterly as organization and delegation changes
  • Use HSN/SAC codes consistently for GST compliance
  • Avoid proliferation of custom fields — review quarterly for unused fields