# How to write a Fossa CRM template JSON > The JSON format Fossa CRM imports: fossacrm_template, modules, fields, records, relation refs, dashboard cards, and the ERASE warning. - Canonical HTML: https://fossasoft.com/blog/how-to-write-fossa-crm-template-json/ - Markdown: https://fossasoft.com/llms/en/blog/how-to-write-fossa-crm-template-json.md - Language: en-GB Fossasoft, Ioannou Metaxa 34, Leptokarya 60063, Greece. Phone +30 2352 031 337. Email info@fossasoft.com. Monday–Friday 09:00–21:00. VAT EL164317738. GEMI 165469048000. Map: https://g.co/kgs/6Lt2hQB This is the format note for Fossa CRM templates. The day-to-day panel is in how to use Fossa CRM . Here we only care about the JSON file Settings → Templates will import. The importer looks for fossacrm_template: 1 and a modules array. Anything else is rejected as “not a valid Fossa CRM template.” Import still wipes modules, fields, records, dashboard cards, and history. Users, files, and API keys stay. Type ERASE in the panel before you apply a file you wrote. A template is a snapshot of structure, optional sample rows, and optional dashboard cards. It is not a backup of users. It is not a dump of the file manager, unless you add an assets list the importer is allowed to download. Packed ready templates, such as Electronics repair & IT services, are the same format. The least painful path: build the modules in the panel, add a few rows, then Export current JSON . Edit that file. The export already uses the keys the importer expects: field type values, relation slugs, record _id refs, and @module.ref on links. Write from scratch only if you do not have a group yet, or you want a clean file for another group. Keep a copy of the last export before you type ERASE. The easy way to create your own template: open the markdown spec, paste it into an AI, add a few sentences about how the business works, and ask for valid Fossa CRM JSON only. Import that file in Settings → Templates. The spec is Fossa CRM template JSON — AI spec (raw markdown, made to paste). You still type ERASE before import. The model can get field types wrong; check fossacrm_template is the number 1, and that relation values use @module._id . This article stays the human format note if you prefer to write the file yourself. Each module needs a name (or name_el if the group import language is Greek). slug is the URL piece, such as customers . If the slug is empty or already taken during import, Fossa CRM makes a new one from the name. On each field: label / label_el , type , required , show_on_form , show_on_table . Optional: placeholder, help, default, min, max, maxlength. A select needs options : value, label, optional label_el, optional color. A relation field needs relation set to the other module’s slug, not its display name. The panel shows friendly names. The file uses these English keys. An unknown type becomes text . Each record is an object. _id is a short ref you choose, such as acme . The other keys match field keys. A relation value is @customers.acme : at-sign, the target module slug, a dot, the target row’s _id . That is how a job points at a customer without using database UUIDs in the file. File fields can be a path already in the group, or @assets.photo1 if you listed that id under assets . You can skip sample records entirely. Each widget needs a module slug that exists in this file. page is home , files , history , settings , settings_modules , or a module slug (or m:jobs ). Max twelve cards on one page. Extra cards are skipped. kad is metadata for the template list (Greek activity codes). The importer does not need it to build modules. assets is a list of sample files to download over https during import, then map with @assets.id . You can omit both. If you are not sure, omit assets. This is enough to import: one customers module, one jobs module, a link from job to customer, one sample of each, and a count card on Home. Save it as UTF-8, with a .json extension. Settings → Templates → Import JSON. Tick the warning, type ERASE , choose Greek or English labels if the file has both. The panel then deletes current modules, fields, records, cards, and history, and loads this file. That cannot be undone from the panel. Export first if the live group matters. You can also POST the same JSON to the templates import API with a key. The wipe is the same. Read the panel how-to for keys. This page is only the file shape. If decode fails, paste the file into a JSON validator, then check fossacrm_template is a number. If import runs and tables are empty, you omitted records, which is valid. If links are blank, the @ref does not match a row _id in the target module. Office hours are Monday–Friday, 09:00–21:00, at Ioannou Metaxa 34, Leptokarya 60063. Email info@fossasoft.com or call +30 2352 031 337 . Product: Fossa CRM . Panel guide: how to use Fossa CRM . { "fossacrm_template": 1, "id": "workshop", "name": "Workshop", "name_el": "Συνεργείο", "description": "Customers and jobs.", "description_el": "Πελάτες και εργασίες.", "modules": [ { "slug": "customers", "name": "Customers", "name_el": "Πελάτες", "show_created": true, "show_updated": true, "fields": [ { "key": "name", "label": "Name", "label_el": "Όνομα", "type": "text", "required": true, "show_on_form": true, "show_on_table": true } ], "records": [ { "_id": "acme", "name": "Acme" } ] }, { "slug": "jobs", "name": "Jobs", "name_el": "Εργασίες", "fields": [ { "key": "title", "label": "Title", "label_el": "Τίτλος", "type": "text", "required": true, "show_on_form": true, "show_on_table": true }, { "key": "customer", "label": "Customer", "label_el": "Πελάτης", "type": "relation", "relation": "customers", "show_on_form": true, "show_on_table": true } ], "records": [ { "_id": "job1", "title": "Repair", "customer": "@customers.acme" } ] } ], "widgets": [ { "page": "home", "kind": "card", "title": "Jobs", "title_el": "Εργασίες", "module": "jobs", "metric": "count" } ] } ## FAQ **Can we write the JSON in a spreadsheet and convert it?** You can draft rows in a sheet, then build the JSON. The importer only accepts this JSON shape, not a CSV. Export from the panel is still the safer start. **Does a hand-written file wipe the group the same way as a packed template?** Yes. Any valid import types ERASE and replaces modules, records, cards, and history. Users, files, and API keys stay. **Do we have to include sample records?** No. Leave records out, or use an empty array. You still get the modules and fields. **Can one file hold both Greek and English labels?** Yes. Use name and name_el, label and label_el, title and title_el. At import you pick which labels to apply. **Can an AI write the template for us?** Yes. Paste the markdown spec into an AI with a short description of the business. Ask it to return only valid Fossa CRM JSON, then import that file. ERASE still applies. ## Contact - https://fossasoft.com/contact/ - info@fossasoft.com - +30 2352 031 337 - https://fossasoft.com/company/