Integration Initiated From TPAs
When Tally operates as a server, third-party applications (TPAs) can either pull data from Tally for reporting and analysis or push data into Tally to create or update masters and transactions. This enables real-time synchronization and integration with external systems.
TPA Pulls Data from Tally
Third-party applications can extract data from Tally using HTTP/XML or ODBC for use in external dashboards, business intelligence tools, or reporting systems.
Use Cases
-
Displaying real-time ledger balances or stock summaries in BI dashboards
-
Extracting trial balance or voucher summaries for audit and reporting
-
Syncing master data like customers or stock items with an ERP system
Available Endpoints Exposing Company, Voucher, and Ledger Data
-
Tally exposes collections such as Ledger, Voucher, StockItem, CostCentre, etc.
-
Data can be accessed via:
-
ODBC: by marking collections with the attribute IsODBCTable: Yes
-
HTTP/XML: by sending an Export Data request with appropriate report and variables
-
Sample XML Responses Expected by TPAs
<ENVELOPE>
<BODY>
<DATA>
<LEDGER>
<NAME>Customer A</NAME>
<CLOSINGBALANCE>23500</CLOSINGBALANCE>
</LEDGER>
</DATA>
</BODY>
</ENVELOPE>
Each object such as a ledger, voucher, or item is mapped to a row, and attributes are returned as XML tags.
Access Permissions, Authentication, and Security Considerations
-
Tally must be running in server mode with HTTP listener enabled (default port 9000)
TPA Sends Data to Tally
External applications can push data into Tally using HTTP/XML to automate the creation of vouchers, masters, and other records.
Use Cases
-
Automatically posting invoices from a billing or e-commerce platform
-
Importing journal entries from an accounting engine
-
Syncing inventory movements from a warehouse or POS system
Message Structure and Required XML/JSON Tags
Tally requires a structured XML payload in its native <ENVELOPE> format:
<ENVELOPE>
<HEADER>
<TALLYREQUEST>Import Data</TALLYREQUEST>
</HEADER>
<BODY>
<IMPORTDATA>
<REQUESTDESC>
<REPORTNAME>Vouchers</REPORTNAME>
</REQUESTDESC>
<REQUESTDATA>
<TALLYMESSAGE>
<VOUCHER VCHTYPE=”Sales” ACTION=”Create”>
<DATE>20240617</DATE>
<PARTYLEDGERNAME>Customer A</PARTYLEDGERNAME>
<AMOUNT>10000</AMOUNT>
</VOUCHER>
</TALLYMESSAGE>
</REQUESTDATA>
</IMPORTDATA>
</BODY>
</ENVELOPE>
Mandatory elements include TALLYREQUEST, REPORTNAME, TALLYMESSAGE, VOUCHER, and context-specific fields.
Success Criteria and Validation of Data Entry
After processing the request, Tally sends a structured XML response:
<RESPONSE>
<CREATED>1</CREATED>
<ALTERED>0</ALTERED>
<ERRORS>0</ERRORS>
</RESPONSE>
-
A successful request will return CREATED=1 and ERRORS=0
-
Invalid or duplicate requests will reflect in the error count
Logs Access and Debugging Tips to Troubleshoot Issues
-
Tally maintains a runtime log file in the installation directory under /logs/
-
To troubleshoot XML, use Tally’s Calculator Pane to validate queries and field values
-
Enable message logging in TDL or use external proxies to inspect request/response flow