Worked example: "Northwind Robotics" (a CRM)
This mirrors the bundled CRM & Sales Pipeline template's shape (Company / Contact / Deal / Activity) but is written as literal build-it-yourself steps, so you actually practice schema design and linking rather than just clicking "use template." Using the template directly is a perfectly good shortcut once you've done this once — see the note at the end.
Scenario: you run sales for Northwind Robotics. You want to track the companies you sell to, the people you talk to at each one, the deals in flight, and the calls/emails/meetings behind each deal.
Step 1 — Collection
New collection → Blank → name it Northwind Sales.
Step 2 — Schema
Edit schema → create four types:
Company
| Field | Type | Notes |
|---|---|---|
| Industry | text | |
| Website | url |
Contact
| Field | Type | Notes |
|---|---|---|
| Title | text | |
| Phone | phone |
Deal
| Field | Type | Notes |
|---|---|---|
| Stage | select | Options: Prospecting, Qualified, Proposal, Negotiation, Closed Won, Closed Lost |
| Value | currency | USD |
| CloseDate | date |
Activity
| Field | Type | Notes |
|---|---|---|
| Type | select | Options: Call, Email, Meeting |
| Date | date | |
| Notes | richtext |
Then add four Relationship Types so the link picker has clean labels instead of freehand
text: WORKS_FOR (Contact → Company), FOR_COMPANY (Deal → Company),
WITH_CONTACT (Deal → Contact), FOR_DEAL (Activity → Deal).
Step 3 — Files and rows
Create four files, one per type: companies, contacts, deals, activities.
In companies, add two rows:
Initech— Industry: Manufacturing, Website:https://initech.example. Body: "Mid-sized manufacturer evaluating a platform upgrade."Globex Corp— Industry: Logistics, Website:https://globex.example. Body: "Existing customer up for renewal this quarter."
In contacts, add two rows:
Maria Lopez— Title: VP of Operations, Email:maria@initech.example, Phone:555-0201. Link WORKS_FOR → Initech. Body: "Economic buyer for the Initech deal."Tom Becker— Title: IT Director, Email:tom@globex.example, Phone:555-0202. Link WORKS_FOR → Globex Corp. Body: "Internal champion pushing for renewal."
In deals, add two rows:
Initech Platform Deal— Stage: Proposal, Value: 48000, CloseDate: 2026-08-30. Links: FOR_COMPANY → Initech, WITH_CONTACT → Maria Lopez. Body: "Proposal sent, awaiting procurement review."Globex Renewal— Stage: Negotiation, Value: 22000, CloseDate: 2026-07-15. Links: FOR_COMPANY → Globex Corp, WITH_CONTACT → Tom Becker. Body: "Negotiating multi-year discount."
In activities, add a couple of rows per deal, e.g.:
Discovery Call — Initech— Type: Call, Date: 2026-08-10, Notes: "Confirmed budget and timeline." Link FOR_DEAL → Initech Platform Deal.Renewal Check-in — Globex— Type: Meeting, Date: 2026-07-01, Notes: "Reviewed usage, discussed multi-year pricing." Link FOR_DEAL → Globex Renewal.
Step 4 — Look at what you built
- Select
Initech Platform Dealin the grid → the Surface panel shows it connected toInitech,Maria Lopez, andDiscovery Call — Initechin one view. - Try the Explore tab with a query like "every Deal with Stage = Negotiation" to see the pipeline-filtering use case, not just single-item lookups.
- Take a Tag now, called
initial-setup— you now have a restore point before you start editing live.
Step 5 — Share it
Open Explorer, find Northwind Sales, and grant a teammate Editor
access so they can log activities without being able to change your schema.
Appendix: raw KGL syntax
Everything above can also be edited as text, via the toolbar's Edit File
button — the same content the grid renders, in the underlying .kgl format:
# companies.kgl
@Company Initech
Industry: Manufacturing
Website: https://initech.example
---
Mid-sized manufacturer evaluating a platform upgrade.
# contacts.kgl
@Contact Maria Lopez
Title: VP of Operations
Email: maria@initech.example
Phone: 555-0201
[WORKS_FOR] → companies.kgl#Initech
---
Economic buyer for the Initech deal.
A link line is [REL_TYPE] → target_file.kgl#Target Node Name. Everything below
--- is the free-text body (Markdown). See the full
KGL format reference for the complete spec.