What problem does it solve? Building Salesforce OmniStudio document templates involves strict token syntax, paired Extract/Transform OmniDataTransforms, and lifecycle rules where small mistakes (null OutputObjectName, dot notation, wrong image IDs) silently produce blank output or engine crashes. This Skill encodes the verified contracts, pitfalls, and helper scripts so templates generate correctly the first time. ## Core Features & Use Cases - Template authoring and token mapping: Create or modify .docx templates using scalar, repeating-section, conditional (IF_), image (IMG_), hyperlink (HYP_), and rich-text (RTB_) tokens with exact Transform output shapes. - DocumentTemplate lifecycle management: List, inspect, activate/deactivate, upload binaries, and wire Extract/Transform ODTs via the docgen_template_* scripts, with deactivate-before-edit enforcement. - End-to-end verification: Execute Extracts and Transforms via the OmniStudio REST API and run full DGP generation (Extract → Transform → .docx → PDF) as smoke tests. - Use Case: Add a new field to an invoice template by inserting the token in the .docx, adding matching field mappings to the Extract and Transform ODTs, re-toggling them, replacing the template binary, and generating a test document to confirm output. ## Quick Start Ask the agent to read the document-generation skill and generate a test document from template RLM_QuoteProposal against a quote record in the dev-scratch org.