Integration Methods and Technologies
TallyPrime supports a variety of integration methods to enable seamless connectivity with external systems. These methods range from built-in options using TDL (Tally Definition Language) to advanced integrations using external applications or libraries.
Integration Using TDL
Tally Definition Language (TDL) is Tally’s native language used to customize the UI, reports, and business logic within TallyPrime. It is tightly integrated with the product and is ideal for in-product automation and data handling.
Why TDL?
-
Purpose-built for TallyPrime, ensuring seamless customization.
-
Enables custom UI, reports, and validations within the application.
-
Supports automation of internal workflows like auto-filling data, triggering alerts, or validating entries.
-
Offers real-time deployment of changes without the need for external tools.
Where TDL Fits
TDL is best suited for in-product customizations and defining data structures for import/export. While external systems may handle API calls or file transfers, TDL manages the data flow within TallyPrime, acting as the bridge between the UI, data, and external integrations.
Key Capabilities of TDL Integration
-
Seamless Customization within TallyPrime: Create reports, modify screens, or extend features directly inside Tally’s UI without relying on external apps.
-
Direct Access to Tally Data: Gain structured access to masters, vouchers, ledgers, and more—enabling precise control over display, validation, and manipulation.
-
Real-Time Data Sync: TDL can call external APIs or use ODBC/XML to push/pull data—enabling near real-time integrations.
-
High Performance: Being native and compiled within Tally, TDL ensures optimal performance without network latency or third-party overhead.
-
Secure and Role-Based Execution: Operates within Tally’s environment, ensuring built-in access control and secure data operations.
-
Cost-Effective and Scalable: Ideal for incremental enhancements—no additional server, middleware, or platform dependency.
-
Embedded Business Logic: TDL allows validation, conditional flows, and automation (e.g., auto voucher creation) directly in sync with business rules.
JSON Integration Using TDL
TDL also supports integration with external systems that use JSON for data exchange. Developers can use TDL to both fetch and export structured JSON data using HTTP or local file sources.
Key Capabilities
-
HTTP-Based Integration:
Use TDL to fetch JSON from external APIs via HTTP GET. Supports headers such as authorization tokens, API-Key, etc. -
File-Based Import:
Read JSON files stored locally into Tally by mapping JSON objects to TDL collections. -
Exporting Reports and Data in JSON Format:
Use attributes like JSON Tag, Plain JSON, and Resource Type: JSON to export data from collections, reports, or forms -
Handling Nested JSON:
Parse and map nested JSON structures to Tally objects using object paths.These capabilities allow Tally to integrate with a wide range of modern applications and services that rely on JSON for communication.
XML Integration Using TDL
Tally Definition Language (TDL) allows TallyPrime to communicate with external systems through XML. This integration enables Tally to either fetch data from or send data to remote web services and databases.
Core Capabilities
-
Tally can consume XML responses from external servers and display them in Tally reports.
-
Tally can generate XML requests based on internal logic or user input and send them to external servers.
-
It supports bi-directional data flow, making integration seamless.
Key Use Cases of TDL + XML Integration
1. Display External Data in Tally : Tally fetches structured XML data (e.g., stock items and batches) from a web service and shows it as a report within Tally. The data is extracted using predefined collection paths.
2. Fetch Data Based on Tally’s Request : Tally generates an XML request (e.g., asking for details of a specific item) and sends it to a web server. The server replies with relevant data, which is then displayed in Tally.
3. User-Driven Data Retrieval : Tally accepts input from the user (like an item name), uses it to create a custom XML request, and sends it to fetch related data from an external system.
4. Send Data from Tally to External Databases : Data entered in Tally by a user (e.g., batch details) can be sent to an external server, which then stores it in its database. This can be done either automatically or through a button in the report.
5. Control Master Creation : TDL allows control over whether new items or masters should be created when importing XML data, helping maintain data accuracy.
Integration Using External Languages
TallyPrime also supports integration with other platforms and applications using common technologies like XML, HTTP, and DLLs. This is ideal for scenarios requiring advanced data exchange, system-level integration, or hardware interaction.
XML Integration with Tally Schema
Tally requires XML data to follow a specific schema that it can interpret. Every XML payload intended for import or communication with Tally must be structured using the <ENVELOPE>, <HEADER>, and <BODY> tags, with nested tags such as <TALLYMESSAGE>, <LEDGER>, or <VOUCHER> depending on the data type.
Key elements of the Tally XML format include:
-
<TALLYREQUEST>: Specifies the type of operation, such as Import Data, Export Data, or Execute.
-
<REPORTNAME>: Defines the operation scope, such as All Masters, Vouchers, or a custom report.
-
<TALLYMESSAGE>: Encapsulates the business object (e.g., Ledger, Voucher).
-
Object Tags: Each Tally object (like Ledger, StockItem, etc.) is represented as an XML tag with relevant attributes and child elements.
Tally’s XML schema is strict and case-sensitive. Only well-formed XML payloads adhering to the required structure will be accepted by Tally’s HTTP interface.
Integration Using DLLs
DLLs allow Tally to interact with external databases, cloud services, and hardware devices that are beyond the scope of TDL.
Key Use Cases
-
Connect to SQL Server, MySQL, or other relational databases.
-
Interact with external systems such as ERP platforms or cloud APIs.
-
Integrate with hardware like barcode scanners or POS terminals.
DLLs can be invoked from TDL using custom functions and allow more control over external workflows, including database operations and device handling.
TDL vs External Integration
Criteria |
TDL Integration |
External Integration |
---|---|---|
Environment |
Inside Tally |
Outside Tally (external apps/tools) |
Complexity |
Low to medium |
Medium to high |
Use Case Fit |
Custom reports, UI, internal automation |
API calls, device access, external sync |
Performance |
High (native execution) |
Depends on network and app design |
Setup Requirements |
No external dependencies |
Requires HTTP clients, DLLs, or runtime libs |
Data Formats |
XML, JSON, ODBC, File |
XML, JSON, File, Database |
Note: Use TDL for workflows and reports inside Tally. Use external integration methods for connecting Tally with other platforms, services, or devices.