Generate Invoice Documents Action

Asynchronously generate PDF documents for the invoices associated with an invoice batch run record that are in the Draft or Posted status.

This action uses the ID of the invoice batch run record to find the draft or posted invoices from the batch and to generate the PDF documents for its invoices that are in the Draft or Posted status. This action creates a DocGenerationBatchProcess record that contains the Document Generation Process and Invoice Document records for each of the invoices. This action is available in API version 63.0 and later with Revenue Cloud Billing.

Special Access Rules 

The Generate Invoice Documents action is available in Enterprise, Unlimited, and Developer Editions where Revenue Cloud Billing is enabled. The org must have Billing Docgen enabled and an active Invoice Document Template to generate PDF documents. To use this action, you need either the Billing Operations User or the Billing Admin permission set, along with the Docgen Designer and Docgen Designer Standard User permission sets.

Supported REST HTTP Methods 

URI: /services/data/v68.0/actions/standard/generateInvoiceDocuments

Formats: JSON, XML

HTTP Methods: POST

Authentication: Authorization: Bearer TOKEN

Where TOKEN is a placeholder for your OAuth access token.

Inputs 

InputTypeDescription
invoiceBatchRunIdstringRequired. ID of the invoice batch run record that created the draft or posted invoices.

Outputs 

OutputTypeDescription
requestIdstringAn alphanumeric string to track the status of the document generation request.
requestStatusbooleanIndicates whether the operation is successful (true) or not (false).

Example 

POST

This example shows a sample request for the Generate Invoice Documents action.

1{
2  "inputs": [
3    {
4      "invoiceBatchRunId": "5IRSG000001Az014AC"
5    }
6  ]
7}

This example shows a sample response for the Generate Invoice Documents action.

1{
2  "actionName": "generateInvoiceDocuments",
3  "errors": null,
4  "isSuccess": true,
5  "outputValues": {
6    "requestId": "4sFDU00000000652AA",
7    "requestStatus": true
8  }
9}