Generate and Retrieve Forecast Billing Schedules
retrieveForecastedBillingSchedules API generates and displays a list of forecasted billing schedules for a given Proposal (or Quote) or Order. You provide the Proposal ID (or Order ID) as the input, and it returns the forecasted billing schedules as a list of ForecastedBillingSchedule records.
| API | Signature |
|---|---|
| retrieveForecastedBillingSchedules | static List retrieveForecastedBillingSchedules(ID objectId) |
These schedules show how and when the customer will be invoiced for the products/services in the proposal/order.
- If forecast billing schedules already exist and are current (no changes to product configuration), it returns the existing schedules.
- If there are changes (like asset-based operations or product config updates), it deletes the old schedules and generates new ones to reflect the latest configuration.
- The returned list is sorted by Ready for Invoice Date.
- Evergreen products
- Quote/Proposal associated with a billing plan
- Informational line items of bundle and option products
|
Request | |||
|---|---|---|---|
|
Field |
Type |
Required? |
Description |
|
OjbectID |
ID |
Yes |
The proposal ID or the object ID. |
|
Response | ||
|---|---|---|
|
Field |
Type |
Description |
|
forecastedbillingschedules |
List |
List of forecast billing schedules generated for the given ID. |
Code Sample - Request
List<Apttus_Billing__ForecastedBillingSchedule__c> retrieveForecastedBillingSchedules =
Apttus_Billing.ForecastBillingService.retrieveForecastedBillingSchedules('a0YDc000002fEMJMA2'); //ID ProposalId
System.debug('--retrieveForecastedBillingSchedules--'+retrieveForecastedBillingSchedules);Code Sample - Response
19:26:55:964 USER_DEBUG [4]|DEBUG|--retrieveForecastedBillingSchedules--(Apttus_Billing__ForecastedBillingSchedule__c:{Apttus_Billing__BillingDayOfMonth__c=1, Apttus_Billing__BillingRule__c=Bill In Advance, Apttus_Billing__BillToAccountId__c=001Dc00000zpwuzIAA, Apttus_Billing__Description__c=null, Apttus_Billing__FeeAmount__c=100.00000, Apttus_Billing__HideInvoiceDisplay__c=false, Apttus_Billing__InvoicedScheduleId__c=null, Apttus_Billing__IsSuperseded__c=false, Apttus_Billing__LineItemId__c=a13Dc000003kjitIAA, Apttus_Billing__Loc