Synchronous and Asynchronous Revenue Schedule Generation

The revenue schedule generate and synchronize processes can run synchronously or asynchronously depending on whether they are 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 or synchronized successfully.

Note:

This method runs the bulk synchronize process which both generates revenue schedules and deletes obsolete revenue schedules unless the Disable Synchronize Revenue Schedules field in the Revenue Management Settings custom setting is selected. For more information, see Managing Custom Settings.

Process Builder Synchronous

Terminates on error and no schedules are generated or synchronized.

API

Synchronous

Two APIs available:

  • One terminates on error and no schedules are generated or synchronized.
  • 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 or synchronized successfully (allOrNone = false).
Asynchronous

Two generate APIs available to process all source records or a specific set of source records.

One automation API that can generate revenue schedules for all source records as part of an end-to-end automation process.

These APIs skip errors and create or update schedules that are generated or synchronized successfully.

To find out more about using the API to call the generate or synchronize processes, refer to the Revenue Management API Developer Reference for information about the RevenueScheduleService.

For information about configuring Process Builder to trigger the generate or synchronize processes, refer to the Salesforce Help.

For information about the end-to-end automation process, see Automation of the End-to-End Process for Recognizing Revenue against Revenue Schedules.

Reviewing Errors

When running the generate or synchronize 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 generate or synchronize 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 created by previous asynchronous revenue schedule generate or synchronize 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.