Omnistudio Document Generation Troubleshooting Reference

Use this table to identify common issues with Omnistudio Document Generation, what they mean, and how to fix them.

Required Editions

Available in: Lightning Experience
Available in: Professional, Enterprise, Unlimited, and Developer Editions
Issue What It Means How to Fix It
We couldn't generate the document. <recordId> + Invalid XML pseudo-attribute 'version' value ' An RTB_ token in the .docx template is wrapped inside a text box, which generates invalid XML and prevents the document from being created. Open the .docx template in Microsoft Word, locate the RTB_ tokens, remove any surrounding text boxes, and place the token directly in the document body. Save and try again. If the issue persists, contact Salesforce support.
We couldn't generate the document. Could not generate document: Scope parser execution failed. Try again or ask your Salesforce admin for help. The tokenData passed to DocGen contains a null value within a nested array or object. DocGen can’t process null values in nested token data structures. The issue isn’t caused by JSON payload size. This error can occur even if document generation previously worked. Inspect the tokenData passed to the document generation call, identify any null values in nested arrays or objects, and remove or replace them with empty string before trying again. If the issue persists, contact Salesforce support.
Access to XMLHttpRequest at 'https://<orgname>--omnistudio.sandbox.vf.force.com/resource/<resourceId>/omnistudio__vlocity_core_assets/latest/vlocity_core_assets.js' from origin 'https://<orgname>.sandbox.lightning.force.com/' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. The Omnistudio sandbox Visualforce page origin isn’t listed in the org's CORS allowlist, blocking the browser from completing the request. In Salesforce Setup, open CORS, click New, and add the blocked origin URL. For example, https://<orgname>--omnistudio.sandbox.vf.force.com). Save and perform a hard browser refresh 3–4 times. If the issue persists, contact Salesforce support.
The document generates successfully, but merge fields tied to extracted data appear blank in the generated document. Only formula fields that don't depend on data, such as NOW or a static formula, display correctly. This can occur for several reasons, such as the user generating the document may lack the required object or field-level access, a referenced Apex class may be missing or inaccessible, or a field used in the data mapping may have been deleted from the org. Verify the user has read access to the required objects and fields, confirm the mapped fields still exist in the org, and confirm any referenced Apex classes are available and accessible. Re-test document generation. If the issue persists, contact Salesforce support.
Could not generate document: Multi error The document template .docx file has comments enabled, or a table in the template has improper font effects. Open the document template in Microsoft Word and remove all comments. To check a table, select it and press Cmd+D (Mac) or Ctrl+D (Windows). Under Effects, if any option shows a minus sign (-), the table has improper font effects. Delete the table and recreate it.
Document generation process (DGP) request failed and document isn't generated. When a DocumentGenerationProcess record fails, it doesn't resume automatically. The record stays in your org as a record of the request.

There are two ways to fix this:

  • Create a new record: Create a record from the same source that created the original request, such as a trigger, Integration Procedure, Omniscript, Screen flow, or Apex.
  • Clone the failed record: Use this if the input is correct and the root cause is resolved. Cloning preserves the input values and retries the request. For Apex cloning code, see Resolve a Failed Document Generation Request.
The error "Failed while making http call to: UpdateDocumentGenerationResult with response status code: 403. Reason: ContentVersion creation failed. : Invalid sharing type V" appears when a user tries to generate a document using server-side document generation. The user has the Query Non Vetoed Files app permission enabled. This permission blocks document generation. Remove the Query Non Vetoed Files permission from each permission set, permission set group, or profile that grants it to the user. To find these, from Setup open the user's record page, and click View Summary. Search for Query Non Vetoed Files and use Access Granted By drop down to find each permission set, permission set group, or profile that grants it. Disable the Query Non Vetoed Files permission and then retry generating the document. See knowledge article Understanding the "Query Non Vetoed Files" Permission and Salesforce File Access Issues.