Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to ERPNext

Scalekit connector
Open markdown

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

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. 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>
  3. Create the ERPNext connection

    In AgentKit > Connections, create an ERPNext connection. The name you give it is the connection_name your code passes. See Configure connections.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • erpnext_doctype_meta_getGet a DocType's metadata: its fields, field types, options, mandatory flags and child tables.Read-only

    Get 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-only

    Get 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-only

    Get 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-only

    Count 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-only

    List 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_report_runRun a query or script report (for example General Ledger, Accounts Receivable or Stock Balance) with report filters.Read-only

    Run 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-only

    Get 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.