erpnext Adaptor developer README.md
Source: https://github.com/OpenFn/adaptors/tree/main/packages/erpnext
language-erpnext 
An OpenFn adaptor for building integration jobs for use with the ERPNext API.
Documentation
View the docs site for full technical documentation.
Configuration
View the
configuration-schema
for required and optional configuration properties.
Authentication
This adaptor uses API Key and Secret authentication. To generate your credentials:
- Log in to your ERPNext instance
- Go to your user profile (top right corner)
- Click on "API Access"
- Generate a new API Key/Secret pair
- Use these credentials in your OpenFn configuration:
{
"baseUrl": "https://mycompany.erpnext.com",
"apiKey": "your_api_key",
"apiSecret": "your_api_secret"
}
Example Usage
// Create a new customer
create('Customer', {
customer_name: 'Acme Corporation',
customer_type: 'Company'
});
// Get a list of sales orders
getList('Sales Order', {
filters: { status: 'Draft' },
fields: ['name', 'customer', 'grand_total'],
limit: 50
});
// Update a customer record
update('Customer', 'CUST-00001', {
mobile_no: '+1234567890'
});
// Read a document by ID
read('Item', 'ITEM-001', ['item_name', 'standard_rate']);
Development
Clone the adaptors monorepo. Follow the "Getting Started" guide inside to get set up.
Run tests using pnpm run test or pnpm run test:watch
Build the project using pnpm build.
To build only the docs run pnpm build docs.