Feature Flags
Complete reference for options.features - the boolean flags that control which REFRACT Platform capabilities are activated per render request.
Overview
Feature flags live inside the options.features object on every render request. They are request-level switches - they control which REFRACT Platform services are invoked after the PDF is generated. This makes them distinct from templateSettings, which controls how the document is rendered and formatted.
{
"templatePath": "DynamicsGP/Sales/gp-sales-order.rpkg",
"payloadPath": "DynamicsGP/Sales/FULORD1008.json",
"options": {
"correlationId": "GUID-INV-001",
"documentId": "FULORD1008",
"docType": "Invoice",
"generatedBy": "erp-service@contoso.com",
"features": {
"generatedDocuments": true,
"auditSnapshot": true
}
}
}An explicit false always opts out
The engine's rule is !== false, not === true: an explicit false always opts a flag out, but omitting vaultESign, vaultDelivery, or vaultWorkflow does not by itself mean off - if the matching templateSettings.esign/delivery/workflow block is present and enabled: true, that alone activates the feature. Set the flag explicitly to false if you want to be certain a feature is off regardless of templateSettings.
The options Object
Before diving into flags, here is the full options object. All fields are optional.
| Field | Type | Description |
|---|---|---|
correlationId | string | Unique identifier for this render request. Used for deduplication, trace retrieval, and audit lookups. Recommended: a stable GUID per document. |
documentId | string | Document identifier written as the PDF filename and to SharePoint metadata (e.g. INV-2026-001). |
docType | string | Document category written to SharePoint columns (e.g. Invoice, Contract, Report). |
generatedBy | string | Email or identity of the user or service principal that triggered generation. |
payloadId | string | Reference ID of the source data payload. |
userGroup | string | Classification label for the requesting user group (e.g. Internal, External, Auditor). |
features | object | Boolean feature flags - see Feature Flags Reference below. |
Feature Flags Reference
Pass any combination of boolean flags inside options.features. Unrecognised flags are ignored.
| Flag | Description | License Tier |
|---|---|---|
relay | Route this render asynchronously through a Service Bus queue instead of returning the PDF inline. Only takes effect on templatePath + payloadPath requests. See Relay Mode. | All |
generatedDocuments | Upload the rendered PDF to the Generated Documents library in SharePoint or Azure Blob Storage. | All |
auditSnapshot | Write a PDFGenerated audit event to the Audit Logs library for activity tracking. | All |
dataRedaction | Apply the field-level redaction policy defined in the template before storing the document. | Business+ |
explainDocument | Capture a machine-readable trace of every render decision. Auto-enabled when vaultESign, dataRedaction, or section508Accessibility is active. See Explain Document. | Enterprise |
immutableAudit | Write a tamper-evident audit record to the enterprise audit store. Required for signature and regulated workflows. | Business+ |
vaultESign | Trigger an electronic signature workflow after generation. Requires templateSettings.esign or templateSettings.workflow to be configured. See E-Sign. | Business+ |
vaultDelivery | Route the generated document through the REFRACT Delivery distribution service. See REFRACT Delivery. | Business+ |
section508Accessibility | Apply PDF/UA-1 tagging and check the output against the engine's own accessibility validator. See Section 508. | Business+ |
vaultWorkflow | Enable REFRACT Workflow engine integration for multi-step approval and review flows. See REFRACT Workflow. | Enterprise |
explainDocument auto-activation
You do not need to explicitly set explainDocument: true when vaultESign, dataRedaction, or section508Accessibility is enabled - the engine activates it automatically so that every regulated render has a full trace.
Use-Case Patterns
1. Standard Document Generation
Minimal setup: generate a PDF and store it in the document library with an activity record.
{
"options": {
"documentId": "INV-2026-001",
"docType": "Invoice",
"features": {
"generatedDocuments": true,
"auditSnapshot": true
}
}
}When to use: ERP-integrated batch generation, internal reports, non-regulated documents.
2. Redacted Document
Apply template-defined field masking before storage. The explain trace is auto-enabled so every redaction decision is recorded.
{
"options": {
"documentId": "FULORD1008",
"docType": "Invoice",
"features": {
"generatedDocuments": true,
"auditSnapshot": true,
"dataRedaction": true
}
}
}When to use: Customer-facing copies of documents that contain internal cost data, HR documents shared with external parties, or any document where field-level masking is controlled by the template.
3. Electronic Signature Workflow
Route the generated document to a signature workflow and write a tamper-evident audit record when signing completes. immutableAudit is strongly recommended for any document that will be legally signed.
{
"options": {
"documentId": "CONTRACT-2026-042",
"docType": "Contract",
"features": {
"generatedDocuments": true,
"auditSnapshot": true,
"vaultESign": true,
"immutableAudit": true,
"explainDocument": true
}
}
}When to use: Vendor onboarding, NDAs, employment contracts, purchase agreements - any document that requires a signature record.
4. Regulated / Tamper-Evident Audit Record
For documents where changes to the audit record must be detectable after the fact. The immutable audit flag writes an append-only record with component hashes recorded in the generation manifest, so tampering is detectable; write-once where the immutability policy is applied and locked for the storage account. (eSign and Workflow audit trails are additionally hash-chained; see the E-Sign and Workflow docs.)
{
"options": {
"documentId": "AUDIT-DOC-2026-001",
"docType": "ComplianceReport",
"features": {
"generatedDocuments": true,
"auditSnapshot": true,
"immutableAudit": true,
"explainDocument": true
}
}
}When to use: Financial reports, compliance certifications, regulated healthcare or legal documents where every render decision must be provable at audit time.
5. Accessible Document (Section 508 / PDF/UA)
Tag the document for screen-reader compatibility and check the output against the engine's own PDF/UA validator.
{
"options": {
"documentId": "REPORT-ACCESS-001",
"docType": "Report",
"features": {
"generatedDocuments": true,
"auditSnapshot": true,
"section508Accessibility": true
}
}
}When to use: Government agency submissions, publicly distributed reports, any document subject to ADA or Section 508 requirements.
6. Every Control Combined
A combined pattern for regulated industries. Every capability is active: storage, audit, redaction, signatures, accessibility, tamper-evident record, and a complete explain trace.
{
"options": {
"correlationId": "GUID-COMPLIANCE-2026",
"documentId": "REG-DOC-2026-001",
"docType": "RegulatorySubmission",
"generatedBy": "compliance-service@contoso.com",
"features": {
"generatedDocuments": true,
"auditSnapshot": true,
"dataRedaction": true,
"explainDocument": true,
"immutableAudit": true,
"vaultESign": true,
"section508Accessibility": true
}
}
}When to use: Pharmaceutical submissions, financial regulatory filings, government contracts, or any workflow where full traceability and accessibility are mandatory.
Combining Features
Features compose independently. The table below shows which flags work well together and any dependencies to be aware of.
| Combination | Notes |
|---|---|
generatedDocuments + auditSnapshot | Baseline. Always include both unless you explicitly don't want a storage record. |
dataRedaction + explainDocument | explainDocument auto-activates with dataRedaction. Redundant to set both, but harmless. |
vaultESign or vaultDelivery + immutableAudit | You don't need to set immutableAudit yourself - the engine sets it automatically whenever vaultESign or vaultDelivery is effectively enabled, unless you explicitly pass immutableAudit: false. |
vaultESign + explainDocument | explainDocument auto-activates with vaultESign. The trace records the pre-signature render state. |
section508Accessibility + explainDocument | explainDocument auto-activates. The trace includes the full PDF/UA validation results. |
immutableAudit implies auditSnapshot | Setting immutableAudit: true always forces auditSnapshot: true too, even if you explicitly passed auditSnapshot: false - they are not independent. |
Related
- Template Settings - document-level rendering and formatting options
- Explain Document - full reference for the explain trace
- Section 508 Accessibility - PDF/UA tagging details
- REFRACT eSign - e-signature workflow configuration
- REFRACT Delivery - document distribution service
- REFRACT Workflow - multi-step approval workflows
Template Settings
Reference for templateSettings in REFRACT PDF. Controls locale, date/time formatting, number and currency display, boolean labels, section numbering, Table of Contents, watermarks, security, and consent.
Enterprise Power Suite
Unlock advanced accessibility, discoverability, and auditability for sovereign document workflows.