tally_alter_master
Modify existing TallyPrime masters (groups, cost centres, stock items, etc.) by renaming, moving under a new parent, or updating fields. Preview changes before confirming.
Instructions
Change an EXISTING group, cost centre, unit, stock group, godown, stock item, voucher type or budget in TallyPrime: rename it, move it under another parent, or update the fields its kind takes (see tally_create_master). Only the fields you give change. Units cannot be renamed. For ledgers use tally_alter_ledger.
Moving a group moves every ledger under it to the new place in the balance sheet or P&L.
WRITES TO TALLYPRIME, in two steps. This call only PREVIEWS: it checks the change against the live books and returns exactly what would be written plus a confirmToken — nothing is changed. Show the preview to the user, and only after they approve it call tally_confirm_write with the token. Never confirm on your own initiative, and never confirm a preview the user has not seen.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | group, costCentre, unit, stockGroup, godown, stockItem, voucherType or budget. (Ledgers have their own tools.) | |
| name | Yes | The master to change, by its current name. | |
| parent | No | group: parent group (required). costCentre: parent cost centre. stockGroup: parent stock group. godown: parent godown. stockItem: its stock group. voucherType: the type it is based on, e.g. "Sales" or "Journal" (required). budget: parent budget. Empty for top level. | |
| company | No | Company name. Omit to use whichever company TallyPrime has loaded. If given and it is not the loaded one, the call fails with TALLY_COMPANY_NOT_LOADED rather than returning another company's data. | |
| newName | No | Rename it to this. | |
| category | No | costCentre only: its cost category. | |
| baseUnits | No | stockItem only: unit symbol, e.g. "kg". Required on create. | |
| formalName | No | unit only: full name, e.g. "Kilograms". | |
| openingRate | No | stockItem only: opening rate per base unit. | |
| decimalPlaces | No | unit only: decimal places for quantities. | |
| numberingMethod | No | voucherType only: number vouchers automatically or by hand. | |
| openingQuantity | No | stockItem only: opening quantity in its base unit. |