Databases & CRM
Set up ERPNext
Connect ERPNext to make customers, items, sales orders and sales invoices searchable — orders and invoices link to their customer with exact totals, so “what has this customer ordered” and “what is still outstanding on their invoices” answer from the ERP itself. Self-hosted and Frappe Cloud sites both work. Read-only.
The API key pair
In ERPNext open your avatar → My Settings, scroll to API Access and press Generate Keys. The API key stays visible on the page; the API secret is shown once, so copy it then. The pair reads as that user — a user with read-only roles on Selling and Accounts is the clean choice — and only reads are ever issued. Here the secret is write-only: it is never shown again after saving, so generate fresh keys in ERPNext if it is lost and paste the new pair.
- Generate the key pair as above.
- Documents → ERPNext: enter the Site URL — the address you open ERPNext on in the browser, including https:// — then paste the API key and the API secret.
- Choose access groups, Test, then Sync.
What comes in
- Customers — name, customer group and territory. Each customer's record rolls up the orders and invoices under it: how many, their summed totals, the outstanding amount still open on the invoices, and the latest order and invoice dates.
- Items — item name, item group, description (the first 500 characters) and stock unit of measure.
- Sales orders — order number, order date, status, grand total and currency, linked to their customer.
- Sales invoices — invoice number, posting date, status, grand total, outstanding amount and currency, linked to their customer.
- Each of the four doctypes is also a searchable entry of its own, listing its fields with sample values and its link to the customer. Other doctypes — purchasing, stock, quotations, attachments — are not read.
Access
Access is allow-only: the groups chosen on the source cover everything ERPNext brings in — ERPNext exposes no per-record viewers to mirror here, and the API user's own roles decide what the source can see at all.
Each doctype is capped at 2,000 records per sync, most recently created first; a hit cap is noted in the sync summary and records already synced stay searchable rather than being treated as deleted. A doctype the API user can't read is skipped with a notice, existing documents kept. Test runs a one-row probe of Customer and names the site it reached; a wrong key or secret, or a user without read permission on Customer, reports that ERPNext rejected the credentials. The sync speaks the standard Frappe REST API, so an unreachable address fails Test with the connection reason rather than a silent empty sync.
Last updated 20 Sep 2026