Skip to content
Naditu
Get started

Connecting CPM ERP, Link Gunes Sistemi, and Bilnex to AI

Connecting Turkish mid-market suites CPM ERP, Link Gunes Sistemi (Yeni Nesil), Orka SQL, and Bilnex V3 to AI assistants without SQL locking or tax errors.

Naditu2 min read

Across automotive tier-two suppliers, metal stamping plants, regional wholesalers, and retail chains in Turkiye, operational data frequently lives inside established SQL Server suites that ship zero public Model Context Protocol packages. Scoping a CPM ERP, Link Gunes Sistemi, and Bilnex AI integration requires navigating Delphi trigger chains, 32-bit COM bridges, and external CPA statutory ledgers without freezing shop-floor terminals or breaking Uniform Chart of Accounts (TDHP) balances.

Complementing our guides on WorkCube, AKINSOFT Wolvox, and Parasut and Luca, Zirve, ETA, and Vega accounting data, these systems rely on distinct Microsoft SQL Server and application-tier boundaries:

  • CPM ERP and CPMSmart (Delphi + T-SQL triggers + CpmService): stores counterparty ledgers (CARIKART, CARIHAREKET, CARIRISK), inventory (STOKKART, STOKHAREKET), unified commercial headers and lines (EVRAK_BASLIK, EVRAK_HAREKET), and multi-stage manufacturing (URUNAGACI, ROTA, ISEMRI, subcontracting, actual costing, and inflation accounting), coupled with heavy partner Z_* tables, PascalScript hooks, and REST/JSON CpmService endpoints.
  • Link Bilgisayar (Gunes Sistemi Li-Nova and Link Yeni Nesil): organizes AR/AP and inventory movements into normalized CARI / CARI_HAR, STOK / STOK_HAR, and MUH_FIS pairs split by company and fiscal period, exposing partner Web Services, 32-bit STA COM/DLL libraries, and native GİB UBL-TR 1.2 e-document pipelines.
  • Bilnex V3 SQL and Orka SQL (trigger balances and OAS3 CPA ledgers): Bilnex maintains live stock and account balances inside synchronous SQL AFTER triggers (Tr_*) alongside an async Windows e-Document queue, while Orka SQL isolates statutory books into strict annual databases (ORKA_0001_2026) fronted by a documented OpenAPI 3 REST gateway.
An operational ontology aligns surrogate commercial keys and custom Z-tables with balanced TDHP 100-799 statutory ledger rules.

Four integration mistakes that stall desktop clients and corrupt ledgers

  1. Blocking Delphi and POS stations or reading uncommitted ghosts: running unindexed analytical scans on EVRAK_HAREKET or STOK_HAR locks shop-floor users, while sprinkling WITH (NOLOCK) across financial reconciliation queries double-counts split pages during active postings.
  2. Direct SQL inserts bypassing synchronous triggers and Delphi scripts: inserting straight into EVRAK_BASLIK or Bilnex tables skips PascalScript validations, costing rollups, and Tr_* balance invariants.
  3. 32-bit STA COM deadlocks in multi-threaded web workers: calling Link partner DLLs concurrently from MTA background threads triggers access violations or hung SQL transactions.
  4. Sub-ledger drift against external CPA books: posting commercial invoices with partial VAT withholding (5/10 KDV Tevkifati) without matching 360 and 391 TDHP split lines breaks monthly e-Defter reconciliations in Orka SQL or Luca MMP.

Safe AI reads and governed staging writes through an enterprise ontology

Point analytical AI reads at Read Committed Snapshot (RCSI) replicas mapped into a unified enterprise business ontology so finance controllers, production planners, and sales managers query canonical customer balances, open subcontracting lots, and aged receivables with caller-level row permissions and explicit Latin1_General_CI_AS versus Turkish_CI_AS collation rules.

When an assistant prepares a purchase order, warehouse transfer, or accounting adjustment, keep direct table writes disabled and route human-approved payloads strictly through CpmService, idempotent staging queue stored procedures (sp_CPM_*), dedicated single-threaded Link SDK workers, or Orka OpenAPI 3 endpoints with balanced TDHP pre-checks.

Isolate AI queries on RCSI read replicas and commit approved mutations through official service APIs or validated SQL staging queues.

Sources

  1. CPM ERP and CPMSmart Platform Overview, CPM Yazilim
  2. Link Gunes Sistemi Li-Nova and Link Yeni Nesil Solutions, Link Bilgisayar
  3. ERP Integrator Anti-Patterns: NOLOCK Dirty Reads, COM Deadlocks, and Idempotency, Open Enterprise Ontology Handbook (Ontoloji.org)

More on ERP data for AI: How to get ERP, CRM and plant data into a shape an AI assistant can use: undeclared links, status codes, and data that lives in several systems.

Keep reading

Follow what we ship.

New connectors, product updates and what we learn rolling AI out in enterprises, sent to your inbox.

Book a demo

Tell us where to reach you and we will reply with times.