ml-connector
TallyPrimeFedEx

TallyPrime and FedEx integration

TallyPrime keeps your accounting and inventory. FedEx moves your packages and freight. Connecting the two keeps your shipping records in sync with your AP ledger and stock movement. When you create a purchase order or sales dispatch in TallyPrime, ml-connector creates a shipment in FedEx. Tracking events flow back into TallyPrime vouchers so your ledger reflects real-time shipping status without manual re-entry. ml-connector handles TallyPrime's local-only HTTP server, FedEx OAuth2 authentication, rate limit backoff, and a full audit trail on every record.

How TallyPrime works

TallyPrime is a desktop accounting and ERP application used in India and Southeast Asia, installed locally on Windows machines. It exposes ledgers, groups, vouchers (purchase, sales, payment, receipt, purchase order), and stock items via XML or JSON over HTTP POST to a local port 9000. Authentication is optional at the transport layer but requires the company name and optional username/password if the company is password-protected. TallyPrime has no webhooks or event subscription, so connector access requires polling at 5-15 minute intervals. The application must be running and the target company must be open for API calls to succeed. Integration requires a local agent on the same LAN as the TallyPrime machine to bridge the cloud connector to port 9000, and port 9000 must be manually enabled in TallyPrime Settings.

How FedEx works

FedEx is a REST API platform for shipping, tracking, rates, freight, and international customs compliance. It exposes shipments, tracking events, rate quotes, LTL freight shipments, commercial invoices, addresses, and pickups. All requests use OAuth2 client credentials (API Key and API Secret) and bearer token authorization. FedEx offers paid webhooks (Advanced Integrated Visibility) for tracking push events, and free polling via the Track API for historical and in-transit tracking. Track API accepts up to 30 tracking numbers per request. FedEx does not provide a freight invoice REST API (invoices are managed through the Billing Online web portal), and PO references must be matched via the Track API since FedEx stores no PO master data. API rate limits are 1,400 transactions per 10 seconds per project and 3 tokens per second at the IP level.

What moves between them

Shipment records flow from TallyPrime into FedEx. When a purchase order or sales dispatch voucher is created in TallyPrime, ml-connector reads it on each poll cycle, creates a corresponding FedEx shipment, and captures the FedEx shipment ID. Tracking events are then polled from FedEx and written back into TallyPrime as payment or receipt vouchers linked to the original PO, capturing status, carrier name, and current location. The main cadence is tied to your business processes: PO creation in TallyPrime triggers shipment creation in FedEx within the next polling window (5-15 minutes), and tracking updates flow back at the same interval. Reference data such as customer addresses and FedEx account number are stored encrypted and validated on each call.

How ml-connector handles it

ml-connector stores TallyPrime company name, username, and password encrypted, and uses a local agent to reach TallyPrime's port 9000 on the LAN. It polls TallyPrime's Day Book and stock item exports on a 5-15 minute schedule, filters for new shipment vouchers by date range (SVFROMDATE, SVTODATE), and batches them for FedEx. On the FedEx side it exchanges OAuth2 credentials for a bearer token (cached with 1-hour TTL to respect rate limits), creates shipments via the Ship API, and stores the shipment ID in TallyPrime as a reference field. Tracking is polled from the Track API with the stored shipment IDs, and events are written back into TallyPrime via Alter (update) or Import (create) depending on whether the tracking record exists. FedEx rate limits are managed with exponential backoff and a 10-minute cooldown on 429 responses. Because TallyPrime is single-user and has no native idempotency, ml-connector deduplicates by checking for existing shipment references before importing duplicates. Every record carries a timestamp and audit trail for replay if a downstream call fails.

A real-world example

A mid-sized distributor in India runs TallyPrime for accounting and inventory, and ships via FedEx across the region. Before the integration, the warehouse team created shipments in FedEx manually after printing dispatch slips from TallyPrime, then forwarded tracking numbers back to accounting for manual entry into payment receipts. Reconciling AP with actual shipment status took hours each week. With TallyPrime and FedEx connected, dispatch vouchers in TallyPrime automatically trigger FedEx shipments with the correct account number and customer address. Tracking updates populate payment vouchers automatically, so the finance team can see which shipments have been delivered and reconcile invoices without re-keying, saving 4-5 hours per week during month-end close.

What you can do

  • Create FedEx shipments automatically when purchase orders and sales dispatches are recorded in TallyPrime.
  • Sync FedEx tracking events back into TallyPrime as payment and receipt vouchers, matched to the original PO.
  • Store FedEx OAuth2 credentials and account numbers encrypted, refreshing tokens on each API call within rate limits.
  • Poll TallyPrime on a 5-15 minute schedule via local agent, with exponential backoff on FedEx rate limit responses.
  • Maintain a full audit trail of every shipment and tracking record, with replay capability if a downstream write fails.

Questions

Does ml-connector require a local agent to reach TallyPrime?
Yes. TallyPrime runs on a local Windows machine and exposes port 9000 only to the LAN. ml-connector requires a local agent running on the same network or machine to bridge the cloud connector to TallyPrime's HTTP server. Port 9000 must be manually enabled in TallyPrime Settings in the Advanced Configuration menu.
Can ml-connector create FedEx shipments without manually entering account numbers and customer addresses?
Yes. ml-connector stores your FedEx account number and decrypts it on each request. Customer shipping addresses are read from the TallyPrime voucher (via the Group and Ledger entities) and validated against FedEx address data. If an address fails validation, ml-connector logs the error and does not create the shipment, allowing you to correct the address in TallyPrime and retry.
How are FedEx tracking events matched back to TallyPrime purchase orders?
ml-connector stores the FedEx shipment ID in TallyPrime as a reference field on the dispatch voucher. When tracking events are polled from FedEx, the shipment ID is used to look up the corresponding TallyPrime voucher. Tracking status is written back as a new payment or receipt voucher linked to the original PO, creating an audit trail in TallyPrime's ledger.

Related integrations

Connect TallyPrime and FedEx

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

Get started