Skip to main content
Version: 2.4

Billing Cycles

Billing cycles control when invoices are generated and which service-history period is billed. In basic tSM billing, cycle execution is typically monthly, but configuration also supports quarterly and yearly frequencies.

This document provides business context first and then full field-level references for cycle entities.


1. Business Meaning

1.1 What a Billing Cycle Represents

BillingCycle is one concrete billing run period. It defines the billed interval (periodFrom, periodTo), execution dates, and current lifecycle status.

In practical operation, one billing cycle is used to:

  • collect active services and relevant historical changes in the period,
  • calculate monthly recurring charges and prorated values,
  • produce billing documents linked to this cycle.

1.2 What a Billing Cycle Type Represents

BillingCycleType defines how cycles should be generated and scheduled (automatic/manual behavior, billing day, frequency). It is reusable configuration for many cycle instances.

1.3 Status Governance

Status governance is split into:

  • a code-table entity BillingCycleStatus used for configuration and localization,
  • a value enum BillingCycleStatus (ACTIVE, BILLED, TO_BE_BILLED) used by runtime logic.

1.4 Typical Cycle Flow

  1. Configure cycle type (BillingCycleType) with frequency and billing day.
  2. Open a cycle (BillingCycle) for a concrete period.
  3. Compute charges for active services and history in the period.
  4. Apply prorate when service activity covers only part of the cycle.
  5. Generate billing documents and move cycle status to billed.

2. Entity Reference: BillingCycle (BillingCycle)

FieldTypeRequiredRead-onlyDescription
idUUIDNoNoCycle primary key.
codeStringYesNoTechnical/business cycle code.
nameStringYesNoDisplay name.
validityFromDateNoNoDeprecated validity start. Use periodFrom.
validityToDateNoNoDeprecated validity end. Use periodTo.
descriptionStringNoNoOptional description.
localizationDataLocalizationDataNoNoLocalization payload for label fields.
configMap<String, Any?>NoNoAdditional configuration payload.
billingDateDateNoNoBilling execution date.
billingEndDateNoNoBilling end date marker.
billingStartDateNoNoBilling start date marker.
dataTagsList<String>NoNoOptional labels/tags.
billingCycleStatusStringNoNoFK code to cycle status registry (BillingCycleStatus.code).
billingCycleTypeStringYesNoFK code to cycle type registry (BillingCycleType.code).
periodFromDateYesNoStart of relevant billed period.
periodToDateYesNoEnd of relevant billed period.
charsTsmCharsNoNoDynamic cycle attributes.

2.1 Practical Notes

  • Use periodFrom and periodTo as authoritative billing-period boundaries.
  • validityFrom/validityTo remain only for compatibility with shared code-table interfaces.
  • Status and period should always be evaluated together during cycle execution.

3. Entity Reference: BillingCycleType (BillingCycleType)

FieldTypeRequiredRead-onlyDescription
idUUIDNoNoCycle type primary key.
codeStringYesNoTechnical cycle type code.
nameStringYesNoDisplay name.
descriptionStringNoNoOptional description.
validityFromDateNoNoValidity start.
validityToDateNoNoValidity end.
localizationDataLocalizationDataNoNoLocalization payload.
dataTagsList<String>NoNoOptional labels/tags.
configMap<String, Any?>NoNoAdditional configuration payload.
automaticallyBooleanNoNoIf true, customer billing is triggered automatically by schedule.
billingDateIntNoNoOrdinal day in selected frequency period (for example day in month).
managerReportDateIntNoNoDay in month when manager report should be generated.
billingFrequencyBillingFrequencyYesNoBilling recurrence frequency.
durationIntNoNoOptional cycle duration value.
mnemonicCodeStringNoNoOptional mnemonic code.

4. Entity Reference: BillingCycleStatus (BillingCycleStatus)

FieldTypeRequiredRead-onlyDescription
idUUIDNoNoStatus primary key.
codeStringYesNoTechnical status code.
nameStringYesNoDisplay name.
validityFromDateNoNoValidity start.
validityToDateNoNoValidity end.
descriptionStringNoNoOptional status description.
localizationDataLocalizationDataNoNoLocalization payload.
dataTagsList<String>NoNoOptional labels/tags.
configMap<String, Any?>NoNoAdditional configuration payload.

5. Enum Reference: BillingFrequency (BillingFrequency)

ValueMeaning
MONTHLYMonthly cycle cadence (most common for basic recurring invoicing).
QUARTERLYQuarterly cycle cadence.
YEARLYYearly cycle cadence.

6. Enum Reference: BillingCycleStatus (BillingCycleStatus)

ValueMeaning
ACTIVECycle is open/active for processing.
BILLEDCycle was billed and documents were generated.
TO_BE_BILLEDCycle is prepared and waiting for billing execution.