You are here:
Automation Guidelines for Invoices and Invoice Lines
Review use cases and guidelines for building automation on invoices and invoice lines. (Salesforce Billing Managed Package)
Asynchronous Invoice and Invoice Line Jobs
Salesforce Billing runs asynchronous jobs in response to several invoice and invoice line actions. Review these asynchronous jobs to ensure they don't interfere with any actions in your custom automation.
| Job Name | Job Type | Job Occurs | Considerations |
|---|---|---|---|
QueueableRevenueSchedule |
Queueable | Invoice posting | Salesforce Billing fires this job even if you're not using invoice-based revenue schedule generation. |
QueueableRevenueTransaction |
Queueable | Invoice posting | Salesforce Billing fires this job only if you use invoice-based revenue schedule generation. |
QueueableTaxCalculator |
Queueable | Invoice batch execution and invoice posting | During invoice runs, Salesforce Billing fires this job first when the invoice is created and again when the invoice is posted. |
Invoice Use Cases
Review some common use cases for building automation on invoices.
| Use Case | Description | Considerations |
|---|---|---|
| Invoice Posting | Automatically post an invoice one key fields have been finalized and the invoice has been sent to the customer. Note Posting an invoice posts all its invoice
lines. |
You have three ways to post an invoice.
For custom invoice automation, Salesforce Billing requires the automation to trigger after the invoice's tax status is Complete and while the invoice is still in draft status. Due to the asynchronous nature of tax calculation, the invoice may show tax calculation as completed before the invoice line tax shows as completed. |
| Invoice Dates | Update the invoice date or due date based on custom values that aren't available in Salesforce Billing by default, such as payment term conditions. | All changes to date fields on the invoice must occur before the invoice is posted. |
| Managed Package Field Updates | General updates to Salesforce Billing fields, such as overriding the tax address. | All changes to Salesforce Billing fields on the invoice must occur before the invoice is posted. |
| Tax Integration | Calculate the billable tax to charge on an invoice. | Salesforce Billing applies tax based on your custom tax integration. Review your tax integration vendor's guidelines for more information. |
Invoice Line Use Cases
Invoice line automation is useful for updating Salesforce Billing fields and sending information to external ERP systems after posting an invoice line. When you automate populating Salesforce Billing fields on the invoice line, remember that invoice line data can change based on invoice processes and automation when you post the parent invoice. Changes to the invoice line can also affect its parent order product.

