Understanding the Tally Prime 5.0 XML Architecture
With the release of Tally Prime 5.0, Tally Solutions modernized its data interchange format to support real-time connected GSTN e-invoicing, API integration, and enhanced audit trails. However, for businesses importing programmatic XML vouchers via Alt + O, strict adherence to the updated Document Type Definition (DTD) is critical.
In older versions like Tally.ERP 9 and early Tally Prime 1.0–3.0, XML parsers allowed loose tag structures. Tally Prime 5.0 enforces strict validation on party ledgers, tax breakdown arrays, and place of supply headers. A single misplaced tag can trigger the generic error: Cannot Import: Schema Mismatch or Voucher Incomplete.
Core <TALLYMESSAGE> Purchase Voucher Structure
Every purchase voucher imported into Tally Prime must be encapsulated within standard XML envelope tags. Here is the verified 5.0 schema generated natively by EntryFlow:
<ENVELOPE>
<HEADER>
<TALLYREQUEST>Import Data</TALLYREQUEST>
</HEADER>
<BODY>
<IMPORTDATA>
<REQUESTDESC>
<REPORTNAME>Vouchers</REPORTNAME>
</REQUESTDESC>
<REQUESTDATA>
<TALLYMESSAGE xmlns:UDF="TallyUDF">
<VOUCHER VCHTYPE="Purchase" ACTION="Create" OBJVIEW="Invoice Voucher View">
<DATE>20260815</DATE>
<EFFECTIVEDATE>20260815</EFFECTIVEDATE>
<VOUCHERTYPENAME>Purchase</VOUCHERTYPENAME>
<REFERENCE>INV-2026-0842</REFERENCE>
<PARTYLEDGERNAME>Apex Industrial Technologies</PARTYLEDGERNAME>
<BASICBASEPARTYNAME>Apex Industrial Technologies</BASICBASEPARTYNAME>
<PERSISTEDVIEW>Invoice Voucher View</PERSISTEDVIEW>
<PLACEOFSUPPLY>Maharashtra</PLACEOFSUPPLY>
<ALLLEDGERENTRIES.LIST>
<LEDGERNAME>Apex Industrial Technologies</LEDGERNAME>
<ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>
<AMOUNT>53100.00</AMOUNT>
</ALLLEDGERENTRIES.LIST>
<ALLLEDGERENTRIES.LIST>
<LEDGERNAME>Purchase Accounts</LEDGERNAME>
<ISDEEMEDPOSITIVE>Yes</ISDEEMEDPOSITIVE>
<AMOUNT>-45000.00</AMOUNT>
</ALLLEDGERENTRIES.LIST>
<ALLLEDGERENTRIES.LIST>
<LEDGERNAME>Input CGST</LEDGERNAME>
<ISDEEMEDPOSITIVE>Yes</ISDEEMEDPOSITIVE>
<AMOUNT>-4050.00</AMOUNT>
</ALLLEDGERENTRIES.LIST>
<ALLLEDGERENTRIES.LIST>
<LEDGERNAME>Input SGST</LEDGERNAME>
<ISDEEMEDPOSITIVE>Yes</ISDEEMEDPOSITIVE>
<AMOUNT>-4050.00</AMOUNT>
</ALLLEDGERENTRIES.LIST>
</VOUCHER>
</TALLYMESSAGE>
</REQUESTDATA>
</IMPORTDATA>
</BODY>
</ENVELOPE>
Critical Rules for Successful XML Ingestion
- Negative Sign Conventions: In Tally XML, Debit entries (expenses and input taxes) are marked with
<ISDEEMEDPOSITIVE>Yes</ISDEEMEDPOSITIVE>and a negative amount (e.g.,-45000.00), while Credit entries (Sundry Creditors) carry positive amounts. - Exact Paisa Balancing: If the mathematical sum of all ledger lines differs from zero by even 1 paisa due to rounding, Tally Prime will reject the voucher. EntryFlow guarantees 100% 0-paisa balancing.
- Date String Format: The
<DATE>tag must strictly follow theYYYYMMDDformat (e.g.,20260815for 15-Aug-2026).