---
id: CAP-ACC-BAT-009
title: Configure recurring batch streams
feature: FEAT-ACC-BAT-02
product_area: accounting
module: batches
revision: 1
status: draft
product_intent: proposed
implementation_evidence: observed
supersedes:
- inventory CAP-ACC-BAT-006
- inventory RUL-ACC-BAT-041
- inventory RUL-ACC-BAT-043
- inventory RUL-ACC-BAT-044
- journey ACT-ACC-0514
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
intent_sources: []
purpose: Administrators establish repeatable streams of batches for routine financial work.
outcomes:
- Administrators can maintain recurring intake configuration and see whether initial intake is available.
concepts:
- CON-ACC-BAT-001
actors:
- ACT-ACC-006
- ACT-ACC-007
surfaces:
- console
- api
permissions:
- key: accounting.recurring-batches.read
  where_checked: api
  scope: tenant
- key: accounting.recurring-batches.create
  where_checked: api
  scope: tenant
- key: accounting.recurring-batches.update
  where_checked: api
  scope: tenant
- key: accounting.recurring-batches.delete
  where_checked: api
  scope: tenant
- key: accounting.application.access
  where_checked: api
  scope: tenant
rules:
- id: BR-CAP-ACC-BAT-009-01
  proved_by: [ATS-ACC-BAT-009-01, TST-ACC-BAT-061, TST-ACC-BAT-066]
  statement: A recurring configuration retains its original business unit and schedule identity.
  kind: invariant
  enforced_at:
  - service
  - database
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers 409 to a change of
    business unit
  origin: none
- id: BR-CAP-ACC-BAT-009-02
  proved_by: [ATS-ACC-BAT-009-02, TST-ACC-BAT-061, TST-ACC-BAT-089]
  statement: Creating recurring configuration requires a unit, name, batch-name template and schedule, derives an
    omitted reference from the name and refuses a reference already in use.
  kind: validation
  enforced_at:
  - api
  - service
  - database
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers 400 naming schedule
    to a body without one
  origin: none
- id: BR-CAP-ACC-BAT-009-03
  proved_by: [ATS-ACC-BAT-009-03, TST-ACC-BAT-061, TST-ACC-BAT-089]
  statement: A recurring schedule cannot roll more frequently than once per twenty-four hours.
  kind: validation
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers 400 to a schedule
    that would run more often than once a day
  origin: none
- id: BR-CAP-ACC-BAT-009-04
  proved_by: [ATS-ACC-BAT-009-04, TST-ACC-BAT-061, TST-ACC-BAT-131]
  statement: Name and code templates can read only batch date, unit and currency plus the recurring configuration’s
    reference and name, rejecting invalid templates or unknown variables.
  kind: validation
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers 400 naming batch_code_template
    to a template using a variable a batch template does not provide
  origin: none
- id: BR-CAP-ACC-BAT-009-05
  proved_by: []
  statement: An omitted schedule zone defaults to the workspace zone, and reads expose the next occurrence, schedule
    description, latest run and any pause reason.
  kind: calculation
  enforced_at:
  - service
  must_prove: false
  provenance: test
  source: services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers every field as written,
    the schedule in the tenant’s zone, its next run and its sentence, and no last run
  origin: none
- id: BR-CAP-ACC-BAT-009-06
  proved_by: [ATS-ACC-BAT-006-08, ATS-ACC-BAT-009-05, ATS-ACC-BAT-009-13, ATS-ACC-BAT-009-16, ATS-ACC-BAT-013-20, TST-ACC-BAT-060, TST-ACC-BAT-116]
  statement: Active creation and reactivation attempt the first batch immediately, while a refused first-batch plan
    leaves the configuration saved with its explanation.
  kind: lifecycle
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/roll/batch-roller.integration.spec.js#saves
    a recurring batch whose first batch is refused, with the refusal and no batch
  origin: none
- id: BR-CAP-ACC-BAT-009-07
  proved_by: [ATS-ACC-BAT-009-06, ATS-ACC-BAT-009-14, ATS-ACC-BAT-010-11, TST-ACC-BAT-061, TST-ACC-BAT-089]
  statement: Deactivation disables future rolls without closing the existing active batch, and reactivation enables
    scheduling and clears its pause.
  kind: lifecycle
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers no next run once deactivated
  origin: none
- id: BR-CAP-ACC-BAT-009-08
  proved_by: [ATS-ACC-BAT-009-07, TST-ACC-BAT-061]
  statement: Replacement requires the saved version, rejects missing or stale versions and recomputes the next occurrence
    from the save time.
  kind: validation
  enforced_at:
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers 409 StaleObject to
    a replacement at the version first read
  origin: none
- id: BR-CAP-ACC-BAT-009-09
  proved_by: [ATS-ACC-BAT-009-08, ATS-ACC-BAT-009-15, ATS-ACC-BAT-011-12, TST-ACC-BAT-061, TST-ACC-BAT-089]
  statement: A default assignment or assignment rule referencing the recurring configuration prevents its deletion
    and identifies that reference.
  kind: invariant
  enforced_at:
  - service
  - database
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers 409 naming the settings
    and how they name it
  origin: none
- id: BR-CAP-ACC-BAT-009-10
  proved_by: [ATS-ACC-BAT-009-09, TST-ACC-BAT-089, TST-ACC-BAT-116]
  statement: Deletion removes the configuration’s schedule, runs and unused active batch, but refuses removal while
    another generated batch remains.
  kind: lifecycle
  enforced_at:
  - service
  - database
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/roll/batch-roller.integration.spec.js#takes
    its empty active batch with it
  origin: none
- id: BR-CAP-ACC-BAT-009-11
  proved_by: [ATS-ACC-BAT-009-10, TST-ACC-BAT-061]
  statement: A business unit cannot be deleted while recurring configurations still reference it.
  kind: invariant
  enforced_at:
  - database
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers 409 naming recurring
    batches
  origin: none
- id: BR-CAP-ACC-BAT-009-12
  proved_by: [ATS-ACC-BAT-009-11, TST-ACC-BAT-059]
  statement: Accounting access and read permission govern recurring records, history and preview, while create,
    replace and delete each require their administrator write permission.
  kind: permission
  enforced_at:
  - api
  - console
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/e2e/batches-security.e2e.spec.js#is refused the create 403 permission_missing
  origin: none
- id: BR-CAP-ACC-BAT-009-13
  proved_by: [ATS-ACC-BAT-009-17]
  statement: The recurring list sorts by name, supports unit, activity and name-or-reference search, and limits
    each page to two hundred records.
  kind: validation
  enforced_at:
  - api
  - service
  must_prove: true
  provenance: test
  source: services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers 400 to a limit above
    200
  origin: none
- id: BR-CAP-ACC-BAT-009-14
  proved_by: [ATS-ACC-BAT-009-12]
  statement: The documented renderer contract produces trimmed single-line names and codes within its subject limit
    of 998 characters.
  kind: validation
  enforced_at:
  - service
  must_prove: true
  provenance: documented
  source: services-accounting:modules/batches/services/rules/recurring-batch-rules.ts (renderer contract in file
    header)
  origin: none
  note: The module documents the imported renderer boundary; its library implementation is not pinned by this corpus.
scenarios:
- id: SC-CAP-ACC-BAT-009-01
  given: The unit’s calendar covers the current date.
  when: An administrator saves an active weekday card stream with a date-based batch name.
  then: Its first batch is Open and the recurring response describes the next run.
  provenance: test
  source: 'services-accounting:modules/batches/tests/e2e/batches.e2e.spec.js#answers the recurring batch’s first
    batch as its active batch: open, named for today, of the recurring batch'
- id: SC-CAP-ACC-BAT-009-02
  given: Two assignment rules reference the card stream.
  when: The administrator deletes that recurring configuration.
  then: The refusal identifies the rules and preserves the configuration and schedule.
  provenance: test
  source: services-accounting:modules/batches/tests/integration/services/persistence/recurring-batches.integration.spec.js#refuses
    409 for a recurring batch two rules name, listing their positions
edge_cases: []
constraints:
- Accounting scheduling owns occurrence claiming, stored runs and automatic pause.
depends_on: []
related:
- CAP-ACC-BAT-010
- CAP-ACC-BAT-011
- CAP-ACC-BAT-006
journeys:
- JNY-ACC-BAT-003
open_questions:
- OQ-ACC-BAT-002
evidence:
- 'Pinned services-accounting (f47cb263), examined sources: aws/api/recurring-batches.routes.ts (createRecurringBatch,
  listRecurringBatches, getRecurringBatch, updateRecurringBatch, deleteRecurringBatch), recurring-batches.schemas.ts,
  services/persistence/recurring-batches.ts, services/roll/first-batch.ts, services/rules/recurring-batch-rules.ts,
  db/recurring-batches.table.ts; tests e2e/recurring-batches.e2e.spec.js, e2e/batches-security.e2e.spec.js, e2e/batches.e2e.spec.js,
  integration/services/persistence/recurring-batches.integration.spec.js, recurring-batches.queries.integration.spec.js,
  integration/services/roll/batch-roller.integration.spec.js, integration/db/batches.table.integration.spec.js,
  unit/rules/recurring-batch-rules.spec.js; docs/accounting/recurring-batches.md.'
- 'Pinned react-console (baf6dae3), examined sources: components/configuration/recurring-batches/** (list, editor,
  template field, run history), lib/configuration/recurring-batches.ts, lib/configuration/areas.ts; journeys ACT-ACC-0510,
  0513, 0514.'
controls: [TC-IAM-001, TC-IAM-002, TC-IAM-004, TC-IAM-005, TC-IAM-006, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-005, TC-AZ-006, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-TEN-004, TC-DAT-001, TC-DAT-004, TC-LOG-001, TC-LOG-002, TC-LOG-003, TC-LOG-004, TC-LOG-005, TC-PI-001, TC-PI-002, TC-PI-003, TC-PI-005]
exercised_by: [FAS-ACC-BAT-02-01, FAS-ACC-BAT-02-02, FAS-ACC-BAT-02-03, FAS-ACC-BAT-02-04, FAS-ACC-BAT-02-05]
suites: [TST-ACC-BAT-059, TST-ACC-BAT-060, TST-ACC-BAT-061, TST-ACC-BAT-066, TST-ACC-BAT-089, TST-ACC-BAT-116, TST-ACC-BAT-131]
---

# Configure recurring batch streams

## Purpose

Administrators establish repeatable streams of batches for routine financial work.

## How It Works

An administrator names a stream, chooses its unit and defines the generated batch labels. They also select a schedule and review its next occurrence. Saving active configuration attempts to supply the first batch immediately. A refused first-batch plan is reported without discarding the configuration. Administrators can stop future rolls while preserving the current batch. Replacement and deletion check versions and dependencies before changing the setup.

## Relationships

- Related outcome: Advance a scheduled stream and post its predecessor, which addresses the connected batch work.
- Related outcome: Assign new documents to the appropriate batch stream, which addresses the connected batch work.
- Related outcome: Remove an unused batch safely, which addresses the connected batch work.
