The ERPNext connector lets your AI agent act in each user's ERPNext account. Each user connects their own ERPNext API key and secret once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 17 tools.
- Tools
- 17
- What they doRead · write · destructive
- 8 · 7 · 28 read7 write2 destructive
- Users sign in with
- API key
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the ERPNext connection
In AgentKit > Connections, create an ERPNext connection. The name you give it is the
connection_nameyour code passes. See Configure connections.
Tools
Pass the exact name toexecute_toolerpnext_doctype_meta_getGet a DocType's metadata: its fields, field types, options, mandatory flags and child tables.Read-onlyGet DocType Fields
Get a DocType's metadata: its fields, field types, options, mandatory flags and child tables. Returns docs with the DocType definition and its child DocTypes. Use this before creating or filtering documents of an unfamiliar DocType.
Inputs
doctypestringrequired- DocType name, exactly as shown in ERPNext, for example Customer, Sales Invoice, Item or Lead. Spaces are allowed. Example: Customer
erpnext_document_getGet one full document, including its child tables.Read-onlyGet Document
Get one full document, including its child tables. Returns data with every field of the document. Get the name from erpnext_documents_list or erpnext_link_search.
Inputs
doctypestringrequired- DocType name, exactly as shown in ERPNext, for example Customer, Sales Invoice, Item or Lead. Spaces are allowed. Example: Customer
namestringrequired- The document's name (its ID), for example CUST-00001 or ACC-SINV-2026-00001. Example: CUST-00001
expand_linksboolean- Expand all link fields when true. Example: false
erpnext_document_value_getGet one or more field values from the first document that matches a name or filters.Read-onlyGet Field Values
Get one or more field values from the first document that matches a name or filters. Returns message with the requested fields. Use this for a quick lookup without fetching the whole document.
Inputs
doctypestringrequired- DocType name, exactly as shown in ERPNext, for example Customer, Sales Invoice, Item or Lead. Spaces are allowed. Example: Customer
fieldnamestringrequired- Field to read, or a JSON array of fields. Example: ["customer_name", "territory"].
as_dictboolean- As Dict. Example: true
filtersstring- The document name, or a JSON object or array of filters to find the document. Example: {"customer_name": "Acme Inc"}.
erpnext_documents_countCount the documents of a DocType that match filters.Read-onlyCount Documents
Count the documents of a DocType that match filters. Returns message with the count. Use this instead of listing when you only need a number.
Inputs
doctypestringrequired- DocType name, exactly as shown in ERPNext, for example Customer, Sales Invoice, Item or Lead. Spaces are allowed. Example: Customer
filtersstring- JSON filters. Example: [["customer_group", "=", "Commercial"]]
erpnext_documents_listList documents of any DocType (Customer, Sales Invoice, Item, Lead and so on) with chosen fields, AND/OR filters, sorting and paging.Read-onlyList Documents
List documents of any DocType (Customer, Sales Invoice, Item, Lead and so on) with chosen fields, AND/OR filters, sorting and paging. Returns data, a list of documents with the requested fields (only name by default). Pass DocType as doctype; use doctype DocType to list DocTypes. Use erpnext_document_get for one full document. Use erpnext_doctype_meta_get to see a DocType's fields.
Inputs
doctypestringrequired- DocType name, exactly as shown in ERPNext, for example Customer, Sales Invoice, Item or Lead. Spaces are allowed. Example: Customer
expandstring- JSON array of link fields to expand into full objects. Example: ["customer"].
fieldsstring- JSON array of field names to return. Default is only name. Example: ["name", "customer_name"].
filtersstring- JSON array of [field, operator, value] conditions joined with AND. Example: [["customer_group", "=", "Commercial"]].
limit_page_lengthinteger- Number of records to return (default 20; 0 returns all). Example: 20
limit_startinteger- Offset for paging (number of records to skip). Example: 0
or_filtersstring- JSON array of [field, operator, value] conditions joined with OR. Example: [["territory", "=", "India"], ["territory", "=", "United States"]]
order_bystring- Sort clause: a field name followed by asc or desc. Example: modified desc.
erpnext_link_searchSearch a DocType by text the way ERPNext's link fields do, returning matching names and descriptions.Read-onlySearch Link Values
Search a DocType by text the way ERPNext's link fields do, returning matching names and descriptions. Returns message with value and description pairs. Use this to find a document name (for example a customer or item) from partial text.
Inputs
doctypestringrequired- DocType name, exactly as shown in ERPNext, for example Customer, Sales Invoice, Item or Lead. Spaces are allowed. Example: Customer
txtstringrequired- Text to search for in the name and search fields. Example: acme.
filtersstring- Optional JSON filters to narrow the search. Example: [["customer_group", "=", "Commercial"]]
page_lengthinteger- Maximum number of matches (default 10). Example: 10
erpnext_report_runRun a query or script report (for example General Ledger, Accounts Receivable or Stock Balance) with report filters.Read-onlyRun Report
Run a query or script report (for example General Ledger, Accounts Receivable or Stock Balance) with report filters. Returns message with columns and result rows. Report filters are a JSON object; required filters differ per report (often company, from_date and to_date).
Inputs
report_namestringrequired- Report name as shown in ERPNext. Example: General Ledger.
filtersstring- JSON object of report filters. Example: {"company": "Acme Inc", "from_date": "2026-01-01", "to_date": "2026-01-31"}.
erpnext_user_me_getGet the user the API key belongs to.Read-onlyGet Current User
Get the user the API key belongs to. Returns message with the user ID (email). Use this to confirm the connection; permissions follow this user's roles.
Inputs
This tool takes no inputs.
erpnext_comment_addAdd a comment to a document's timeline.WriteAdd Comment
Add a comment to a document's timeline. Returns message with the new Comment. Use this to log a note on a customer, invoice or other document.
Inputs
comment_bystringrequired- Display name of the commenter. Example: Jane Doe
comment_emailstringrequired- Email of the commenter, usually the API user. Example: jane@example.com
contentstringrequired- Comment text (HTML allowed). Example: Called the customer about the overdue invoice.
reference_doctypestringrequired- Reference Doctype. Example: Customer
reference_namestringrequired- Reference Name. Example: CUST-00001
erpnext_document_createCreate a document of any DocType from a JSON object of field values (saved as a draft for submittable DocTypes).WriteCreate Document
Create a document of any DocType from a JSON object of field values (saved as a draft for submittable DocTypes). Returns data with the saved document, including its new name. Use erpnext_document_submit to submit it. Use erpnext_doctype_meta_get to see a DocType's fields.
Inputs
dataobjectrequired- Document fields to set, keyed by field name. Child tables are arrays of row objects. Example: {"customer_name": "Acme Inc", "customer_group": "Commercial", "territory": "All Territories"}
doctypestringrequired- DocType name, exactly as shown in ERPNext, for example Customer, Sales Invoice, Item or Lead. Spaces are allowed. Example: Customer
erpnext_document_renameRename a document (change its name/ID), optionally merging into an existing one.WriteRename Document
Rename a document (change its name/ID), optionally merging into an existing one. Returns message with the new name. Only DocTypes that allow renaming support this.
Inputs
doctypestringrequired- DocType name, exactly as shown in ERPNext, for example Customer, Sales Invoice, Item or Lead. Spaces are allowed. Example: Customer
new_namestringrequired- New Name. Example: CUST-ACME
old_namestringrequired- Old Name. Example: CUST-00001
mergeboolean- Merge. Example: false
erpnext_document_submitSubmit a draft document of a submittable DocType (for example Sales Invoice or Sales Order), making it final.WriteSubmit Document
Submit a draft document of a submittable DocType (for example Sales Invoice or Sales Order), making it final. Returns message with the submitted document. Pass the full document from erpnext_document_get. Use erpnext_document_cancel to reverse it.
Inputs
docobjectrequired- The full document to submit, as returned by erpnext_document_get (it must include doctype and name). Example: {"doctype": "Sales Invoice", "name": "ACC-SINV-2026-00001"}.
erpnext_document_updateUpdate fields of an existing document.WriteUpdate Document
Update fields of an existing document. Only the fields sent change; a child table sent replaces the whole table. Returns data with the updated document. Submitted documents can only change fields allowed on submit. Use erpnext_doctype_meta_get to see a DocType's fields.
- Idempotent
Inputs
dataobjectrequired- Document fields to change, keyed by field name. Child tables are arrays of row objects. Example: {"customer_name": "Acme Inc", "customer_group": "Commercial", "territory": "All Territories"}
doctypestringrequired- DocType name, exactly as shown in ERPNext, for example Customer, Sales Invoice, Item or Lead. Spaces are allowed. Example: Customer
namestringrequired- The document's name (its ID), for example CUST-00001 or ACC-SINV-2026-00001. Example: CUST-00001
erpnext_document_value_setSet one field (or several, by passing a JSON object as fieldname) on a document and save it.WriteSet Field Value
Set one field (or several, by passing a JSON object as fieldname) on a document and save it. Returns message with the updated document. Use erpnext_document_update to change many fields at once.
- Idempotent
Inputs
doctypestringrequired- DocType name, exactly as shown in ERPNext, for example Customer, Sales Invoice, Item or Lead. Spaces are allowed. Example: Customer
fieldnamestringrequired- Field name to set, or an object of field names and values to set several. Example: territory.
namestringrequired- Name. Example: CUST-00001
valuestring- New value for the field (omit when fieldname is an object). Example: Retail.
erpnext_method_callCall a whitelisted server method with POST and a JSON body of arguments.WriteCall Method
Call a whitelisted server method with POST and a JSON body of arguments. Changes are committed. Returns message with the method's result. Use this for ERPNext or app methods that have no dedicated tool, for example erpnext.stock.utils.get_stock_balance. The method must be whitelisted on the site; methods restricted to GET are not supported.
Inputs
methodstringrequired- Dotted path of a whitelisted method. Example: erpnext.stock.utils.get_stock_balance
argsobject- Method arguments as a JSON object, sent as the request body. Example: {"doctype": "ToDo", "name": "abc123"}
erpnext_document_cancelCancel a submitted document.DestructiveCancel Document
Cancel a submitted document. Linked documents may need cancelling first. Returns message. Use this to reverse a submitted document; amend it in ERPNext afterwards if needed.
Inputs
doctypestringrequired- DocType name, exactly as shown in ERPNext, for example Customer, Sales Invoice, Item or Lead. Spaces are allowed. Example: Sales Invoice
namestringrequired- Name. Example: ACC-SINV-2026-00001
erpnext_document_deleteDelete a draft or cancelled document.DestructiveDelete Document
Delete a draft or cancelled document. Returns message ok. Submitted documents must be cancelled first with erpnext_document_cancel.
- Idempotent
Inputs
doctypestringrequired- DocType name, exactly as shown in ERPNext, for example Customer, Sales Invoice, Item or Lead. Spaces are allowed. Example: Customer
namestringrequired- The document's name (its ID), for example CUST-00001 or ACC-SINV-2026-00001. Example: CUST-00001
No tools match.