Synchronous and Asynchronous Revenue Schedule Generation

The revenue schedule bulk generate process can run synchronously or asynchronously depending on whether the process is started from the user interface, via Process Builder, or via the API.

Error handling varies depending on whether the process runs synchronously or asynchronously. The behavior is summarized in the table below.

Method

Sync or Async

Error Handling

User interface Asynchronous Skips errors and creates or updates schedules that are generated successfully.
Process Builder Synchronous Terminates on error and no schedules are generated.
API

Synchronous

Two APIs available:

  • One terminates on error and no schedules are generated.
  • Another takes a configuration object that defines whether to terminate on error (allOrNone = true) or whether to skip errors and create or update schedules that are generated successfully (allOrNone = false).
Asynchronous Two APIs available, to process all source records or a specific set of source records, but both APIs skip errors and create or update schedules that are generated successfully.

To find out more about using the API to call the bulk generate process, refer to the Revenue Management API Developer Reference for information about the Revenue Schedules Service.

For information about configuring Process Builder to trigger the bulk generate process, refer to the Salesforce Help.

Reviewing Errors

When running the process asynchronously, you are notified by email when the process completes. If the email informs you that errors occurred, click the View Process Run Record link. From the process run record, view all the child process logs and filter them by the status "Error". Click a child process log to view its message containing information about that error.

Once you have resolved any errors, you can run the bulk generate process again. Alternatively if the source record is a revenue contract or billing contract, you can generate revenue schedules for that one contract via the Generate Revenue Schedules button on the contract's Lightning record page.

Note:

Logs generated by previous asynchronous revenue schedule generation processes are deleted when the latest process completes. This is controlled by the Delete Old Revenue Schedule Async Logs field (in the Revenue Management Settings custom setting) which is enabled by default. This means that only logs for the most recent process run are stored.