ml-connector
TallyPrimeTwilio

TallyPrime and Twilio integration

TallyPrime runs accounting and inventory across small and mid-sized businesses in India and Southeast Asia. Twilio sends transactional SMS and voice notifications. Connecting the two keeps customers informed about transactions without manual outreach. Invoice due-date reminders, payment confirmations, and delivery notifications flow from TallyPrime into customer SMS inboxes via Twilio. ml-connector polls TallyPrime's local API and sends notifications on a schedule you control.

How TallyPrime works

TallyPrime is a locally-installed accounting and ERP application that exposes ledgers, voucher records (sales, purchases, payments, receipts, purchase orders), groups, and stock items through a local HTTP server on port 9000. The API accepts XML or JSON request envelopes via POST to a single endpoint; all operations are controlled by the TALLYREQUEST envelope field (Export Data for read, Import Data for write). Authentication requires only the local company name and optional password if the company is protected. TallyPrime publishes no native webhooks, so polling is the only option for reading new transactions.

How Twilio works

Twilio exposes SMS messaging, voice calls, 2FA verification, and phone lookups through REST APIs with multiple base URLs per service. Every request authenticates with HTTP Basic Auth using either Account SID and Auth Token, or API Key credentials. Twilio delivers webhooks for incoming messages, status callbacks (sent, delivered, failed, read), and call events, but since TallyPrime cannot receive inbound webhooks, ml-connector uses Twilio's REST endpoint to send outbound SMS. Twilio expects application/x-www-form-urlencoded request bodies and validates webhook signatures with HMAC-SHA1.

What moves between them

Transactions flow one direction: from TallyPrime to Twilio. ml-connector polls TallyPrime's Day Book or voucher collections on a schedule, extracts purchase and sales vouchers, and sends SMS notifications to customer phone numbers stored in TallyPrime ledgers. Payment reminders go out when invoice due dates approach. Each SMS is sent via Twilio's REST API, which returns a message SID for audit logging. Because TallyPrime is read-only in this flow, ml-connector never writes back to TallyPrime.

How ml-connector handles it

ml-connector requires a local agent running on the same machine or network segment as TallyPrime to bridge requests to port 9000, since TallyPrime's HTTP server is LAN-only and not internet-accessible. It polls TallyPrime's Export Data endpoint with date-range filters (SVFROMDATE, SVTODATE) and compares returned voucher IDs against last-seen state to detect new transactions. Phone numbers are extracted from ledger master records in TallyPrime. For each new invoice or payment, ml-connector constructs the SMS text, calls Twilio's REST API with the Account SID and Auth Token, and logs the returned message SID to the audit trail. Twilio's 2FA and Verify endpoints can also send one-time codes to customers for payment confirmation. TallyPrime's single-user desktop design means concurrent requests may cause inconsistent behavior, so ml-connector keeps all polling sequential and respects the practical 5-15 minute polling window.

A real-world example

A mid-market retail and wholesale business in India runs TallyPrime for accounting and inventory across three branch offices. When invoices are issued, the accounting manager manually sends SMS reminders to wholesale customers reminding them when payment is due; when payments arrive, he sends confirmation texts one by one. With TallyPrime and Twilio connected, each new sales voucher triggers an automatic SMS to the customer with invoice number, amount due, and due date. When a payment voucher posts, a confirmation SMS goes out immediately. The manager no longer spends 30 minutes per day on manual SMS; customers get instant notifications and payment reminders are consistent.

What you can do

  • Send SMS notifications from TallyPrime when sales and purchase vouchers post, with invoice number, amount, and due date.
  • Automatically send payment due-date reminders to customers stored in TallyPrime ledger master records.
  • Validate Twilio webhook signatures and receive inbound message status callbacks for delivery tracking and failed-SMS alerts.
  • Bridge TallyPrime's local HTTP server through a managed local agent so cloud Twilio can reach it securely.
  • Poll TallyPrime sequentially on a configurable schedule with full audit logging of every voucher ID and message SID.

Questions

Does ml-connector need a local agent to reach TallyPrime?
Yes. TallyPrime's HTTP server runs only on port 9000 and is LAN-accessible, not internet-facing. ml-connector requires a local agent running on the same machine or network as TallyPrime to bridge API calls to it. This agent is lightweight and runs continuously.
Which phone numbers get SMS notifications, and where do they come from?
Phone numbers are stored in TallyPrime ledger master records (customer ledgers). ml-connector reads these during polling and uses them as the SMS destination. If a customer ledger has no phone number, no SMS is sent for that transaction. You control which ledgers receive notifications through a mapping configuration.
What happens if Twilio SMS fails or TallyPrime is unavailable during a poll?
ml-connector logs the failure with the voucher ID and message SID to the audit trail and retries the SMS on the next poll cycle. If TallyPrime is offline, polling pauses and resumes when the application is available again. Every attempted record is logged so you can see exactly what succeeded and what failed.

Related integrations

Connect TallyPrime and Twilio

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

Get started