IT Technical Support for Developers

Tally Request XMLs


Tally Integration, Tally ERP 9 Integration with Node.JS

Tally ERP Data Accessing via Node.js

Getting Tally ERP data using Server side javascript (node.js)
1. Create a NodeJS, express application
2. Install necessary plugins such as cors,xml,body-parser and request.

Server.js

var express = require('express');
var router = express.Router();
var bodyParser = require('body-parser');
var cors = require('cors');
var request = require('request');
require('body-parser-xml')(bodyParser);
var xml = require('xml');
var async = require('async');
/*Tally xml query*/
var xmlstring = '<ENVELOPE>
<HEADER>
<TALLYREQUEST>Export DATA</TALLYREQUEST>
</HEADER>
<BODY>
<EXPORTDATA>
<REQUESTDESC>
<REPORTNAME>LIST of Companies</REPORTNAME>
<STATICVARIABLES>
<SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
</STATICVARIABLES>
</REQUESTDESC>
</EXPORTDATA> </BODY>
</ENVELOPE>';
let app = express();
app.use(bodyParser.json());
/* use CORS to avoid net::ERR_CONNECTION_RESET */
app.use(cors);
app.post("/",(req,res) =>{ /*
Dynamic Tally xml Query parameter
const dbrequest = req.body.datarequest;
const params = req.body.params;
*/
var options = {
uri: 'http://localhost:9000',

method: 'POST',

headers: { 'Content-Type': 'text/xml;
charset:UTF-8',
'Content-Length': Buffer.byteLength(xmlstring)},
body: req.body.xmlstr
};
var result="";
async.parallel([
function(callback) {
/* tally data fetch from local tally server*/
var url = "http://localhost:9000";
request(options, function(err, response, body) {
// JSON body
if(err) { console.log(err);
callback(true);
return;
}

result = body;
callback(false, body);
});

}

],function(err, results) {
if(err) { console.log(err);
res.send(500,"Server Error");
return;
}
res.send("result--->"+result);
}
);
}

app.listen(4000,'localhost');






TallyPrime List of Companies XML Request

TallyPrime XML Request for List of Companies

<ENVELOPE>
<HEADER>
<VERSION>1</VERSION>
<TALLYREQUEST>Export</TALLYREQUEST>
<TYPE>Data</TYPE>
<ID>List of Companies</ID>
</HEADER>
<BODY>
<DESC>
<TDL>
<TDLMESSAGE>
<REPORT NAME="List of Companies" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">
<FORMS>List of Companies</FORMS>
</REPORT>
<FORM NAME="List of Companies" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">
<TOPPARTS>List of Companies</TOPPARTS>
<XMLTAG>"List of Companies"</XMLTAG>
</FORM>
<PART NAME="List of Companies" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">
<TOPLINES>List of Companies</TOPLINES>
<REPEAT>List of Companies : Collection of Companies</REPEAT>
<SCROLLED>Vertical</SCROLLED>
</PART>
<LINE NAME="List of Companies" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">
<LEFTFIELDS>Name</LEFTFIELDS>
</LINE>
<FIELD NAME="Name" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">
<SET>$Name</SET>
<XMLTAG>"NAME"</XMLTAG>
</FIELD>
<COLLECTION NAME="Collection of Companies" ISMODIFY="No" ISFIXED="No" ISINITIALIZE="No" ISOPTION="No" ISINTERNAL="No">
<TYPE>Company</TYPE>
<FETCH>NAME</FETCH>
</COLLECTION>
</TDLMESSAGE>
</TDL>
</DESC>
</BODY>
</ENVELOPE>






Related Links...

Tally data to Power BI


How to filter tally xml response based on voucher number?


How to Insert Memorandum voucher in Tally


XML - How to get voucher list of a specific voucher type in tally via


Party wise Sales in xml format


How to Get Outstanding data


Tally Alter Credit Limit and Credit Days using XML Request




Latest Post

Tally Prime 6.2 What is new

/Tally Integration Capabilities

Lucy Edit AI - Free AI Video Editor Online

/Artificial Intelligence AI

Rajinikanth with a salt-and-pepper beard wearing a stylish suit AI Vid

/Artificial Intelligence AI

How to generate Nano Banana 3D Figurine Image

/Artificial Intelligence AI

AI What is Next

/Artificial Intelligence AI