Services, forms and workflow
hayaterp.com ↗Set up public services in Hayat Civic — departments with their head, members and complaint categories, the service builder (details, the form builder with text, number, date, choice, file and map-location fields, required documents, fees that are fixed or worked out by a formula from the answers, paying before processing, stages in order with the department, SLA days and site inspection, the certificate or licence template with placeholders, validity and renewal fee).
Departments and services need civic.manage.
Departments
Every stage of a service and every complaint belongs to a department. Open Departments and press + Department:
| Field | Fill |
|---|---|
| Code, Name, Name (local) | e.g. BCD — Building Control — and the name in Urdu or Arabic |
| Head (name) | The head is notified when a stage or complaint of the department is late. Make me head fills yourself |
| Member user IDs (one per line; blank = anyone with civic.process) | The officers who may act on this department's stages. Add me adds yourself |
| Complaint categories (one per line) | e.g. Illegal construction, Encroachment — new complaints in these categories come to this department |
| Active |
A service
Open Services & forms and start a new service. The service builder has six tabs.
Details
| Field | Fill |
|---|---|
| Code, Name, Name (local) | e.g. TL — Trade licence |
| Category | Groups services on the portal: Building, Business, Civil registration |
| Department | The department that owns the service |
| Description | What it is for and who may apply |
| Citizens can apply on the portal | Off: counter applications only |
| Active, Sort order |
Press Save service at any time.
The form builder
The Form builder tab holds the questions the applicant answers. Press + Field for each:
| Setting | Means |
|---|---|
| Key | A short name used in fee formulas and the certificate: letters, digits and _, starting with a letter, e.g. plotArea |
| Label | The question, e.g. Plot area (sq ft) |
| Type | text, textarea (long text), number, date, select (one of a list), file (a document upload) or location (a pin on the map) |
| Required | |
| Help | A hint under the field, e.g. As on the registry |
| Max length | For text (300 by default) and textarea (2,000) |
| Min, Max | For numbers |
| Options (one per line) | For select |
| Personal (never to AI / BI) | Tick for names, CNICs and other personal answers — they are never sent to Hayat AI or the Hayat Reports datasets |
Reorder with ↑ and ↓. The preview beside the list shows the form as the citizen will see it. Validate checks the form on the server; Edit JSON shows the form as text for copying between services (Apply JSON to use edited text, Back to list to return). A form can have up to 80 fields.
All answers are stored encrypted. When an application is submitted, every required field, file and document is checked and missing ones are listed.
Required documents
On the Documents tab press + Document for each document the applicant must upload, with a Label (Ownership document (registry / allotment), Owner's CNIC copy) and Required. Uploads are PDF or photos (JPG, PNG, WebP), up to the size in Civic settings (10 MB by default).
Fees
On the Fee tab choose the Fee:
| Fee | Means |
|---|---|
| None | Free service |
| Fixed | One Amount, e.g. 3,000 |
| Formula | Worked out from the answers, with a Fallback amount if it cannot be |
A formula may use numbers, the keys of number fields, + - * / ( ), comparisons (<, <=, >, >=, ==, !=), min(…), max(…), round(x) or round(x, digits), ceil, floor, if(condition, a, b) and eq(selectKey, 'Text'). For example:
2000 + plotArea * 5 * storeys + if(eq(use, 'Commercial'), 15000, 0)
charges 2,000, plus 5 per sq ft per storey, plus 15,000 for commercial use. The formula is checked when you save; Calculate tries it with sample answers.
Also on this tab:
- Fee must be paid before processing starts — the application waits until the fee is paid.
- Renewal fee — charged instead of the normal fee when a certificate is renewed (empty: the normal fee).
- Revenue account — another income account for this service's fees (empty: 4795).
Stages and SLA
On the Stages & SLA tab set the Overall SLA (days) — the promise to the citizen — and press + Stage for each step, in order:
| Column | Fill |
|---|---|
| Key, Name | e.g. scrutiny — Scrutiny |
| Department | Who acts at this stage (empty: the service's department) |
| SLA days | How long this stage may take |
| Inspection | Tick when a site inspection with result Pass is needed before the application can move on |
Example — building plan approval: Scrutiny (Building Control, 5 days) → Site inspection (Building Control, 10 days, inspection) → Approval (Building Control, 5 days); overall 30 days.
After the last stage the application is Approved and the certificate can be issued. A service with no stages is decided in one step.
The certificate
On the Certificate tab:
| Field | Fill |
|---|---|
| Certificate title | e.g. Trade Licence — empty if the service issues nothing |
| Template | The text printed on it |
| Valid for (months) | Empty for no expiry; licences that expire can be renewed |
The template can use any field key in braces, plus {applicant}, {number} (certificate number), {application} (tracking number), {service}, {organisation}, {issuedOn} and {validUntil}. For example:
{businessName} ({trade}) at {address} is licensed to trade. Licence {number}, valid until {validUntil}.
The certificate is an A4 PDF with your organisation's name and a QR code to the check page.