Custom fields and templates
Add your own fields such as PO number or cost code to documents and lines, group them in a template per document kind, and print them on the PDF.
Custom fields hold information Alya Books does not have a standard field for: a purchase order number, a project phase, a cost code per line. A template decides which fields appear on which document kind.
Define fields
- Go to Settings → Documents → Custom fields (owners and admins).
- Click Field and fill in:
- Label and Label (Arabic). The Key is derived from the label (lowercase letters, digits, underscores) and is what integrations send as
metadata.<key>. It cannot be changed after saving. - Type: Text, Number, Date, Yes / no, or Choice list. For a choice list, enter the options one per line, optionally as
value | Label. - Applies to: Whole document or Each line.
- Order, Required and Print on PDF.
- Label and Label (Arabic). The Key is derived from the label (lowercase letters, digits, underscores) and is what integrations send as
- Click Save.
Build a template
- Click Template, enter a Name and choose the Document kind.
- Tick the fields it should contain and leave Active on.
- Click Save. Only one template per document kind can be active; activating another one deactivates the previous.
Where the fields appear
- In the invoice and quote editor: a Custom fields section in the right panel for document fields, and a tag icon on each line for line fields.
- On incoming invoices: a Custom fields card when a template for incoming invoices is active.
- On the PDF: fields marked Print on PDF are printed (document-level fields only): on invoices, credit and debit notes and proformas with the invoice details, or in the Shipment panel of a Logistics design; on quotes and letters under "Additional information".
- In the API and webhooks as
metadata.
Good to know
- Required fields block saving until filled, in the app and through the API.
- Values can still be edited on issued (locked) invoices, because they do not change the tax content.
- Deleting a field removes it from templates; stored values on old documents are kept.
- Categories and cost centres are separate lists at the bottom of the same tab, meant for reporting rather than free-form data.