create_vouchers_batch
Post hundreds of Tally vouchers in one batch call, split into chunks with automatic verification of which vouchers actually landed. Retry only the unconfirmed ones, avoiding duplicates after timeouts or errors.
Instructions
Post many vouchers (Journal, Payment, Receipt, etc. — same shape as create_voucher, one entry per voucher) in one call, for bulk work where posting one at a time is impractical (e.g. hundreds of balance-confirmation adjustment journals). Internally splits into chunks (default 10, max 50 — Tally's own gateway has a 10-second timeout per request, and a bigger single import risks silently exceeding it) and, after each chunk posts, runs ONE bulk query to confirm exactly which vouchers in that chunk actually exist in Tally now — this always runs, even if the post itself errored or timed out, because a client-side timeout does not mean Tally didn't still create some or all of them server-side; retrying without checking first risks posting duplicates. Verification matches each voucher back by (voucherType, narration) — NOT voucherNumber, confirmed live to be unreliable even when set explicitly (Tally silently reassigned its own auto-series number instead for a Journal voucher); reference was tried next and also came back empty on read. narration is what's confirmed live to persist exactly as sent, so it's REQUIRED and must be non-empty on every voucher, and must be unique per voucherType across the whole batch — two vouchers sharing the same (voucherType, narration) can't be told apart afterward and are rejected up front as invalid rather than silently mismatched (e.g. embed each row's own reference/id in the narration text). The result names exactly which vouchers were confirmed and which were not, per chunk, so a partial failure can be retried by resending only the ones that didn't land — never blindly resend the whole batch. Does not go through preview_write/confirm_write given the scale involved; sending a small batch (2-3 vouchers) first to confirm shape/ledger names before a large run is recommended.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vouchers | Yes | One entry per voucher, same fields as create_voucher — narration is required here and must be unique per voucherType across the batch (see the tool description). | |
| chunkSize | No | Vouchers per internal request. Defaults to 10. Keep at or below 50 — Tally's gateway has a 10-second timeout per request and larger imports take proportionally longer server-side. |