Integration Initiated from Tally
TallyPrime can actively initiate communication with external systems, either to pull data from third-party applications (TPAs) or send data to them, using supported protocols and formats. These workflows enable seamless data sync between Tally and systems like ERPs, CRMs, cloud services, and other databases.
Tally Pulls Data from Third-Party Applications (TPAs)
Tally can act as a client to fetch external data using two primary methods:
-
HTTP (XML/JSON over API)
-
ODBC (SQL-based access to external databases)
Use Cases
Master Data Sync
-
Synchronize master data such as customer records, ledger accounts, or stock items from an external system (like a CRM, warehouse DB, or another ERP) into TallyPrime, using XML and TDL.
-
How It Works: Tally acts as a client, sending a request (if needed), or simply consuming a pre-hosted XML file served from a web server. The response contains structured data (e.g., customer details), which Tally fetches and displays as a report or stores in its database.
Sample Request and Response Formats
<CUSTOMER>
<NAME>Sapna Awasthi</NAME>
<EMPID>1000</EMPID>
<PHONE>
<OFFICENO>080-66282559</OFFICENO>
<HOMENO>011-22222222</HOMENO>
<MOBILE>990201234</MOBILE>
</PHONE>
<ADDRESS>
<ADDRLINE>C/o. Info Solutions</ADDRLINE>
<ADDRLINE>Technology Street</ADDRLINE>
<ADDRLINE>Tech Info Park</ADDRLINE>
</ADDRESS>
</CUSTOMER>
Corresponding TDL Collection:
[Collection: XML Get Collection]
RemoteURL: “http://localhost/TestXML.xml“
XMLObject: Customer Data
Authentication and Connection Setup
- Host the XML file on a web server (e.g., IIS) with a static IP or localhost URL.
- Place the file under a web-accessible directory such as C:\Inetpub\wwwroot.
- se collection attributes in TDL to define the connection and request.
TDL Example:
RemoteURL: “http://localhost/TestXML.xml“
RemoteRequest: XMLPostReqRep : ASCII
Error Handling Strategies
-
Use the <STATUS> tag in the response to identify success or failure.
-
Implement retry or fallback logic using events like On Form Accept.
-
Define separate success and error reports using TDL.
TDL Syntax:
Action: HTTP Post : @@MyUrl : ASCII : ReqRep : ERRRespRep : SuccRep
Tally Sends Data to Third-Party Applications (TPAs)
Tally can be configured to send data proactively to external systems—either in response to a user action or as part of a scheduled automation.
Use Cases
Auto-Push Vouchers
-
Automatically push approved vouchers (like sales invoices, payments, or receipts) from TallyPrime to an external ERP system, accounting aggregator, or any third-party application—without manual export or file transfer.
-
When a voucher is saved or approved in Tally, TDL can be used to trigger an export that sends the data to a third-party system in XML or JSON format using RemoteRequest.
-
This ensures real-time sync between Tally and external platforms like:
-
GST compliance portals
-
Central accounting platforms
-
CRMs or billing systems
-
Sample Request Payloads
Tally uses RemoteRequest to send data to a third-party system.
XML Payload:
<ENVELOPE>
<HEADER><TALLYREQUEST>Import Data</TALLYREQUEST></HEADER>
<BODY>
<IMPORTDATA>
<REQUESTDATA>
<TALLYMESSAGE>
<VOUCHER>
<DATE>20240601</DATE>
<AMOUNT>10000</AMOUNT>
</VOUCHER>
</TALLYMESSAGE>
</REQUESTDATA>
</IMPORTDATA>
</BODY>
</ENVELOPE>
JSON Export Example using TDL:
[Collection: SalesData] Data Source : HTTP JSON : “https://api.example.com/sync”
Export Header : “Authorization: Bearer <token>”
TPA Endpoint Configuration
For reliable data reception:
-
The TPA must expose a valid HTTP endpoint to receive POST requests.
-
Response codes (e.g., 200 OK, 400 Bad Request) must be configured for parsing in TDL.
-
JSON/XML schema must match Tally’s export format or be normalized at the receiving end.
Acknowledgment and Retry Mechanisms
To ensure reliable delivery:
-
Expect and parse confirmation responses from TPAs.
-
Implement retry logic in TDL using conditional checks on the response.
-
Log failed attempts and optionally prompt the user or admin for manual resend.
Whether pulling customer data from a CRM or pushing invoices to a billing platform, TallyPrime enables flexible and reliable two-way integration. Its support for HTTP, XML, JSON, and SQL (ODBC) allows developers to build secure and structured automation solutions with clarity and precision.