Records
Find, bulk-add, update and archive customers, leads, orders and other records with era.
Your business records (customers, leads, orders, bookings, products…) are handled with four commands: records find, records create, records update and records archive. The record type is the first word after the command.
era records find customer --q "Ayşe"Record types
| Type | What | Find | Add | Change | Archive |
|---|---|---|---|---|---|
lead | Lead | ✓ | ✓ | ✓ | ✓ |
customer | Customer | ✓ | ✓ | ✓ | ✓ |
order | Order (adding opens a draft order) | ✓ | ✓ | ✓ | cancel |
booking | Booking | ✓ | ✓ | ✓ | cancel |
product | Product | ✓ | ✓ | ✓ | ✓ |
conversation | Inbox conversation | ✓ | ✓ | tags | — |
invoice · quote | Invoice · quote (add with document create) | ✓ | — | ✓ | ✓ |
shipment | Shipment | ✓ | ✓ | — | cancel |
table_row | A table's row (--table "Table name") | ✓ | ✓ | ✓ | ✓ |
expense | Expense | ✓ | ✓ | ✓ | ✓ |
task | Task | ✓ | ✓ | ✓ | ✓ |
channel_order, integration, approval, agent, table | Marketplace orders, connected apps, waiting approvals, agents, tables | ✓ | — | — | — |
module_row | Any module's table (with --module and --table) | ✓ | — | — | — |
A type works only when its module is on and your role allows it. For the exact list of types and fields you have right now, run era tools. A type from a module that is off doesn't appear.
Finding
# Search by name, phone, e-mail or number
era records find lead --q "0532" --limit 20
# Count
era records find customer --mode count
# Get one record
era records find order --mode get --id "<order-id>"
# A table's rows
era records find table_row --table "Stock" --limit 100To filter by a column, --where takes a JSON object (column → value). There is no row cap: if the result has a next value, repeat the command with --next <value> until next comes back empty. If you want the whole list as one file, export it instead of paging.
Adding
Adding always takes a list, even for one record:
era records create customer --items '[{"name":"Ayşe Demir","email":"[email protected]"}]'For many records, a JSON file is the safest route:
era records create lead --json @leads.jsonleads.json can be an array; an array becomes items automatically:
[
{ "name": "Ayşe Demir", "email": "[email protected]", "message": "Asked for the price list" },
{ "name": "Mehmet Kaya", "phone": "+905320000000" }
]If the same name, phone or e-mail already exists, the record is skipped. Add --dedupe update to change the existing one instead. The result says exactly how many were added, how many skipped and which failed and why. There is no batch-size limit.
Changing
era records update lead --json @changes.json[
{ "id": "<record-id>", "set": { "name": "New name" } },
{ "id": "<record-id>", "stage": "Won", "addTags": ["vip"] }
]stage moves a lead to a stage by its name; tags are given by name too and are created when missing.
Archiving
era records archive customer --ids '["<id-1>","<id-2>"]'Archiving and deleting are risky: the command waits for your approval card in Era and returns the result once you decide. --reason is required for invoices and expenses. Don't run the same command again while the card is waiting; if you declined, that request is closed (exit code 4).
Need something not listed here?
For a module's own action use era run <action-name> --json @input.json. The exact action name and fields are in the era-actions skill in the agent's work folder. If the input is wrong, Era returns the error, a fix and the expected schema.
Non-English letters on Windows
Windows PowerShell can turn letters like ş, ğ or ü into question marks in text piped (|) into a command. Always write names and notes to a UTF-8 file and pass it with --json @file.json. Check the stored names after the write.
More: The era command · Files · Full command list · Sales module