Operating import templates
Every time you import a file, Assemblified needs to know which column of your file feeds which field: which one is the SKU, which one the quantity, how the numbers and dates in it are written. When you save that answer, you get an import template — the mapping the next file of that kind is read with. A connected assistant can discover the supported fields, list your templates, explain them, and with write access create, correct and delete them. Creating a template saves a mapping; it does not import your file or change stock.
On this page
Section titled “On this page”- What it takes
- What an import template is
- Discovering supported fields
- Creating a template from your file
- Reading your templates
- Correcting one
- Deleting one
- What it cannot do
What it takes
Section titled “What it takes”Listing and reading templates needs nothing beyond a connection. Creating, changing or deleting one needs write access: either an API key created with read & write scope or a web-chat connection granted read & write when it was linked. See API keys and Connect claude.ai or ChatGPT.
Import templates are not part of the Enhanced plan gate. Every store on every plan can read and change them.
What an import template is
Section titled “What an import template is”Three things, and the assistant sees all three:
- A name, which is how you pick it in the import dialog.
- An upload type — the import flow the template belongs to. A template saved for materials is only ever offered when you import materials.
- A mapping and format settings — one entry per field you mapped, each naming the actual column header in your file, plus how numbers and dates in that file are to be read: US style (1,234.56) or EU style (1.234,56), and which date order.
Alternative header spellings saved on a template are kept as metadata; the current importer does not use them as fallback columns. The supported fields have their own header aliases for automatic matching.
Only the fields you actually mapped are stored. A field that is missing from the template is a field you left unmapped, not a field with an empty column.
Discovering supported fields
Section titled “Discovering supported fields”Ask the assistant which fields an import supports before it prepares a mapping:
“Show me the supported fields for a material import, including the required columns and recognised header names.”
importTemplates.describe({}) returns four flows in order. Supply one exact uploadType to describe just that flow:
| Import | uploadType |
Fields |
|---|---|---|
| Materials | raw-materials |
14 |
| Bills of materials | bill-of-materials |
17 |
| Assembly BOMs | sub-assemblies |
15 |
| Assembly quantities | sub-assembly-quantities |
6 |
For example, importTemplates.describe({ uploadType: "raw-materials" }) returns the canonical field names, display labels, types, required flags, defaults and any supported header aliases or predefined values. IDs must match exactly: empty, whitespace, unknown and demo IDs are refused with INVALID_INPUT.
This describes fields, not whether your file is ready to import. Some flows require one of several identifiers or a choice between quantity and change in quantity. Grouping, the products, units and locations in your store, and the import review still determine whether rows can be accepted.
Creating a template from your file
Section titled “Creating a template from your file”With write access, the assistant can save a new mapping through importTemplates.create. Give it the actual file, or copy its exact headers, and confirm the intended flow, mapping and number/date formats:
“Use the headers in this file to prepare a material import template. Show me every mapped column and the number/date formats before saving it. Do not import any rows.”
The create call needs name, uploadType, mapping and formatSettings. Each mapping entry uses the supported field name and the actual sourceHeader in your file, with optional stored aliases. Format settings include numberFormat (us or eu) and dateFormat; custom dates also need a valid customDatePattern. The response contains the saved template, including its ID and mapping keyed by field name. The assistant should read that ID back with importTemplates.get and check the mapping and formats.
A saved template is configuration only. Saving it does not upload or parse a file, import rows, create materials or bills, or change inventory. Use the normal import dialog to preview and review the actual file.
Saving is deliberately permissive: an unregistered flow name, an old field name or an empty mapping can be stored without becoming usable in an import. Repeated entries for the same field keep the last one. The exact field key __proto__ is refused for a new template with INVALID_INPUT; constructor, toString and similar-looking keys are not covered by that refusal. This does not change how existing templates are updated.
Reading your templates
Section titled “Reading your templates”Ask for all of them, or just the ones for one import flow. Each answer carries the whole template, so the assistant can tell you what a template does without a second look:
“Which import templates do I have for materials, and which column does each one read the SKU from?”
“My supplier renamed a column in their export. Which of my templates still point at the old name?”
That second question is the one this surface is really for: you know the file changed, and finding which saved mappings are now wrong is tedious by hand.
Correcting one
Section titled “Correcting one”With write access, the assistant can rename a template, re-point its columns, or change how its files’ numbers and dates are read.
“In my Acme template, the SKU now comes from the column ‘Artikelnummer’ — fix it.”
Two things to know before you ask for a change.
- Each part you change is replaced whole. If the assistant changes the mapping, it sends the complete list of mapped fields, not just the one you mentioned. A well-behaved assistant reads the template first and sends it back with your one change applied — if you want to be sure, ask it to tell you the full mapping it is about to save.
- What you do not mention is left alone. Changing the name does not touch the mapping, and changing the mapping does not touch the format settings.
Deleting one
Section titled “Deleting one”The assistant can delete a template you no longer use. This is immediate and there is no undo: what is lost is the mapping itself, which you would have to rebuild by walking the import dialog again with a file in front of you. Nothing else in Assemblified refers to a template, so nothing else breaks.
Ask it to name the template it is about to delete, and confirm it is the right one.
What it cannot do
Section titled “What it cannot do”It cannot execute an import through these template methods. It can discover fields and save a mapping based on headers you supply. File upload, row validation and import review still happen in the app. A template being saved successfully does not mean its rows can be imported.
It cannot move a template to another import flow. The upload type is fixed when the template is saved. To use the same mapping for a different flow, create a new template with that flow’s field names and your file’s actual headers, or save one from its import dialog.