ml-connector
TallyPrimeWooCommerce

TallyPrime and WooCommerce integration

TallyPrime handles accounting and inventory in a desktop-first application common in India and Southeast Asia. WooCommerce powers e-commerce shops directly on WordPress. Connecting the two ensures every online sale flows into TallyPrime as a sales voucher, inventory stock movements are reflected in WooCommerce, and order-level discounts and GST charges align between systems. ml-connector bridges the gap between TallyPrime's local-only architecture and WooCommerce's cloud-native webhooks.

How TallyPrime works

TallyPrime exposes ledgers, vouchers (sales, purchase, payment, receipt), stock items, and groups through XML or JSON over HTTP POST to a local server on port 9000. The application is desktop-only and single-user, requiring the target company to be open in TallyPrime and the HTTP server to be manually enabled in Settings. Authentication relies on company name and optional password; TallyPrime has no native webhooks, so all data retrieval is polling-based over a local network connection. The API accepts batch requests but returns all matching records in one response with no native pagination.

How WooCommerce works

WooCommerce exposes orders, refunds, customers, products, taxes, and coupons through REST over HTTPS via the wp-json/wc/v3 endpoint. Each store is self-hosted on its own WordPress domain with a unique URL. Authentication uses API Key pairs (Consumer Key and Consumer Secret) over HTTP Basic Auth or OAuth 1.0a. WooCommerce supports webhooks for order, customer, and product events, pushing notifications when records change. Webhooks auto-disable after five consecutive non-2xx responses and must be manually re-enabled. WooCommerce has no native accounting features: no vendors, purchase orders, GL accounts, or employee data.

What moves between them

The primary flow is from WooCommerce into TallyPrime. When an order is placed or updated in WooCommerce, ml-connector receives the webhook, transforms the order into a TallyPrime sales voucher with line items, and posts it to the target company in TallyPrime via the local API. Product and customer metadata are stored and mapped to TallyPrime ledgers and stock masters. Inventory stock levels are polled from TallyPrime periodically and pushed back to WooCommerce product pages. Order refunds in WooCommerce trigger debit notes in TallyPrime to reverse revenue and re-stock items.

How ml-connector handles it

ml-connector requires a local agent running on the same machine or LAN as TallyPrime to bridge cloud connectivity to the port 9000 server; this agent is configured once with the TallyPrime host IP, port, and target company name. WooCommerce webhooks POST order data to ml-connector, which transforms each order into a TALLYREQUEST Import Data envelope with the sales voucher details, voucher line items, and party/customer ledger references. Discounts are mapped to TallyPrime discount ledgers, and GST charges are applied to the appropriate tax ledgers per Indian compliance. ml-connector keeps a local record of last-seen order IDs and periodically polls TallyPrime's Day Book with date-range filters to detect any manual adjustments or off-system invoicing. Because TallyPrime has no native idempotency key, ml-connector deduplicates via order reference number on each import. Stock levels are polled from TallyPrime stock masters every 30 minutes and updated in WooCommerce to prevent overselling. When TallyPrime is offline or the company is not open, ml-connector queues orders in Redis and retries with exponential backoff, with full audit logging on every voucher import.

A real-world example

A small to mid-sized retail or distribution business in India runs TallyPrime for accounting and GST compliance, and sells online through a WooCommerce store hosted on their own server. Before the integration, the owner logged into both systems daily to enter sales orders manually - recording each WooCommerce order as a TallyPrime sales voucher, updating inventory counts in both places, and reconciling discrepancies between sites. Month-end took an extra day to chase mismatched invoices. With TallyPrime and WooCommerce connected, each online order automatically becomes a sales voucher in TallyPrime with the correct customer name, GST codes, and amount, inventory stays in sync in real time, and refunds reverse the invoice and restore stock. The accounting ledger is always current, and manual order entry is gone.

What you can do

  • Receive WooCommerce orders via webhook and post them as sales vouchers into TallyPrime with line items, discounts, and tax allocations.
  • Sync TallyPrime inventory stock levels to WooCommerce every 30 minutes to prevent overselling and keep product availability current.
  • Map WooCommerce customers to TallyPrime party ledgers and create new customer records on first order.
  • Reverse sales vouchers and de-stock items in TallyPrime when orders are refunded or cancelled in WooCommerce.
  • Detect manual invoicing in TallyPrime via polling and reconcile with WooCommerce orders, with full audit logging on every import.

Questions

How does ml-connector handle TallyPrime's local-only architecture and lack of webhooks?
ml-connector uses a local agent deployed on the same machine or network as TallyPrime to bridge the desktop application to the cloud. The agent polls TallyPrime's Export Data endpoint periodically with date-range filters to detect new vouchers and inventory changes. WooCommerce webhooks push order data to ml-connector, which then transforms and imports them via the agent into TallyPrime's Import Data endpoint.
What happens if TallyPrime is offline or the target company is not open?
ml-connector queues incoming WooCommerce orders in Redis and retries imports with exponential backoff until TallyPrime is available and the company is open. Every queued job carries a full audit trail with timestamps and error details. When TallyPrime comes back online, ml-connector automatically replays the queued orders in sequence without creating duplicates, using the order reference number as a deduplication key.
How are GST charges and discounts handled between the two systems?
WooCommerce order items with taxes are mapped to TallyPrime's tax ledgers per the configured GST rate schedule. Discounts applied in WooCommerce are posted to a dedicated discount ledger in TallyPrime configured per customer. ml-connector validates that all ledgers exist before importing, so orders with invalid tax or discount codes return an error for manual review rather than silently failing.

Related integrations

Connect TallyPrime and WooCommerce

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

Get started