State Lifecycle
In the OCS.io solution, several entities have a state lifecycle, including the Customer, Account, Subscriber, and Subscription. Each of these entities has its own state lifecycle and can be in one of several states, such as Inactive, Active, Suspended, or Deactivated. The change of state for each entity is typically triggered from an external system, such as a CRM or Ordering system, depending on the business logic.
In addition to the states, OCS.io also supports configuring various State Reasons for each State. These reasons provide additional information about why an entity is in a particular state, and can be helpful for troubleshooting or reporting purposes. For example, if the state of an account is Suspended, the configurable state reasons could include reasons such as Non-Payment, Fraud, or Customer Request.
However, it’s important to note that states within OCS.io are not just static; they can also be in a Pending state. The Pending state signifies that a change in state is anticipated, but there is still uncertainty about whether that change will occur. In such cases, the system needs to be informed of the planned change.
Inactive
The Inactive state is the optional state for new entities. When an entity is in the Inactive state, it is not eligible for any services or billing. It means that the entity is created in the system, but it is not yet available for use. Once the entity is activated, it moves to the Active state.
Active
The Active state is the typical stated and indicates that the entity is fully operational and eligible for services and billing. For example, a Customer in the Active state can use services and be billed accordingly. An Account in the Active state can be charged for the services used by the Subscribers linked to it. A Subscriber in the Active state can use the services provided by the account to which it is linked.
Suspended
The Suspended state is used to temporarily restrict the entity’s access to services. When an entity is in the Suspended state, it is not eligible for any services or billing. However, the entity is still present in the system, and it can be reactivated later. For example, if a Account does not pay their bill on time, the Account can be suspended until the payment is received.
Deactivated
The Deactivated state is used to permanently disable the entity. When an entity is in the Deactivated state, it is no longer eligible for services or billing. It means that the entity is removed from the system (not physically, but logically), and it cannot be reactivated. For example, if a Customer decides to terminate their subscription, the Customer can be deactivated.
Pending
The Pending state serves as an intermediate status that indicates an anticipated change in the entity’s state. It implies that a transition is expected, but there might still be uncertainty or validation processes pending before the change becomes official. During the Pending state, the system remains attentive to upcoming alterations while ensuring that any necessary preparations or notifications are in place.
For more information how Pending is handled within the system, refer to Pending State Management chapter.