Forecast Billing Schedules API is used to generate and display forecast billing schedules for a Quote/Proposal or an Order. This API accepts the proposal ID or the Oder ID as input parameter and returns the list of forecast billing schedules. 

APISignature
retrieveForecastedBillingSchedulesstatic List retrieveForecastedBillingSchedules(Id objectId)

Forecast Billing Schedules API is used to generate and display forecast billing schedules for a Quote/Proposal or an Order. This API can also be invoked by the implementation team on acceptance of the quote/proposal. 

If the forecast billing schedules are already generated for the given proposal and no changes are made to the product configurations, the API displays the existing forecast billing schedules. If you perform any asset-based operations or change the product configuration, the generated forecast billing schedules are deleted and new forecast billing schedules are generated to reflect the changes made to the product or the asset. 

Forecast billing schedule functionality is not supported for:

  • 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.

 If the Forecasted Billing Schedules have already been created and are "current" then return the existing
 * Forecasted Billing Schedules, otherwise delete the existing "out of sync" Forecasted Billing Schedules and to
 * the following.
 *
 *  For each Line Item in the "active" Product Configuration create an in-memory Order Line Item (and other
 * relevant in-memory objects) and call the BSM (Billing Schedule Manager) to generate the resultant set of 
 * _forecasted_ Billing Schedules.  When finished persist the aggregate list of Forecasted Billing Schedules and
 * and return them
 *
 * @param ProposalId The Id of the Proposal (Quote) to persist and retrieve Forecasted Billing Schedules for.
 *  
 * @return The list of persisted Forecasted Billing Schedules, which will be sorted by "Ready for Invoice Date".
 */
 global static List<ForecastedBillingSchedule__c> retrieveForecastedBillingSchedules(ID ProposalId );
CODE