Bi-Directional TDL XML & ODBC Incremental ALTERID Sync across 4 Group Companies ยท Auto Inter-Company Ledger Reconciliation ยท Power BI / Excel Warehouse Ready.
| GUID / Voucher # | Entity & Tally Build | Type | Party / Counter-Ledger | Amount (โน) | ALTERID | Direction |
|---|
Test pushing a Cloud ERP/CRM voucher into Tally XML or pulling a local branch Tally.ERP 9 entry up to PostgreSQL Cloud Warehouse.
| Voucher Class | Synced Count | Volume (โน Lakhs) | Idempotency Key |
|---|
Cross-matches reciprocal Sundry Debtor / Creditor & Branch/Division ledgers across TallyPrime and Legacy Tally.ERP 9 instances by GSTIN + Voucher Ref.
| Inter-Company Pair | Entity A Ledger (Dr) | Entity B Mirror Ledger (Cr) | Variance (โน) | Detected Root Cause | Status | Action |
|---|
Uses $AlterId watermark filtering + REMOTEID/GUID deduplication so legacy Tally.ERP 9 never locks the UI thread.
<!-- 1. INCREMENTAL PULL REQUEST (Compatible with Tally.ERP 9 Rel 6.x & TallyPrime 3.x/4.x) -->
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>Export</TALLYREQUEST>
<TYPE>Collection</TYPE>
<ID>CloudDeltaVoucherCollection</ID>
</HEADER>
<BODY>
<DESC>
<STATICVARIABLES>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
<SVCURRENTCOMPANY>Apex Manufacturing Pvt Ltd</SVCURRENTCOMPANY>
</STATICVARIABLES>
<TDL>
<TDLMESSAGE>
<COLLECTION NAME="CloudDeltaVoucherCollection" ISINITIALIZE="Yes">
<TYPE>Voucher</TYPE>
<FETCH>GUID, MasterId, AlterId, Date, VoucherTypeName, VoucherNumber, PartyLedgerName, Amount, Reference, AllLedgerEntries.*</FETCH>
<FILTER>AlterIdWatermarkFilter</FILTER>
</COLLECTION>
<SYSTEM TYPE="Formulae" NAME="AlterIdWatermarkFilter">$AlterId > 98410</SYSTEM>
</TDLMESSAGE>
</TDL>
</DESC>
</BODY>
</ENVELOPE>
<!-- 2. BI-DIRECTIONAL PUSH ENVELOPE (Idempotent Voucher Upsert via ACTION="Alter" / REMOTEID) -->
<ENVELOPE>
<HEADER>
<TALLYREQUEST>Import Data</TALLYREQUEST>
</HEADER>
<BODY>
<IMPORTDATA>
<REQUESTDESC>
<REPORTNAME>Vouchers</REPORTNAME>
<STATICVARIABLES><SVCURRENTCOMPANY>Vanguard Retail Distributors</SVCURRENTCOMPANY></STATICVARIABLES>
</REQUESTDESC>
<REQUESTDATA>
<TALLYMESSAGE xmlns:UDF="TallyUDF">
<VOUCHER REMOTEID="ic-recon-jv-2026-0094" VCHTYPE="Journal" ACTION="Create">
<DATE>20261125</DATE>
<NARRATION>Auto Inter-Company Reconciliation Adjustment via Cloud Sync Agent</NARRATION>
<VOUCHERTYPENAME>Journal</VOUCHERTYPENAME>
<ALLLEDGERENTRIES.LIST>
<LEDGERNAME>Apex Manufacturing Pvt Ltd (IC)</LEDGERNAME>
<ISDEEMEDPOSITIVE>Yes</ISDEEMEDPOSITIVE>
<AMOUNT>-142000.00</AMOUNT>
</ALLLEDGERENTRIES.LIST>
<ALLLEDGERENTRIES.LIST>
<LEDGERNAME>Goods-in-Transit Clearing A/c</LEDGERNAME>
<ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>
<AMOUNT>142000.00</AMOUNT>
</ALLLEDGERENTRIES.LIST>
</VOUCHER>
</TALLYMESSAGE>
</REQUESTDATA>
</IMPORTDATA>
</BODY>
</ENVELOPE>
Instead of querying fragile local Tally ODBC ports directly from Excel, all 4 companies sync every 60s into an indexed Cloud PostgreSQL Star Schema (`fact_vouchers`, `dim_company`, `vw_intercompany_recon`).
// Power BI & Excel Power Query (M Language) โ Live Multi-Company Tally Cloud Connector
let
Source = Odbc.DataSource(
"Driver={PostgreSQL Unicode(x64)};Server=tally-warehouse.internal.cloud;Port=5432;Database=tally_group_mis;Sslmode=require;",
[HierarchicalNavigation = true]
),
db = Source{[Name="tally_group_mis", Kind="Database"]}[Data],
public = db{[Name="public", Kind="Schema"]}[Data],
ConsolidatedMIS = public{[Name="vw_consolidated_group_vouchers", Kind="View"]}[Data],
FilteredFY = Table.SelectRows(ConsolidatedMIS, each [fiscal_year] = "FY2026-27" and [is_cancelled] = false)
in
FilteredFY
/* --- Local Windows Service Sync Agent Config (agent_config.toml) ---
[cloud]
endpoint = "https://mis-sync-api.yourcompany.com/v1/tally/ingest"
tls_mtls_enabled = true
batch_interval_seconds = 60
[[instances]]
company_code = "ENT-01"
name = "Apex Manufacturing Pvt Ltd"
engine = "TallyPrime_4.1"
xml_url = "http://127.0.0.1:9000"
odbc_dsn = "TallyODBC64_9000"
[[instances]]
company_code = "ENT-03"
name = "Vanguard Retail Distributors"
engine = "TallyERP9_6.6.3"
xml_url = "http://127.0.0.1:9009"
legacy_utf16_sanitize = true
*/