ml-connector
TallyPrimeSalesforce

TallyPrime and Salesforce integration

TallyPrime runs accounting, inventory, and GST for small and mid-sized businesses in India and Southeast Asia. Salesforce runs your customer relationships and order management globally. Connecting the two keeps your customer master and invoice records synchronized across both systems. Customers created in Salesforce flow into TallyPrime as ledger groups, and order-to-invoice workflows post directly into TallyPrime's books without re-keying. ml-connector handles the unique challenge of polling a locally-installed TallyPrime instance while managing cloud-based Salesforce OAuth tokens and Change Data Capture events.

How TallyPrime works

TallyPrime exposes Ledger, Group, Voucher, and Stock Item records through an XML or JSON API served over HTTP on port 9000 from a locally-installed Windows application. Authentication is optional at the transport layer but requires the TallyPrime application to be running with the target company loaded. The local HTTP server must be manually enabled in TallyPrime Settings and is only accessible on the LAN; a local agent running on the same machine or network as the TallyPrime host bridges requests from the cloud connector to port 9000. TallyPrime has no native webhooks or event subscriptions, so all reads are by polling. Requests are controlled by TALLYREQUEST envelope fields: Export Data for reads with optional date-range filters and SVFROMDATE/SVTODATE parameters, and Import Data for writes via Voucher objects. All dates must be in YYYYMMDD format, company names are case-sensitive, and concurrent requests may cause inconsistent behavior because TallyPrime is a single-user desktop application.

How Salesforce works

Salesforce exposes Accounts, Contacts, Opportunities, Orders, OrderItems, Invoices, Leads, Products, and Pricebooks through a REST API at https://<MyDomain>.my.salesforce.com/services/data/v63.0/. Authentication is OAuth 2.0 Client Credentials flow, requiring Consumer Key, Consumer Secret, and My Domain URL. Tokens expire after a configurable session timeout, typically 2 hours. Salesforce offers real-time push via Change Data Capture on the Pub/Sub API for CREATE, UPDATE, DELETE, and UNDELETE events with a 3-day retention window, and also supports polling via GET /sobjects/<Object>/updated/ with datetime ranges. Salesforce enforces rate limits per org and per license type. Invoice objects require the Revenue Cloud or Order Management add-on and may not exist in basic Sales/Service Cloud orgs.

What moves between them

The main flow is from Salesforce into TallyPrime. When orders are created or invoices are generated in Salesforce, ml-connector reads the account and order details via the REST API or CDC push events, maps Salesforce Accounts to TallyPrime Ledger Groups by name, and posts Sales Vouchers into TallyPrime's general ledger allocated to the matching customer group. Payment records from Salesforce Orders flow into TallyPrime as Payment Vouchers, keeping the cash-to-invoice timeline aligned. Customer and product master data may be synchronized in both directions so Salesforce has access to TallyPrime's pricing and stock availability, and TallyPrime retains accurate customer hierarchies from Salesforce Accounts.

How ml-connector handles it

ml-connector runs a local agent on the TallyPrime host to reach port 9000 on the LAN, while managing OAuth 2.0 credentials and token refresh for Salesforce on the cloud side. On the Salesforce side, ml-connector subscribes to Change Data Capture events on Account and Order objects for real-time push, and falls back to polling /sobjects/Order/updated/ with datetime ranges where CDC is not subscribed or for initial sync. When an event arrives, ml-connector extracts the account name and order total, looks up the matching TallyPrime Ledger Group by name, and if found, posts a Sales Voucher into TallyPrime with the invoice date, amount, and cost center. The TALLYREQUEST Import Data action is used for writes; duplicate calls are prevented by storing the Salesforce Order ID in the Voucher reference field and comparing against prior imports. Because TallyPrime is single-user and runs on Windows, requests are serialized to avoid race conditions. Polling intervals are set to 15-minute defaults but can be tuned based on your business cycle. Every record carries the Salesforce source ID and timestamp in the audit trail so invoice records can be matched and replayed if a downstream write fails.

A real-world example

A mid-market B2B software company in India runs TallyPrime for accounting and GST compliance, and Salesforce for their global customer pipeline and orders. Before the integration, the accounting team received order-to-invoice data from Salesforce, manually created Ledger Groups for new customers, and hand-entered invoices into TallyPrime, risking keying errors and reconciliation delays. With TallyPrime and Salesforce connected, new customer Accounts in Salesforce automatically sync to TallyPrime Ledger Groups, and when Salesforce invoices an order, the Sales Voucher posts into TallyPrime the same day, with the customer group and amount already in place. Month-end reconciliation now starts with Salesforce orders already journalized in TallyPrime, and the manual data entry step is eliminated.

What you can do

  • Sync Salesforce Accounts into TallyPrime Ledger Groups so every customer in Salesforce has a matching account in TallyPrime.
  • Post Salesforce Orders and Invoices into TallyPrime as Sales Vouchers on a 15-minute polling schedule or real-time Change Data Capture push.
  • Map order totals and dates from Salesforce to TallyPrime voucher amounts and posting dates, allocated to the correct customer group.
  • Authenticate Salesforce with OAuth 2.0 Client Credentials and reach TallyPrime through a local agent on port 9000 without exposing the LAN server to the internet.
  • Prevent duplicate voucher creation by tracking Salesforce Order IDs and support replay on failure, with a complete audit trail per record.

Questions

How does ml-connector reach TallyPrime if it runs on a local machine behind a firewall?
ml-connector runs a local agent on the same Windows machine or LAN as the TallyPrime host. This agent reaches TallyPrime on port 9000 locally and connects outbound to the cloud connector, so you never expose TallyPrime's HTTP server to the internet. The agent authenticates with a simple token to prevent unauthorized local calls.
Does ml-connector support real-time sync or only polling?
ml-connector prefers Salesforce Change Data Capture on the Pub/Sub API for real-time events on Accounts and Orders, so new orders trigger voucher posts within seconds. If CDC is not subscribed, ml-connector falls back to polling /sobjects/Order/updated/ every 15 minutes. TallyPrime itself is polling-only since it has no webhooks.
What happens if a Salesforce Account name does not match any TallyPrime Ledger Group?
ml-connector skips posting the voucher and logs the mismatch in the audit trail. You can create the missing Ledger Group in TallyPrime and then re-trigger the flow to retry, or set up a pre-sync that creates default Ledger Groups in TallyPrime for new Salesforce Accounts before voucher posting begins.

Related integrations

Connect TallyPrime and Salesforce

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

Get started