Invited to the Frisbii conference for Salesforce & Frisbii administrators, Linda listens attentively to her former colleague from her time at Salesforce, D'Angelo Cunningham, who now works for Dreamhouse. Following his explanation of his use case on Billing regularisation, he goes on to explain another problem he had, which was also solved by Spring'20.
Currently, when colleagues generate billing schedules from subscriptions, a maximum of 600 invoice line items can be processed before receiving a CPU timeout.
The number of invoice line items to be generated is calculated by: the number of due dates x the number of Subscription line items.
This corresponds, for example, to a 4-year monthly subscription with 10 subscription line items, or a 3-year quarterly subscription with 40 subscription line items.
Admittedly, these are large contracts for DreamHouse, but it happens from time to time. And with the company's strong growth, D'Angelo expects this to happen more and more frequently.
The curious Linda wants to understand this functionality better, and asks the Frisbii team, who facilitated the conference, to explain in detail the generation of the asynchronous billing schedule.
Synchronous vs. asynchronous processing, in relay of synchronous processing
First, she wonders about the difference between synchronous and asynchronous processing.
Reminder: the schedule is generated to create invoices linked to a subscription, but also to update them when changes are made to that subscription.
Synchronous processing
Before Spring '20, the billing schedule was always generated synchronously.
This meant that all invoices and invoice lines were generated instantly, within the time limit allowed by Salesforce (10 seconds).
If generation failed:
Due to a lack of subscription information,
or due to a “CPU time exceeded” error caused by an overly large subscription,
the error appeared immediately and no record was created.
Starting with the Spring '20 release, the schedule is generated using a combination of synchronous and asynchronous methods.
All invoices are generated synchronously. Then, invoice lines are generated synchronously up to the limit specified in the Administration tab, and asynchronously beyond that limit.

Asynchronous processing, relaying synchronous processing
The diagram below explains in detail how the relay is performed between synchronous and asynchronous:
Invoice generation (synchronous)
Generation of invoice lines, inserted into the corresponding invoices (synchronous > limit > asynchronous)
.png?sv=2022-11-02&spr=https&st=2026-04-04T13%3A46%3A11Z&se=2026-04-04T14%3A01%3A11Z&sr=c&sp=r&sig=ppCsFY0QnWLf4MxsmG1CikHWqw90otB1KTPPAi6r5i4%3D)
A batch will process invoices without lines in order to insert the missing lines based on the availability of your organization (Salesforce org). This may take a few seconds or a few minutes depending on the volume of the subscription.
Asynchronously, the Subscription Junction object stores information in case of failure, and the Lightning Notification Center component indicates the progress of billing generation directly on the subscription.
Please note: During asynchronous generation, the subscription is locked. It cannot be modified, either manually or by a process.
Now that Linda understands the difference between the two ways of generating invoices, she wants to know what she needs to do to use this feature properly.
Prerequisites
Before using this feature, there are three prerequisites to consider.
(1) Activate my domain. You must have a custom URL to use custom components. Consult with others to decide on the right name to use for your organization.
(2) Add the Lightning Notification Center component.
(3) Test in a sandbox to determine the right limit for synchronous processing.
Add the Notification Center Lightning component
As mentioned above, in asynchronous mode, the Subscription Junction object stores information in case of failure, and the Lightning Notification Center component indicates the progress of the schedule generation on the subscription.
To take advantage of this feature, you must add this component to the page from the Lightning Application Builder.
Here are the steps to follow:
Steps
Go to a Subscription record.
Click the gear icon in the upper right corner, then click Edit Page.
In the Lightning Application Builder, add the notificationCenter component by dragging the component to the desired location.

Click the Activation button.
In the window, click the APP DEFAULT tab.
Click Assing as App Default.
Select Frisbii.
Click Next.
Keep Desktop as the form factor.
Click Next.
In the next window, click Save.
Then click the Save button at the top right.
Next, click <- Back.
The Notification Center is now available in the Subscription tab.
Determine the correct synchronous processing limit
By default, the maximum number of invoice lines per schedule generation in the Administration tab is 1,000 lines.
For information, the native Spring '20 version (without specifics) demonstrated a generation of 1,700 invoice lines.
You need to set the right limit: this number depends heavily on your org's setup and how you manage subscriptions: the more flows, formula fields, validation rules, and other specific configurations you have on your org, the more the value generated by Spring '20 (1,300) will be impacted.
That's why we recommend establishing the correct number of lines by performing the following tests in your org.
Please note: If your largest subscriptions have a limited number of due dates and only a few subscription items, you can leave the maximum number of invoice lines per schedule generation at the default setting.
Steps
1. Create a partial sandbox. If you already have an updated sandbox available, log in to that sandbox.
2. Identify your subscriptions that have:
Either the highest number of occurences among your subscriptions,
Or the largest number of subscription items,
Or a combination of both.
3. Start by creating the schedule by clicking on the button for these subscriptions.
4. a) If you reach the “CPU timeout” with the default limit of 1,400 lines and receive an error message, you must lower the maximum number of invoice lines per schedule generation in the Administration tab.
4. b) If you do not reach the “CPU timeout,” you can leave the default limit.
Once you have set the Maximum number of invoice lines per schedule generation (> Max number of invoice lines per invoice plan generation before going Async) that suits you, you can enter it in the Administration tab in production.
Test Example
Let's imagine that you have a subscription:
On a monthly basis,
With 10 subscription items,
For a period of 15 years,
And with 180 payment dates.
This makes a total of 1,800 invoice lines to be generated.

By clicking on Create schedule, you will receive this overview:

If the limit is not low enough, you will receive this error message:
.png?sv=2022-11-02&spr=https&st=2026-04-04T13%3A46%3A11Z&se=2026-04-04T14%3A01%3A11Z&sr=c&sp=r&sig=ppCsFY0QnWLf4MxsmG1CikHWqw90otB1KTPPAi6r5i4%3D)
In this case, go to the Administration tab to change the limit:

During generation, the Notification Center displays:

Licensing and warranty limit
This feature is available to users with a Finance or Administrator license.
Asynchronous schedule generation is guaranteed for up to 7,200 invoice lines.
Beyond that, we cannot be held liable.