ml-connector
TallyPrimeTradeshift

TallyPrime and Tradeshift integration

TallyPrime runs accounting and inventory on-premise, often in regional markets. Tradeshift operates as a cloud network for invoice and purchase order exchange. Connecting the two lets you push purchase documents from TallyPrime directly into Tradeshift's supplier portal in standardized format, and pull incoming supplier invoices back into TallyPrime as purchase vouchers without re-entry. ml-connector manages the local HTTP bridge to TallyPrime, the OAuth handshake to Tradeshift, and the translation from TallyPrime's XML envelope to Tradeshift's UBL 2.0 standard.

How TallyPrime works

TallyPrime is a single-user desktop accounting application typically installed on a Windows machine, serving as the general ledger, AP, and inventory system. It exposes data through a local HTTP server on port 9000 (must be manually enabled in TallyPrime Settings) using XML or JSON POST envelopes. All operations go through a single endpoint controlled by a TALLYREQUEST field that specifies Import Data for writes or Export Data for reads. Authentication is optional at the transport layer but requires the company name and optionally a username and password if the company is password-protected. Polling is the only sync method available; Tradeshift can export purchase vouchers, sales vouchers, and payment records by date range, but TallyPrime offers no webhooks or change streams, so ml-connector must poll periodically and maintain state.

How Tradeshift works

Tradeshift is a multi-tenant cloud B2B network for document exchange in standardized formats. It authenticates all API calls with OAuth 1.0a (two-legged, server-to-server) plus an X-Tradeshift-TenantId header that identifies the buyer tenant. The REST API accepts and returns documents in JSON or UBL 2.0/2.2 XML format. Key entities include invoices, purchase orders, credit notes, receipts, and despatch advice. Tradeshift's document polling API supports a changedAfter timestamp filter to retrieve only modified documents since the last check. Tradeshift connects buyers to suppliers on a multi-tenant network, so documents sent to Tradeshift are visible to counterparties based on network settings and company profiles.

What moves between them

The primary flow runs from TallyPrime into Tradeshift. ml-connector polls TallyPrime's Day Book on a configurable schedule (typically every 5 to 15 minutes), filters for purchase vouchers created since the last poll, and exports them as XML. Each voucher is translated from TallyPrime's XML format into a UBL 2.0 invoice document and posted to Tradeshift's document API. The reverse flow imports incoming Tradeshift invoices by polling the documents/v2 endpoint with a changedAfter timestamp, translating UBL 2.0 back to TallyPrime's XML envelope format, and importing them as purchase vouchers into TallyPrime. Supplier and buyer relationship data flows bidirectionally so that TallyPrime ledger accounts and Tradeshift company profiles stay aligned.

How ml-connector handles it

ml-connector maintains a local agent on the same LAN as the TallyPrime machine to bridge the cloud connector to port 9000, since TallyPrime's HTTP server is not internet-exposed. For TallyPrime, it stores the company name and optional credentials (username and password) encrypted, composes Export Data requests with date-range filters (SVFROMDATE and SVTODATE in YYYYMMDD format), and polls on a schedule. For Tradeshift, it stores the OAuth 1.0a credentials (consumer_key, consumer_secret, token, and token_secret) encrypted, refreshes them as needed, and includes the required X-Tradeshift-TenantId header on every call. Translation between TallyPrime's XML voucher structure and UBL 2.0 document format is handled in a mapping layer: voucher line items become invoice line items with amounts and GL codes, supplier names and addresses map to UBL party elements, and dates are normalized to ISO 8601. Because TallyPrime has no native idempotency and no pagination, ml-connector tracks the last-seen voucher ID and checks for duplicates before import. Tradeshift rate limits are respected with exponential backoff, and every record in both directions carries a full audit trail for reconciliation and replay.

A real-world example

A mid-market trading and distribution company in Southeast Asia uses TallyPrime for accounting, AP, and inventory. They trade with multiple suppliers across the region and some are connected to Tradeshift for invoice exchange. Before the integration, the finance team received invoices through Tradeshift, printed or downloaded them, and manually re-entered line items into TallyPrime purchase vouchers. This was slow, error-prone, and created duplicate data entry during month-end close. With TallyPrime and Tradeshift connected, outgoing purchase orders from TallyPrime flow automatically to suppliers on Tradeshift in standardized UBL format, and incoming supplier invoices from Tradeshift flow back into TallyPrime as ready-to-approve purchase vouchers. The matching and three-way reconciliation (PO, receipt, invoice) is now automatic, and the finance team approves batches rather than re-keying.

What you can do

  • Translate and push purchase vouchers from TallyPrime to Tradeshift as UBL 2.0 invoice documents on a configurable polling schedule.
  • Poll Tradeshift for incoming invoices and credit notes and import them back into TallyPrime as purchase vouchers using the Alter action to prevent duplicates.
  • Bridge TallyPrime's local port 9000 HTTP API to Tradeshift's cloud REST endpoints, handling both transport and authentication barriers.
  • Map TallyPrime ledger accounts and supplier details to Tradeshift UBL party and line-item structures, normalizing dates and amounts for standardized exchange.
  • Maintain an encrypted audit trail of all document translations, sync attempts, and failures, with the ability to replay failed records after resolving the root cause.

Questions

Does the integration require a local agent to run on the TallyPrime machine?
Yes. TallyPrime's HTTP server on port 9000 is accessible only on the LAN where the application is installed and not internet-facing. ml-connector includes a local agent that runs on the same network segment and bridges cloud connector requests to that port. The agent handles all TallyPrime XML composition and response parsing.
How are purchase vouchers from TallyPrime translated into Tradeshift documents?
ml-connector maps TallyPrime's XML voucher structure to UBL 2.0 invoice format. Voucher line items become invoice line items with amounts and GL codes, supplier names and addresses map to UBL party elements, and dates are normalized to ISO 8601. The translation is bidirectional, so incoming UBL invoices from Tradeshift are converted back to TallyPrime's XML envelope structure for import.
What happens if an incoming Tradeshift invoice is a duplicate of one already in TallyPrime?
ml-connector tracks the last-seen document ID in both directions and compares incoming records against that state before import. Because TallyPrime has no native idempotency, ml-connector uses the Alter action on duplicate import attempts, which updates the existing voucher rather than creating a new one. Every duplicate attempt is logged with full context for audit purposes.

Related integrations

Connect TallyPrime and Tradeshift

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started