Loading
Salesforce now sends email only from verified domains. Read More
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Generate a Single Invoice PDF Document by Using Flow, Apex, and Omniscript

          Generate a Single Invoice PDF Document by Using Flow, Apex, and Omniscript

          Generate a PDF document for an invoice that's generated from an Account or Order record page, or that's generated by using the Invoice Creation API.

          Required Editions

          Available in: Lightning Experience
          Available in: Enterprise, Performance, Unlimited, and Developer Editions with the Revenue Cloud Billing license. Contact your Salesforce account executive for more information.
          User Permissions Needed
          To generate invoice PDF documents:

          Billing Admin permission set OR Billing Operations User permission set

          AND

          DocGen User permission set

          To generate a PDF document for an invoice, create a Document Generation Process record by configuring an Apex class, by creating a flow with the Create Records element, or by using the default Omniscript available on that Invoice record page.

          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.

          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.

          Generate a Single Invoice PDF Document with Omniscript

          Generate a PDF document for an invoice by using Omniscript.

          To generate a PDF document for an invoice, configure Omniscript on your Invoice record page, and then generate a PDF document from the Invoice record page.

          Configure Omniscript on Invoice Record Page

          1. Open the invoice record that you want to generate a PDF document for.
          2. From Setup, go to Edit Page.
          3. In the components search bar, enter Omniscript.
          4. Drag the Omniscript component onto one of the tabs of the Invoice record page layout.
            You can also create a tab to configure Omniscript on the Invoice record.
            Omniscript configuration on the invoice record page

          Generate a PDF Document from Invoice Record Page

          1. Open the invoice record that you want to generate a PDF document for.
          2. Go to the tab where you added the Omniscript component.
          3. Enter the invoice record ID.
          4. Select a template type, and then click Next.
            Specify record Id and template type
          5. Select a template, and then click Next.
            Select a template
          6. Select Server Side Document Generation as the document generation type.
          7. Select Microsoft Word or Microsoft PowerPoint & PDF as the output file format.
          8. Select the font source.
          9. Enter a document title, and then click Next.
            Set document generation options
            An invoice document is generated.
          10. Download the generated invoice document.
            Generate Document
           
          Loading
          Salesforce Help | Article