get_document
Get Document
Retrieve a single ERPNext document by its DocType and name. Works with any DocType such as Customer, Sales Order, Invoice, Employee, Item, etc. Optionally select specific fields to return.
get_document
Retrieve a single ERPNext document by its DocType and name. Works with any DocType such as Customer, Sales Order, Invoice, Employee, Item, etc. Optionally select specific fields to return.
cancel_document
Cancel a submitted ERPNext document. This reverses the submission and marks the document as cancelled. Commonly used with Sales Invoices, Purchase Invoices, Journal Entries, and other submitted transactional documents.
count_documents
Count the number of ERPNext documents matching a given DocType and optional filters. Useful for dashboards, summaries, and checking record counts without fetching full documents.
amend_document
Amend a cancelled or submitted ERPNext document by creating a revised copy linked to the original. The new document is created in draft status with an "amended_from" reference. Optionally override specific fields in the amended copy.
get_report
Run an ERPNext report and retrieve its data. Supports both standard and custom reports. Useful for extracting financial summaries, stock balances, sales analytics, and other reporting data.
update_document
Update an existing ERPNext document. Supports partial updates — only send the fields you want to change. Works with any DocType such as Customer, Sales Order, Invoice, Item, Employee, etc.
list_documents
List and search ERPNext documents of any DocType with filtering, field selection, sorting, and pagination. Supports AND/OR filters using ERPNext filter syntax.
delete_document
Permanently delete an ERPNext document by its DocType and name. This action is irreversible. Works with any DocType.
submit_document
Submit a draft ERPNext document to finalize it. Submission is a workflow step that locks the document from further edits. Commonly used with Sales Invoices, Purchase Invoices, Journal Entries, Stock Entries, and other transactional DocTypes.
call_method
Call a whitelisted server-side method on the ERPNext/Frappe backend via the RPC API. This enables access to custom business logic, report generation, and specialized operations beyond standard CRUD.
create_document
Create a new ERPNext document of any DocType. Use this to create Customers, Sales Orders, Invoices, Items, Employees, and any other business entity. Provide the DocType and the document fields as key-value pairs.
Manage enterprise business processes across ERPNext's integrated ERP platform. Create, read, update, and delete any business document (DocType) including Sales Invoices, Purchase Orders, Customers, Employees, and Items. Manage accounting and finance with Sales Invoices, Purchase Invoices, Payment Entries, Journal Entries, and chart of accounts. Track inventory and stock levels with Stock Entries, Warehouses, Material Requests, and Delivery Notes. Handle the full sales and CRM pipeline including Leads, Opportunities, Quotations, Sales Orders, and customer interactions. Manage purchasing with Suppliers, Purchase Orders, and Requests for Quotation. Administer human resources including Employees, Attendance, Leave Applications, Payroll, and Expense Claims. Support manufacturing with Bills of Materials, Work Orders, and Production Plans. Create and track Projects, Tasks, and Timesheets. Upload files, call custom server-side methods, extract reporting data, and receive webhooks on document lifecycle events such as creation, update, submission, cancellation, and deletion.
Common questions about connecting Erpnext to AI agents with Metorial.