Loading
Create a Document Generation Process Record Using Flow or Apex

Create a Document Generation Process Record Using Flow or Apex

Create a Document Generation Process record by creating a Flow with a Create Records element or by configuring an Apex class.

Required Editions

Available in: Lightning Experience
Available in: Enterprise, Unlimited, and Developer Editions with the Revenue Cloud Billing license. Contact your Salesforce account executive for more information.
User Permissions Needed
To create a flow: Manage Flow
To configure an Apex class: Author Apex
To create a Document Generation Process record:

Billing Admin permission set

OR

Billing Operations User permission set

To generate invoice PDF documents: DocGen User permission set

If you create a flow, add an element to get the document template to use for generating the invoice PDF document. Then, add a Create Records element with these values:

  1. Enter Generate And Convert as the type.
  2. Enter Document Template as the document input type.
  3. Enter DefaultInvoiceTemplate record Id or any custom document template as the document template.
  4. Enter a JSON input in the {"Id":"<Enter Invoice ID>"} format as the data mapper input.
  5. Enter the ID of the record for which you want generate a PDF document as the reference object.
    The generated PDF document is attached to the record.
  6. Enter a JSON input in the {"keepIntermediate":false,"title":"<Enter Invoice Number/ Document Number>"} format as the request input.
  7. Enter Advanced as the doc generation API version type.
  8. Enter In Progress as the status.
    Omniscript Flow

If you configure an Apex class, specify the same values that are mentioned for the Create Records element.

 
Loading
Salesforce Help | Article