This project provides a Linx-based integration to pull product, inventory, and related metadata from the Erply platform using both the PIM, Inventory and Pricing APIs. The data is stored in a local SQLite database (SessionData.db
by default) and can be extended to integrate with other platforms such as Shopify.
-
Linx/
Contains the Linx solution and all logic for interacting with the Erply APIs. -
Database/
Contains the database file and SQL scripts:SessionData.db
– Preconfigured SQLite database for immediate use.MSSQL Create Table.sql
– SQL script to create required tables for MSSQL.SQLite Create Table.sql
– SQL script to create required tables for SQLite.
Before running the solution, configure the following settings in Linx:
Setting | Description |
---|---|
DatabaseConnectionString |
Connection string to your SQLite or MSSQL database |
ErplyAccountNumber |
Your Erply account number |
ErplyUserName |
Your Erply username |
ErplyPassword |
Your Erply password |
ErplyInventoryBaseURL |
Base URL for Classic API inventory endpoints (retrieved via getServiceEndpoints ) |
ErplyPIMBaseURL |
Base URL for PIM API endpoints (retrieved via getServiceEndpoints ) |
ErplyPricingBaseURL |
Base URL for Classic API pricing endpoints (retrieved via getServiceEndpoints ) |
The above URLs are region-dependent. Use the getServiceEndpoints
function to dynamically retrieve the correct endpoints after supplying your ErplyAccountNumber
.
Checks for an existing, valid session key in the database. If none is found or the key has expired, it requests a new session key from the Erply Classic API.
This is the primary orchestrator function. It performs all necessary calls to retrieve and enrich product data from both the PIM and Classic APIs. It includes data on stock levels, suppliers, brands, product groups, tax rates, and more.
These functions support GetErplyProductData
by retrieving details for specific fields:
Function | Description |
---|---|
GetBrands |
Retrieves brand details by brand ID |
GetProductCategory |
Retrieves category details by category ID |
GetProductGroupName |
Retrieves product group details by ID |
GetProducts(skip, take) |
Retrieves product data in batches using pagination parameters |
GetStockLevelForProduct |
Retrieves total stock for a given product across all warehouses |
GetSupplier |
Retrieves supplier details by ID |
GetTaxRate |
Retrieves tax rate details by ID |
getServiceEndpoints |
Utility function to retrieve API base URLs for the account’s region |
- Pagination is implemented manually using
skip
andtake
parameters in theGetProducts
function. - Data returned by
GetErplyProductData
is enriched and can be passed directly into other processes or integrations. - The SQLite database (
SessionData.db
) can be used out of the box, or you can recreate the schema using the included SQL scripts.