Perform Billing and Invoicing Process
The billing and invoicing process is a sequence of activities that are performed to bill and invoice accounts. The process is initiated by closing the billing period, followed by scheduling accounts for billing, performing billing, fixing billing errors, and finalizing billing.
Following State Diagram shows the sequence of activities in the billing and invoicing process:
Close the Billing Period
This operation can be performed either via GUI or REST API.
-
GUI: Switch to
Operations
perspective and navigate to , then select the detail ofBilling Cycle Run
and chooseClose Billing Cycle
. -
REST API: Use the endpoint
/operations/rm/close-bill-cycle-run
.
The asynchronous process PerformBillCycleCloseAsyncProcess
is started to close the billing period. The outcome of this activity is that the Bill Cycle Status of the Bill Cycle Run is set to CLOSED
. From this time onwards, new events cannot be added to this period and will be added to the nearest open billing period.
This operation is described in perform-bill-cycle-close.adoc use-case.
|
Schedule Accounts for Billing
This operation can be performed either via GUI or REST API.
-
GUI: Switch to
Operations
perspective and navigate to , then select the detail ofBilling Cycle Run
and chooseSchedule Billing Cycle
. -
REST API: Use the endpoint
/operations/rm/schedule-bill-cycle-run
.
The asynchronous process PerformBillCycleScheduleAsyncProcess
is started to schedule the billing process for all accounts in the billing cycle. The outcome of this activity is:
-
Bill Cycle Status is set to
IN_PROGRESS
. -
A new entry is created for each account in the table
Account Bill Cycle Run
, and theAccount Semaphore
is set toSCHEDULED
.
This operation can be repeated.
This operation is described in perform-bill-cycle-schedule.adoc use-case.
|
Perform Billing
This operation can be performed either via GUI or REST API.
-
GUI: Switch to
Operations
perspective and navigate to , then select the detail ofBilling Cycle Run
and choosePerform Billing Cycle
. -
REST API: Use the endpoint
/operations/rm/perform-bill-cycle-run
.
The asynchronous process PerformBillCycleRunAsyncProcess
is started to perform billing for all accounts previously scheduled. For each account, the asynchronous process CreateOcsInvoiceAsyncProcess
is started with the parameter BC_RUN
.
During the processing of this activity, the Account Semaphore
may be set to the following values:
-
WAITING
- Transition state fromPerformBillCycleRunAsyncProcess
toCreateOcsInvoiceAsyncProcess
. -
BILLING_STARTED
- Billing for the account has started. -
BILLING_FINISHED
- Billing for the account has finished. -
INVOICING_STARTED
- Invoicing for the account has started. -
INVOICING_FINISHED
- Invoicing for the account has finished. -
FORMATTING_STARTED
- Formatting of the invoice for the account has started. -
FORMATTING_FINISHED
- Formatting of the invoice for the account has finished.
The outcome of this activity is that the Account Semaphore
is set to one of the following values:
-
INVOICE_CREATED
- Invoice for the account has been created. -
INVOICE_NOT_GENERATED
- Invoice for the account has not been generated; it was discarded for various reasons, which are stored inAccount Bill Cycle Run
, attributereason
. -
INVOICE_ERROR
- An error occurred during invoice generation; the error is stored inAccount Bill Cycle Run
, attributereason
.
This operation can be repeated.
This operation is described in perform-bill-cycle-run.adoc use-case.
|
Fix Billing Errors
This operation can be performed either via GUI or REST API.
-
GUI: Switch to
Operations
perspective and navigate to , then select the detail ofBilling Cycle Run
and chooseFix Errors
. -
REST API: Use the endpoint
/operations/rm/fix-bill-cycle-run
.
The asynchronous process PerformBillCycleFixErrorsAsyncProcess
is started to fix billing errors for all erroneous accounts in the billing cycle. For each erroneous account, the asynchronous process CreateOcsInvoiceAsyncProcess
is started with the parameter FIX_ERRORS
.
During the processing of this activity, the Account Semaphore
may be set to the following values:
-
WAITING
- Transition state fromPerformBillCycleFixErrorsAsyncProcess
toCreateOcsInvoiceAsyncProcess
. -
BILLING_STARTED
- Billing for the account has started. -
BILLING_FINISHED
- Billing for the account has finished. -
INVOICING_STARTED
- Invoicing for the account has started. -
INVOICING_FINISHED
- Invoicing for the account has finished. -
FORMATTING_STARTED
- Formatting of the invoice for the account has started. -
FORMATTING_FINISHED
- Formatting of the invoice for the account has finished.
The outcome of this activity is that the Account Semaphore
is set to one of the following values:
-
INVOICE_CREATED
- Invoice for the account has been created. -
INVOICE_NOT_GENERATED
- Invoice for the account has not been generated; it was discarded for various reasons, which are stored inAccount Bill Cycle Run
, attributereason
. -
INVOICE_ERROR
- An error occurred during invoice generation; the error is stored inAccount Bill Cycle Run
, attributereason
.
This operation can be repeated.
This operation is described in perform-fix-errors.adoc use-case.
|
Finalize Billing
This operation can be performed either via GUI or REST API.
-
GUI: Switch to
Operations
perspective and navigate to , then select the detail ofBilling Cycle Run
and chooseFinalize Billing Cycle
. -
REST API: Use the endpoint
/operations/rm/finalize-bill-cycle-run
.
The asynchronous process PerformBillCycleFinalizeAsyncProcess
is started to finalize the billing period. The outcome of this activity is that the Bill Cycle Status of the Bill Cycle Run is set to FINISHED
. After this operation, post-billing activities like exporting the GL Feed to the financial system may be started.
This operation is described in perform-bill-cycle-finalize.adoc use-case.
|