Following are some significant tags that are required for requesting any info from Tally.ERP 9. The tags are divided into two categories:
Header tags are enclosed with the tag <HEADER> and </HEADER>. These tag gives all the header information.
It gives the version of the messaging format. The tag <VERSION> is a mandatory tag which is used in Header tags.
TALLYREQUEST tag specifies the type of request. This tag is vital as it determines the response required. The permissible values for this tag are Import, Export and Execute. This value further determines the range of values required for this tag.
Import is specified when we want Tally to import data from the XML fragment to Tally. i.e Tally validates and saves the data. A request is made to Import Data or File which can be specified within the subsequent tags.
Export is specified when we want to retrieve data from Tally. A request is made to Export Data, Collection, Object, Function, etc. which is specified within the tag <TYPE>.
Execute is specified when we want to execute some TDL actions in Tally.ERP 9. Here the request is made to Execute TDL Action which can be specified within the <TYPE> tag.
The following table describes the value of <TALLYREQUEST> tag.
Request Type |
Action |
Comments |
Import |
Set |
Requesting recipient to import the data. |
Export |
Get |
Request for Exporting Data from other end. |
Execute |
Run |
Request for executing the action in Tally |
The TYPE attribute of this tag can be used to identify specific instance of an entity. The attribute Type can be used like the following example:
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>EXPORT</TALLYREQUEST>
<TYPE>OBJECT</TYPE>
<SUBTYPE>Ledger</SUBTYPE>
<ID TYPE="Name">ABC India Pvt. Ltd. </ID>
</HEADER>
TYPE |
ID - Value |
Qualification |
DATA |
Name of the Request / Report |
Not Applicable |
COLLECTION |
Name of the Collection |
Not Applicable |
OBJECT |
Object ID or Name of the Object |
Object Identifier Attribute |
ACTION |
Name of the Action to be performed - As of now, only the action Sync is introduced |
Not Applicable |
FUNCTION |
Name of the Function to be executed |
Not Applicable |
The <STATUS> tag is applicable only for Response. Value within this tag indicates success or failure of the request made. Possible values are SUCCESS (1), FAILURE (0).
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>EXPORT</TALLYREQUEST>
<TYPE>DATA</TYPE>
<ID>All masters</ID>
</HEADER>
<BODY>
<DESC>
</DESC>
</BODY>
</ENVELOPE>
<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<STATUS>0</STATUS>
</HEADER>
<BODY>
<DATA>
</DATA>
</BODY>
</ENVELOPE>
Note: At the time of request within <HEADER>...</HEADER>, all tags must have appropriate value. Only <SUBTYPE> is optional and can be used where applicable. In case of Response Header has only two tags i.e., <VERSION> tag to indicate the version of the messaging format and <STATUS> tag to indicate Success / Failure.