You are here:
Generate Document Component Properties
Use the Lightning App Builder to add the Generate Document component to a record page, or integrate it into a Screen Flow to create a guided document generation experience for users.
Required Editions
| Available in: Lightning Experience |
| Available in: Professional, Enterprise, Unlimited, and Developer Editions |
Review the Generate Document component’s configuration details and behavior.
Component Details
| Property | Description |
|---|---|
| Component Label | Generate Document |
| API Name | GenerateDocument |
| Supported Formats | DOCX, PPTX, PDF |
| Invocation Context | Lightning record pages and Screen Flow |
| Output Behavior | Generates and attaches documents to records |
| Dependencies | Salesforce Document Generation setting turned on |
Configuration Properties
When configuring the component in the Lightning App Builder or a Screen Flow, make sure to define the required parameters. The available service functions are:
- generatedocument
- generatepdf
- generatedocumentwithtokendata
- mergepdf
| Field | Required or Optional | Applicable Service Function | Description | Available Values | Default Value |
|---|---|---|---|---|---|
| ID | Auto-updated | All | Specifies the Salesforce record ID, such as Contract, Quote, or Opportunity, used to generate and attach the document. The component automatically fetches this value when it renders on a record page. |
Text | NA |
| Template ID | Required |
|
Specifies the unique ID of the document template (DOCX or PPTX) used for generation | Text | NA |
| Document Title | Required | All | Specifies the name of the generated document | Text | NA |
| Service Function | Required | All | Specifies the document generation operation to run |
|
generatedocument |
| Output Format | Optional |
|
Specifies the format of the generated document |
|
Template default |
| Attach Document | Optional |
|
Specifies which version of the document to attach to the record |
|
All |
| Font Source | Optional |
|
Specifies the font source used during document generation |
|
Document Font |
| PDF Document Identifier List | Required for merging | mergepdf | Specifies a comma-separated list of PDF file IDs to merge with the generated document. The order of IDs determines the final document sequence. | Text | NA |
| Context Token Processing Type | Optional |
|
Specifies the context token processing path used for the document generation request. The default value is Regular, which uses standard token processing. Use Large for high volumes of token data across multiple records. |
|
Regular |
| Update Table of Contents | Optional |
|
Updates the table of contents for the generated document. Supported for documents up to 25 MB. |
|
False |
| Apply localization | Optional | generatedocument | Applies the user’s locale to context token data. This parameter applies only if the template uses Context Token Mapping. When you enable this option, the component uses translated text and applies localized date, time, and currency formats. |
|
False |
| Show generate button | Optional | All | Shows the button that you can use to trigger document generation |
|
False |
| Button Title | Optional | All | Button name to generate documents. If merge is configured, it also merges selected PDF files | Generate Document | Generate Document |
| Use Large File Size Processing | Optional |
|
Routes document generation through large file size (LFS) infrastructure instead of the standard process. |
|
False |
Did this article solve your issue?
Let us know so we can improve!

