Creating Revenue Contracts Using the API

You can develop custom code to call the create method from the Revenue Contracts Service in the Revenue Management API. You can use this method to create new revenue contracts or update existing revenue contracts with performance obligations for the provided source records.

The method does the following:

  1. Creates a revenue contract, if it doesn't already exist.
  2. Creates performance obligations and performance obligation line items for the list of source records provided to the API and links them to the revenue contract.
  3. Populates fields on the performance obligations and their line items with the values from the source records.
  4. Allocates revenue for the revenue contract.
  5. Generates recognition schedules for the performance obligations linked to the contract.

Depending on the number of source records that you provide, the process executes synchronously or asynchronously. This depends on the value of the Manage RC Synchronous Limit custom setting field. When you create or update multiple revenue contracts at the same time, the process always runs asynchronously.

When the process executes asynchronously, the following custom setting fields control the results:

  • Manage RC - Send Email Notification (Revenue Management Batch Settings) determines whether you are notified by email when the process completes. This is selected by default, meaning that email notifications are sent.
  • Disable Generate Schedules for Contracts (Revenue Management Settings) determines whether recognition schedules are automatically generated. This is deselected by default, meaning that recognition schedules are automatically generated.

For more information about custom setting fields, see Managing Custom Settings.

When the process runs asynchronously, process run and process log records enable you to view the details of the execution. For more information, see Viewing Manage Revenue Contracts Process Runs.

For more information about the method, see "RevenueContractService" in the Revenue Management API Developer Reference which is available as part of the technical documentation pack. See Permission Sets and Other Technical Documentation.