FSC Document Generation
This skill activates when a practitioner needs to generate compliance-grade documents in Financial Services Cloud — disclosure packets, account statements, consent records, or regulatory delivery confirmations — using OmniStudio DocGen integrated with FSC's Disclosure and Compliance Hub data model.
Before Starting
Gather this context before working on anything in this domain:
- Confirm FSC Industries licensing is active and OmniStudio DocGen is provisioned; DocGen is bundled with the Industries license but individual user access requires separate DocGen permission set licenses per role (DocGen Designer, DocGen User, DocGen Runtime).
- Identify the regulatory driver: FINRA disclosure, GDPR consent record, CCPA data-use notice, or client-facing account statement. Each has distinct template structure, delivery confirmation, and retention requirements.
- Know the server-side batch throughput cap: OmniStudio DocGen processes a maximum of 1000 documents per hour via the DocGen API. For large account statement runs (tens of thousands of accounts), plan a queued Apex batch job that issues DocGen calls in controlled bursts.
- Determine whether Disclosure and Compliance Hub is the delivery orchestrator; if regulatory compliance is required, the AuthorizationForm and DataUseLegalBasis objects must be populated to record delivery status — raw DocGen alone does not satisfy audit trail requirements for FINRA or GDPR.
- Do not use Document Builder (GA in Winter '25) for sensitive financial documents — Salesforce explicitly excludes Document Builder from PCI DSS compliance scope, making it unsuitable for most FSC compliance workflows.
Core Concepts
OmniStudio DocGen in the FSC Context
OmniStudio DocGen is the FSC-native document generation engine. It merges Word or PowerPoint templates with Salesforce record data retrieved via DataRaptor transforms, then renders the output to PDF (or DOCX). The result can be stored as a ContentDocument, delivered by email, or pushed to Experience Cloud portals. In FSC, DocGen is the preferred engine for compliance documents because it supports server-side rendering without client browser dependency, has an audit-friendly output chain, and integrates directly with OmniStudio OmniScripts for guided disclosure delivery workflows.
Disclosure and Compliance Hub Data Model
FSC ships the Disclosure and Compliance Hub, built on top of the AuthorizationForm, AuthorizationFormDataUse, AuthorizationFormConsent, and DataUseLegalBasis standard objects. A well-designed compliance document workflow does not treat DocGen as a standalone feature: it uses DocGen to render the document, then writes an AuthorizationFormConsent record linking the rendered document to the contact and the legal basis (FINRA, GDPR Article 6, CCPA) to record that the disclosure was delivered, viewed, or acknowledged. Skipping this step means document generation happened but regulatory proof of delivery is absent.
Permission Set Licenses for DocGen
OmniStudio DocGen requires three separate permission set licenses beyond FSC base:
- DocGen Designer — authors who build and edit document templates.
- DocGen User — end users who trigger document generation manually from the UI.
- DocGen Runtime — required for automated server-side generation (API, batch Apex, Flow).
A common production failure is assigning only DocGen User when the org runs automated nightly statement jobs. Those jobs run under an integration user; that user needs DocGen Runtime. Forgetting this causes silent job failures or permission errors that surface only at batch time.
Server-Side Batch Cap and Statement Run Design
The DocGen API enforces a hard limit of 1000 documents per hour on the server side. FSC implementations that generate monthly account statements for large books of business (10,000+ accounts) must plan batch processing windows carefully. The standard pattern is an Apex Batchable class that chunks account IDs into groups of 200–300 per batch interval, calls the DocGen REST API per chunk, and uses System.scheduleBatch or a nightly scheduled job to spread the load over 10–12 hours before the delivery deadline.
Common Patterns
Pattern 1 — FINRA Disclosure Delivery Workflow
When to use: A financial advisor's client onboarding or annual review requires delivering a Form ADV or investment advisory agreement that must be recorded as delivered and acknowledged.
How it works:
- OmniScript captures advisor context and client record ID.
- A DataRaptor Extract fetches client name, address, account type, and advisor CRD number from
FinancialAccount, Contact, and Account objects.
- DocGen merges the data into a pre-approved Word template and renders a PDF stored as a
ContentDocument linked to the Contact.
- The OmniScript writes an
AuthorizationFormConsent record with Status = Agreed, ConsentGivenAt = now(), and a reference to the AuthorizationForm representing the Form ADV version.
- An email action sends the PDF to the client; the
EmailMessage record is linked to the AuthorizationFormConsent.
Why not raw email attachment: Emailing a PDF directly has no FSC audit trail. Without the AuthorizationFormConsent record, there is no machine-readable proof of delivery that satisfies FINRA record-keeping rules (Rule 4511).
Pattern 2 — Batch Account Statement Generation
When to use: Monthly or quarterly statement production for hundreds or thousands of financial accounts.
How it works:
- A nightly
Schedulable Apex job queries all active FinancialAccount records with a statement preference of Mail or Portal.
- The
Batchable class processes accounts in chunks of 200. Each chunk calls the DocGen REST API using a named credential and a prepared DocGenDocument JSON payload containing the template ID and record IDs.
- DocGen renders each statement PDF server-side and attaches the output as a
ContentDocument linked to the FinancialAccount.
- Statements flagged for portal delivery are shared to the Experience Cloud site through
ContentDistribution; paper statements are handed off to a print vendor via an outbound Platform Event.
- A post-batch summary record logs run completion time, document count, and any failures for operations review.
Why not OmniScript for batch: OmniScript is an interactive UI engine — it requires a user session. Server-side batch generation must use the DocGen API directly or via a headless Apex callout.
Decision Guidance
| Situation |
Recommended Approach |
Reason |
| Interactive disclosure delivery during onboarding |
OmniScript + DocGen + AuthorizationFormConsent |
Combines guided UX, document merge, and compliance record in one workflow |
| Automated monthly account statements for 10,000+ accounts |
Batch Apex → DocGen API, chunked at 200/batch |
Respects 1000 docs/hour server cap; runs overnight without UI dependency |
| Sensitive financial document requiring PCI-in-scope handling |
OmniStudio DocGen only (not Document Builder) |
Document Builder is explicitly excluded from Salesforce's PCI DSS compliance scope |
| Simple branded letter with no regulatory obligation |
Document Builder or Salesforce Files |
Lighter weight; OmniStudio DocGen overhead is not justified without compliance needs |
| Proof-of-delivery audit trail required (FINRA, GDPR) |
AuthorizationFormConsent + ContentDocument link |
DocGen alone does not record delivery; the consent record is the legal artifact |
| Multi-language regulatory disclosure |
DocGen template with locale-conditional sections |
DataRaptor can pass Contact.Language__c; Word template conditional blocks handle language variants |
Recommended Workflow
Step-by-step instructions for an AI agent or practitioner working on this task:
Verify licensing and permissions — Confirm FSC Industries license is active, OmniStudio DocGen is enabled in the org, and the correct DocGen permission set licenses (Designer / User / Runtime) are assigned to the relevant user profiles. Automated jobs need the Runtime license assigned to the integration user.
Model the compliance data requirement — Identify whether the workflow requires an AuthorizationForm record (representing the regulatory document version), a DataUseLegalBasis record (the legal basis for data use), and an AuthorizationFormConsent record (the per-contact delivery acknowledgment). Create these records and their relationships before building the DocGen template.
Build the DataRaptor Extract — Design a DataRaptor Extract transform that fetches all data the template needs: contact demographics, financial account fields, advisor information, and any calculated values. Test the DataRaptor independently against real records before wiring it to DocGen.
Design and validate the DocGen template — Create the Word template using OmniStudio DocGen Designer. Use {{}}-style merge fields mapped to DataRaptor output keys. Validate the template against a sample record set and confirm the PDF output matches compliance team requirements (font size, required disclosures, page ordering).
Build the delivery orchestration — For interactive workflows, build the OmniScript that calls DocGen, stores the PDF, writes the AuthorizationFormConsent, and sends the email confirmation. For batch workflows, build the Apex Batchable class that chunks accounts and calls the DocGen API, staying within the 1000 documents/hour limit.
Test delivery and audit trail — Run end-to-end tests covering: PDF renders correctly, ContentDocument is linked to the right parent object, AuthorizationFormConsent is written with correct Status, and the email or portal delivery confirmation is recorded.
Review with compliance stakeholders — Before production deploy, have compliance and legal sign off on the rendered PDF against the approved disclosure language. Confirm the audit trail records satisfy the regulatory record-keeping period requirements (FINRA: 6 years for records, 3 years easily accessible).
Review Checklist
Run through these before marking work in this area complete:
Salesforce-Specific Gotchas
Non-obvious platform behaviors that cause real production problems:
DocGen Runtime License Missing for Automated Jobs — Server-side DocGen API calls fail silently or return permission errors when the integration user running a batch Apex job lacks the DocGen Runtime permission set license. This license is separate from DocGen User and is frequently missed because interactive testing (which uses a human user with DocGen User) succeeds but the nightly batch fails. Always assign DocGen Runtime to the integration user profile and verify with a dedicated sandbox batch run before go-live.
Document Builder PCI Exclusion — Document Builder, GA in Winter '25, is not covered by Salesforce's PCI DSS compliance attestation. This means any document containing card numbers, account routing data, or other PCI-in-scope data must use OmniStudio DocGen, not Document Builder. The visual similarity between the two tools causes practitioners to choose Document Builder for its lower setup cost, creating a compliance gap that is difficult to remediate post-launch.
AuthorizationFormConsent Is the Audit Record, Not the PDF — The ContentDocument storing the generated PDF proves a document exists but does not prove delivery or acknowledgment to a regulator. FINRA Rule 4511 and GDPR Article 7 require machine-readable proof of when consent or disclosure was given. The AuthorizationFormConsent record with a ConsentGivenAt timestamp and a Status of Agreed is that proof. Omitting this record means the DocGen workflow is incomplete from a compliance standpoint even if the PDF is perfect.
Output Artifacts
| Artifact |
Description |
| DocGen template (Word) |
Merge-field template stored in OmniStudio DocGen Designer, maps to DataRaptor output keys |
| DataRaptor Extract transform |
Fetches all record data required by the template; testable independently |
| AuthorizationForm record |
Represents the regulatory document version (e.g., Form ADV version 2024-Q4) |
| AuthorizationFormConsent record |
Per-contact delivery record with timestamp and status — the regulatory proof artifact |
| Batch Apex job |
Chunked Batchable/Schedulable class for large statement runs respecting the 1000 docs/hour cap |
| ContentDocument links |
Stored rendered PDFs linked to the appropriate FSC parent object (FinancialAccount, Contact) |
Related Skills
- omnistudio/document-generation-omnistudio — Covers OmniStudio DocGen mechanics (template authoring, DataRaptor wiring, output format options) independent of FSC; use alongside this skill when building or debugging the DocGen template layer
- admin/fsc-action-plans — Covers FSC Action Plan templates; use when disclosures must trigger follow-up task sequences (e.g., obtain signed disclosure before proceeding with account opening)
1---2name: fsc-document-generation3description: Use this skill when designing or implementing FSC compliance document generation workflows — FINRA disclosure packets, account statements, consent records, and regulatory delivery confirmations using OmniStudio DocGen with FSC data models. Trigger keywords: OmniStudio DocGen FSC, disclosure document generation, account statement PDF, AuthorizationForm document, FINRA disclosure workflow, compliance document batch, DataRaptor document template, DocGen permission set license. NOT for general OmniStudio DocGen mechanics — use omnistudio/document-generation-omnistudio. NOT for KYC/AML data collection setup — use admin/compliance-documentation-requirements.4---56# FSC Document Generation78This skill activates when a practitioner needs to generate compliance-grade documents in Financial Services Cloud — disclosure packets, account statements, consent records, or regulatory delivery confirmations — using OmniStudio DocGen integrated with FSC's Disclosure and Compliance Hub data model.910---1112## Before Starting1314Gather this context before working on anything in this domain:1516- Confirm FSC Industries licensing is active and OmniStudio DocGen is provisioned; DocGen is bundled with the Industries license but individual user access requires separate DocGen permission set licenses per role (DocGen Designer, DocGen User, DocGen Runtime).17- Identify the regulatory driver: FINRA disclosure, GDPR consent record, CCPA data-use notice, or client-facing account statement. Each has distinct template structure, delivery confirmation, and retention requirements.18- Know the server-side batch throughput cap: OmniStudio DocGen processes a maximum of 1000 documents per hour via the DocGen API. For large account statement runs (tens of thousands of accounts), plan a queued Apex batch job that issues DocGen calls in controlled bursts.19- Determine whether Disclosure and Compliance Hub is the delivery orchestrator; if regulatory compliance is required, the AuthorizationForm and DataUseLegalBasis objects must be populated to record delivery status — raw DocGen alone does not satisfy audit trail requirements for FINRA or GDPR.20- Do not use Document Builder (GA in Winter '25) for sensitive financial documents — Salesforce explicitly excludes Document Builder from PCI DSS compliance scope, making it unsuitable for most FSC compliance workflows.2122---2324## Core Concepts2526### OmniStudio DocGen in the FSC Context2728OmniStudio DocGen is the FSC-native document generation engine. It merges Word or PowerPoint templates with Salesforce record data retrieved via DataRaptor transforms, then renders the output to PDF (or DOCX). The result can be stored as a ContentDocument, delivered by email, or pushed to Experience Cloud portals. In FSC, DocGen is the preferred engine for compliance documents because it supports server-side rendering without client browser dependency, has an audit-friendly output chain, and integrates directly with OmniStudio OmniScripts for guided disclosure delivery workflows.2930### Disclosure and Compliance Hub Data Model3132FSC ships the Disclosure and Compliance Hub, built on top of the `AuthorizationForm`, `AuthorizationFormDataUse`, `AuthorizationFormConsent`, and `DataUseLegalBasis` standard objects. A well-designed compliance document workflow does not treat DocGen as a standalone feature: it uses DocGen to render the document, then writes an `AuthorizationFormConsent` record linking the rendered document to the contact and the legal basis (FINRA, GDPR Article 6, CCPA) to record that the disclosure was delivered, viewed, or acknowledged. Skipping this step means document generation happened but regulatory proof of delivery is absent.3334### Permission Set Licenses for DocGen3536OmniStudio DocGen requires three separate permission set licenses beyond FSC base:371. **DocGen Designer** — authors who build and edit document templates.382. **DocGen User** — end users who trigger document generation manually from the UI.393. **DocGen Runtime** — required for automated server-side generation (API, batch Apex, Flow).4041A common production failure is assigning only DocGen User when the org runs automated nightly statement jobs. Those jobs run under an integration user; that user needs DocGen Runtime. Forgetting this causes silent job failures or permission errors that surface only at batch time.4243### Server-Side Batch Cap and Statement Run Design4445The DocGen API enforces a hard limit of 1000 documents per hour on the server side. FSC implementations that generate monthly account statements for large books of business (10,000+ accounts) must plan batch processing windows carefully. The standard pattern is an Apex `Batchable` class that chunks account IDs into groups of 200–300 per batch interval, calls the DocGen REST API per chunk, and uses `System.scheduleBatch` or a nightly scheduled job to spread the load over 10–12 hours before the delivery deadline.4647---4849## Common Patterns5051### Pattern 1 — FINRA Disclosure Delivery Workflow5253**When to use:** A financial advisor's client onboarding or annual review requires delivering a Form ADV or investment advisory agreement that must be recorded as delivered and acknowledged.5455**How it works:**561. OmniScript captures advisor context and client record ID.572. A DataRaptor Extract fetches client name, address, account type, and advisor CRD number from `FinancialAccount`, `Contact`, and `Account` objects.583. DocGen merges the data into a pre-approved Word template and renders a PDF stored as a `ContentDocument` linked to the Contact.594. The OmniScript writes an `AuthorizationFormConsent` record with `Status = Agreed`, `ConsentGivenAt = now()`, and a reference to the `AuthorizationForm` representing the Form ADV version.605. An email action sends the PDF to the client; the `EmailMessage` record is linked to the `AuthorizationFormConsent`.6162**Why not raw email attachment:** Emailing a PDF directly has no FSC audit trail. Without the `AuthorizationFormConsent` record, there is no machine-readable proof of delivery that satisfies FINRA record-keeping rules (Rule 4511).6364### Pattern 2 — Batch Account Statement Generation6566**When to use:** Monthly or quarterly statement production for hundreds or thousands of financial accounts.6768**How it works:**691. A nightly `Schedulable` Apex job queries all active `FinancialAccount` records with a statement preference of `Mail` or `Portal`.702. The `Batchable` class processes accounts in chunks of 200. Each chunk calls the DocGen REST API using a named credential and a prepared `DocGenDocument` JSON payload containing the template ID and record IDs.713. DocGen renders each statement PDF server-side and attaches the output as a `ContentDocument` linked to the `FinancialAccount`.724. Statements flagged for portal delivery are shared to the Experience Cloud site through `ContentDistribution`; paper statements are handed off to a print vendor via an outbound `Platform Event`.735. A post-batch summary record logs run completion time, document count, and any failures for operations review.7475**Why not OmniScript for batch:** OmniScript is an interactive UI engine — it requires a user session. Server-side batch generation must use the DocGen API directly or via a headless Apex callout.7677---7879## Decision Guidance8081| Situation | Recommended Approach | Reason |82|---|---|---|83| Interactive disclosure delivery during onboarding | OmniScript + DocGen + AuthorizationFormConsent | Combines guided UX, document merge, and compliance record in one workflow |84| Automated monthly account statements for 10,000+ accounts | Batch Apex → DocGen API, chunked at 200/batch | Respects 1000 docs/hour server cap; runs overnight without UI dependency |85| Sensitive financial document requiring PCI-in-scope handling | OmniStudio DocGen only (not Document Builder) | Document Builder is explicitly excluded from Salesforce's PCI DSS compliance scope |86| Simple branded letter with no regulatory obligation | Document Builder or Salesforce Files | Lighter weight; OmniStudio DocGen overhead is not justified without compliance needs |87| Proof-of-delivery audit trail required (FINRA, GDPR) | AuthorizationFormConsent + ContentDocument link | DocGen alone does not record delivery; the consent record is the legal artifact |88| Multi-language regulatory disclosure | DocGen template with locale-conditional sections | DataRaptor can pass `Contact.Language__c`; Word template conditional blocks handle language variants |8990---9192## Recommended Workflow9394Step-by-step instructions for an AI agent or practitioner working on this task:95961. **Verify licensing and permissions** — Confirm FSC Industries license is active, OmniStudio DocGen is enabled in the org, and the correct DocGen permission set licenses (Designer / User / Runtime) are assigned to the relevant user profiles. Automated jobs need the Runtime license assigned to the integration user.97982. **Model the compliance data requirement** — Identify whether the workflow requires an `AuthorizationForm` record (representing the regulatory document version), a `DataUseLegalBasis` record (the legal basis for data use), and an `AuthorizationFormConsent` record (the per-contact delivery acknowledgment). Create these records and their relationships before building the DocGen template.991003. **Build the DataRaptor Extract** — Design a DataRaptor Extract transform that fetches all data the template needs: contact demographics, financial account fields, advisor information, and any calculated values. Test the DataRaptor independently against real records before wiring it to DocGen.1011024. **Design and validate the DocGen template** — Create the Word template using OmniStudio DocGen Designer. Use `{{}}`-style merge fields mapped to DataRaptor output keys. Validate the template against a sample record set and confirm the PDF output matches compliance team requirements (font size, required disclosures, page ordering).1031045. **Build the delivery orchestration** — For interactive workflows, build the OmniScript that calls DocGen, stores the PDF, writes the `AuthorizationFormConsent`, and sends the email confirmation. For batch workflows, build the Apex `Batchable` class that chunks accounts and calls the DocGen API, staying within the 1000 documents/hour limit.1051066. **Test delivery and audit trail** — Run end-to-end tests covering: PDF renders correctly, `ContentDocument` is linked to the right parent object, `AuthorizationFormConsent` is written with correct `Status`, and the email or portal delivery confirmation is recorded.1071087. **Review with compliance stakeholders** — Before production deploy, have compliance and legal sign off on the rendered PDF against the approved disclosure language. Confirm the audit trail records satisfy the regulatory record-keeping period requirements (FINRA: 6 years for records, 3 years easily accessible).109110---111112## Review Checklist113114Run through these before marking work in this area complete:115116- [ ] DocGen Runtime permission set license is assigned to the integration user running automated jobs117- [ ] AuthorizationFormConsent record is written for every compliance document generated, not just stored118- [ ] Batch job chunk size does not exceed the DocGen API 1000 documents/hour server-side limit119- [ ] Document Builder is NOT used for PCI-in-scope or highly sensitive financial documents120- [ ] DataRaptor Extract tested independently against representative records before DocGen template wiring121- [ ] PDF output reviewed and signed off by compliance/legal team before production deploy122- [ ] Retention and deletion policy for generated ContentDocuments aligns with regulatory requirements (FINRA 6-year rule)123- [ ] Experience Cloud portal delivery tested if statements are delivered via portal channel124125---126127## Salesforce-Specific Gotchas128129Non-obvious platform behaviors that cause real production problems:1301311. **DocGen Runtime License Missing for Automated Jobs** — Server-side DocGen API calls fail silently or return permission errors when the integration user running a batch Apex job lacks the DocGen Runtime permission set license. This license is separate from DocGen User and is frequently missed because interactive testing (which uses a human user with DocGen User) succeeds but the nightly batch fails. Always assign DocGen Runtime to the integration user profile and verify with a dedicated sandbox batch run before go-live.1321332. **Document Builder PCI Exclusion** — Document Builder, GA in Winter '25, is not covered by Salesforce's PCI DSS compliance attestation. This means any document containing card numbers, account routing data, or other PCI-in-scope data must use OmniStudio DocGen, not Document Builder. The visual similarity between the two tools causes practitioners to choose Document Builder for its lower setup cost, creating a compliance gap that is difficult to remediate post-launch.1341353. **AuthorizationFormConsent Is the Audit Record, Not the PDF** — The `ContentDocument` storing the generated PDF proves a document exists but does not prove delivery or acknowledgment to a regulator. FINRA Rule 4511 and GDPR Article 7 require machine-readable proof of when consent or disclosure was given. The `AuthorizationFormConsent` record with a `ConsentGivenAt` timestamp and a `Status` of `Agreed` is that proof. Omitting this record means the DocGen workflow is incomplete from a compliance standpoint even if the PDF is perfect.136137---138139## Output Artifacts140141| Artifact | Description |142|---|---|143| DocGen template (Word) | Merge-field template stored in OmniStudio DocGen Designer, maps to DataRaptor output keys |144| DataRaptor Extract transform | Fetches all record data required by the template; testable independently |145| AuthorizationForm record | Represents the regulatory document version (e.g., Form ADV version 2024-Q4) |146| AuthorizationFormConsent record | Per-contact delivery record with timestamp and status — the regulatory proof artifact |147| Batch Apex job | Chunked Batchable/Schedulable class for large statement runs respecting the 1000 docs/hour cap |148| ContentDocument links | Stored rendered PDFs linked to the appropriate FSC parent object (FinancialAccount, Contact) |149150---151152## Related Skills153154- omnistudio/document-generation-omnistudio — Covers OmniStudio DocGen mechanics (template authoring, DataRaptor wiring, output format options) independent of FSC; use alongside this skill when building or debugging the DocGen template layer155- admin/fsc-action-plans — Covers FSC Action Plan templates; use when disclosures must trigger follow-up task sequences (e.g., obtain signed disclosure before proceeding with account opening)