create_ledger
Create new ledgers in TallyPrime or update existing ones by passing the old name, with support for parent group, contact details, credit limits, and opening balance.
Instructions
Create a new ledger (account) in TallyPrime, or rename/update an existing one by passing oldName
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trn | No | Tax Registration Number (UAE VAT TRN) for this party ledger, e.g. '100326595400003'. | |
| name | Yes | Name of the new ledger, or the new name when renaming an existing one | |
| No | Contact email for this ledger. | ||
| phone | No | Landline phone number for this ledger. | |
| state | No | State/Emirate, e.g. 'Dubai'. Plain free text — Tally does not validate this against a master list, so match this company's existing convention (check get_company_info or an existing ledger) rather than a formal name. | |
| mobile | No | Mobile number for this ledger. | |
| parent | Yes | Parent group, e.g. 'Sundry Debtors', 'Sundry Creditors', 'Bank Accounts' | |
| address | No | Mailing address, one line per array entry (e.g. ['Office 12, Port Saeed', 'Deira']). | |
| country | No | Country, e.g. 'UAE'. Plain free text — Tally does not validate or normalize this (e.g. 'United Arab Emirates' is stored literally, not converted to 'UAE'), so match this company's existing convention (check get_company_info or an existing ledger) instead of guessing a formal name. | |
| oldName | No | Exact name of an existing ledger to alter/rename (optional). If provided, updates that ledger instead of creating a new one — pass the same value as 'name' to update parent/opening balance without renaming. | |
| pincode | No | Postal/PIN code (optional — omit for countries that don't use one). | |
| website | No | Website for this ledger. | |
| creditLimit | No | Credit limit amount for this party ledger. Setting this also enables 'override credit limit' so the limit actually takes effect. | |
| extraFields | No | Escape hatch for any other native Tally ledger field not covered above — pass exact Tally XML tag names as keys (e.g. {'LEDGERCONTACT': 'Ahmed'}). Not validated; use exact Tally field names from a master export. | |
| mailingName | No | Mailing name for the address, if different from the ledger name. | |
| openingBalance | No | Opening balance (optional, defaults to 0) | |
| billCreditPeriod | No | Credit period in days for bill-wise settlement. | |
| maintainBillWise | No | Enable bill-wise tracking on this ledger (required for create_voucher's Agst Ref / New Ref bill allocation to work). Almost always wanted for Sundry Debtors/Creditors party ledgers. Defaults to false/off. | |
| addressApplicableFrom | No | Date in DD-MM-YYYY format from which this address is effective. Required by Tally for the address to actually persist (it's a date-versioned list internally) — defaults to today if any address field is set and this is omitted. |