How to allow custom processes or flows to modify invoices?
← Setup and Service FAQ ← Billing & Invoice Management FAQ
Usually, JustOn does not allow processes or flows to modify invoice records or invoice line item records. A validation mechanism prevents unauthorized code (such as your custom process or flow) from doing so.
Certain business use cases, however, may require to have custom processes or flows change some data in draft invoices. To this end, you can allowlist your operation in a custom process or flow.
Note
Use the process or flow allowlisting feature with caution. Allowlisted processes or flows bypass the code validation and, consequently, JustOn's invoice calculation logic.
Test your process or flow thoroughly, and make sure that the modifications do not produce incorrect invoices.
Be aware that the JustOn support team may be unable to provide help with issues that result from allowlisted custom processes or flows.
To allow your process or flow to modify invoice records or invoice line item records, you set the Apex class Set Business Process as the first action to be executed, setting the following Apex variables (depending on whether your process or flow intends to modify invoice data or invoice line item data):
Input Variable | Value | Notes |
---|---|---|
Business Process Status | INVOICE_BUILDER |
String value, used to allowlist a flow that modifies invoice data |
INVOICELINEITEM_BUILDER |
String value, used to allowlist a flow that modifies invoice line item data | |
Record Id | {!$Record.Id} |
Action to allowlist an operation intended to modify invoice data in a custom flow
Input Variable | Type | Value | Notes |
---|---|---|---|
Business Process Status | String | INVOICE_BUILDER |
Used to allowlist a process that modifies invoice data |
INVOICELINEITEM_BUILDER |
Used to allowlist a process that modifies invoice line item data | ||
Record Id (Type Reference) | Field Reference | [ONB2__Invoice__c].Id |
Refers to the invoice record if the process modifies invoice data |
[ONB2__InvoiceLineItem__c].Id |
Refers to the invoice line item record if the process modifies invoice line item data |
Action to allowlist an operation intended to modify invoice data in a custom process
Once the allowlisting action is set, you can proceed to add the action(s) to actually modify the data as intended.
Related information:
Flows in the Salesforce Help
Process Builder in the Salesforce Help