priority-erp

n8n node for Priority ERP integration

Package Information

Downloads: 221 weekly / 2,909 monthly
Latest Version: 3.2.1
Author: LeonAI

Documentation

n8n-nodes-priority-erp

This is an n8n community node that allows you to interact with Priority ERP through its REST API. It supports CRUD operations (Create, Read, Update, Delete) for various entities in Priority ERP.

Features

  • Create entities in Priority ERP
  • Get single entity by ID
  • Get Many entities with filtering, sorting, and field selection
  • Update existing entities
  • Delete entities
  • Support for standard entities (Customers, Items, Orders, Invoices, Suppliers)
  • Support for custom entities
  • OData query support for filtering and expanding related data
  • Two connection modes:
    • LeonAI Router (recommended): Connect through secure router server
    • Direct Connection: Connect directly to Priority ERP server

Installation

In n8n

  1. Go to Settings > Community Nodes
  2. Click Install
  3. Enter n8n-nodes-priority-erp
  4. Click Install

Manual installation

npm install n8n-nodes-priority-erp

Project Structure

n8n-nodes-priority-erp/
├── credentials/
│   └── PriorityErpApi.credentials.ts
├── nodes/
│   └── PriorityERP/
│       └── PriorityERP.node.ts
├── package.json
├── tsconfig.json
└── README.md

Credentials

The node supports two connection methods:

LeonAI Router Connection (Recommended)

Connect through the LeonAI router server for enhanced security and multi-tenant support:

  1. Token: Your LeonAI token (get one at https://forms.leonai.io/make)
  2. API URL: Your Priority instance URL (e.g., https://www.eshbelsaas.co.il/pr20/odata/Priority)
  3. Company Name: Database name from Companies Form
  4. Tabula INI: Your tabula.ini file (e.g., tabz0qy4.ini)
  5. API Username: Priority username with API license
  6. API Password: Password for the API user
  7. Permission Key (optional): Additional permission key if required

Direct Connection

Connect directly to your Priority ERP server:

  1. Base URL: The URL of your Priority ERP server
  2. Application Name: The application name registered in Priority
  3. Application Key: The API key for your application
  4. Username: Your Priority ERP username
  5. Password: Your Priority ERP password

Why Use LeonAI Router?

  • Security: No need to expose your Priority server directly to the internet
  • Multi-tenant: Easy management of multiple Priority instances
  • Monitoring: Built-in request logging and monitoring
  • Caching: Improved performance with intelligent caching
  • Support: Professional support from LeonAI team

Usage Examples

Get a Customer

  1. Select Resource: Entity
  2. Select Operation: Get
  3. Select Entity Type: Customers
  4. Enter Entity ID: The customer ID

Create an Order

  1. Select Resource: Entity
  2. Select Operation: Create
  3. Select Entity Type: Orders
  4. Add fields:
    • CUSTNAME: Customer name
    • CURDATE: Order date
    • etc.

Get All Items with Filtering

  1. Select Resource: Entity
  2. Select Operation: Get Many
  3. Select Entity Type: Items
  4. In Additional Options:
    • Filter: PARTNAME contains 'ABC'
    • Select: PARTNAME,PARTDES,PRICE
    • Order By: PARTNAME desc
    • Limit: 100

Update Customer Details

  1. Select Resource: Entity
  2. Select Operation: Update
  3. Select Entity Type: Customers
  4. Enter Entity ID: The customer ID
  5. Add fields to update:
    • CUSTDES: New description
    • PHONE: New phone number

Advanced Features

OData Query Support

The node supports OData query parameters:

  • $select: Choose specific fields to return
  • $filter: Filter results (e.g., CUSTNAME eq 'ABC' and STATDES eq 'Active')
  • $orderby: Sort results (e.g., CUSTNAME desc)
  • $expand: Include related entities (e.g., ORDERS_SUBFORM)
  • $top: Limit number of results

Custom Entities

To work with custom entities:

  1. Select Entity Type: Custom Entity
  2. Enter Custom Entity Name: Your entity name (e.g., SUPPLIERS)

Development

Building the node

# Install dependencies
npm install

# Build the node
npm run build

# Watch for changes during development
npm run dev

Testing locally

  1. Build the node: npm run build
  2. Link the package: npm link
  3. In your n8n installation folder: npm link n8n-nodes-priority-erp
  4. Restart n8n

API Reference

This node uses the Priority ERP REST API. For more details about the API endpoints and available fields, refer to your Priority ERP API documentation.

Error Handling

The node includes error handling for:

  • Authentication failures
  • Invalid entity IDs
  • Network errors
  • Invalid field names

Enable "Continue On Fail" in the node settings to handle errors gracefully in your workflows.

Support

For issues, feature requests, or questions:

  • Create an issue on GitHub
  • Contact your Priority ERP administrator for API-specific questions

License

MIT

Discussion