Once you invoice a billing schedule its status changes from Pending Billing to Pending Invoiced or Invoiced. The status change depends upon whether the invoice is created with a Draft or Approved status.

The following table lists all the combinations of the actions and the status change that Conga Billing supports. 

ActionStatus Change 
From To
Auto Approved = TruePending Billing Invoiced
Auto Approved = FalsePending Billing Pending Invoiced
Approve InvoicePending InvoicedInvoiced
Cancel InvoicePending InvoicedPending Billing
Move to draftInvoicedPending Invoiced
Cancel buttonInvoicedPending Billing
(From Billing Plan)Pending MilestonePending Billing

The following table lists all the combinations of the actions (ABO operations such as Change or Termination)  and the status change that Conga Billing does NOT support. 

ActionStatus Change 
From To
AmendmentPending Billing Superseded
TerminationPending Billing Canceled
AmendmentPending InvoicedSuperseded
TerminationPending InvoicedCanceled
Termination on mid-date of InvoiceInvoicedInvoiced Canceled
TerminationInvoicedCanceled
  • For a wallet asset line item (WALI), when you run the API to update or change the status of a billing schedule from Invoiced to Pending Billing, then the API validates the billing schedule fee amount with respect to the wallet balance. If the validation passes, it executes the request otherwise displays a validation message if there is no sufficient available balance in the wallet.
  • If multiple billing schedule IDs belonging to the same WALI are passed then the validation is done by taking the sum of the fee amounts of all those billing schedules belonging to a single WALI.
  • If you pass multiple billing schedule IDs, the order of processing happens in the order of the IDs sent to the API. 

The following table lists the parameters of the API and the returned results.

ParametersResult
// Set Billing Schedule input parameters for Split Billing Schedule
List<Apttus_Billing.BillingScheduleChangeStatusWrapper> BillingScheduleChangeStatusInputs = new List<Apttus_Billing.BillingScheduleChangeStatusWrapper>();

// Add the first input
Id billingScheduleId1 = 'billing schedule ID'; // Replace this with the desired billing schedule Id 
String expectedStatus1 = 'Invoiced'; // Replace this with the desired status for the first input

BillingScheduleChangeStatusInputs.add(new Apttus_Billing.BillingScheduleChangeStatusWrapper(billingScheduleId1, expectedStatus1));

// Add the second input
Id billingScheduleId2 = 'billing schedule ID'; // Replace this with the desired billing schedule Id 
String expectedStatus2 = 'Invoiced'; // Replace this with the desired status for the second input

BillingScheduleChangeStatusInputs.add(new Apttus_Billing.BillingScheduleChangeStatusWrapper(billingScheduleId2, expectedStatus2));

// Add more inputs as needed

List<Apttus_Billing.BillingScheduleChangeStatusWrapper> actualChangeStatusResults = Apttus_Billing.BillingService.changeBillingScheduleStatus(BillingScheduleChangeStatusInputs);
System.debug('actualChangeStatusResults========================' + actualChangeStatusResults);
CODE

If you pass the list of wrappers as a parameter, the API changes the status of the billing schedules to the next higher or to the previous status.

Example:

Suppose you have defined a recurring asset line with the following information:

Selling Frequency: Yearly

Billing Frequency: Monthly

List Price: USD 1,200.00

Remaining Billable Amount (RBA): USD 1,200.00

12 billing schedules are generated with a Fee Amount of USD 100.00 and the status as Pending Billing.

When you execute the API the status of the billing schedules and the RBA changes as:

 IDCurrent StatusString expected statusResponseRBA
BS1 IDPending BillingInvoicedSuccessUSD 1,100.00
BS1 IDInvoicedPending InvoicedSuccessUSD 1,200.00
Set<Id> billingScheduleIds = new Set<Id>{'billing schedule 1 ID', 'billing schedule 2 ID'}; // Replace this with the desired billing schedule Id 
String expectedStatus = 'Invoiced'; // Replace this with the desired status for all the inputs

String result = Apttus_Billing.BillingService.changeBillingScheduleStatus(billingScheduleIds, expectedStatus);
System.debug(result);
CODE

If you pass a set of IDs as a parameter, the API performs bulk processing and changes the status of the billing schedules to the next higher or to the previous status.

Example:

Suppose you have defined a recurring asset line with the following information:

Selling Frequency: Yearly

Billing Frequency: Monthly

List Price: USD 1,200.00

Remaining Billable Amount (RBA): USD 1,200.00

12 billing schedules are generated with a Fee Amount of USD 100.00 and the status as Pending Billing.

When you execute the API, you get the following response:

IDCurrent StatusString expected statusResponse
BS1 ID, BS2 ID, BS3 IDPending BillingInvoicedSuccess
BS1 ID, BS2 ID, BS3 IDPending BillingPending BillingError Message