$npx -y skills add forcedotcom/sf-skills --skill omnistudio-datamapper-generateOmniStudio Data Mapper (formerly DataRaptor) creation and validation with 100-point scoring. Use when building Extract, Transform, Load, or Turbo Extract Data Mappers, mapping Salesforce object fields, or reviewing existing Data Mapper configurations. TRIGGER when: user creates D
| 1 | # omnistudio-datamapper-generate: OmniStudio Data Mapper Creation and Validation |
| 2 | |
| 3 | Expert OmniStudio Data Mapper developer specializing in Extract, Transform, Load, and Turbo Extract configurations. Generate production-ready, performant, and maintainable Data Mapper definitions with proper field mappings, query optimization, and data integrity safeguards. |
| 4 | |
| 5 | --- |
| 6 | |
| 7 | ## Scope |
| 8 | |
| 9 | - **In scope**: Creating and validating OmniStudio Data Mapper configurations (Extract, Transform, Load, Turbo Extract); field mapping design; query optimization; FLS (Field-Level Security) validation; deployment via platform-metadata-deploy skill |
| 10 | - **Out of scope**: Building Integration Procedures (use `omnistudio-integration-procedure-generate`), authoring OmniScripts (use `omnistudio-omniscript-generate`), designing FlexCards (use `omnistudio-flexcard-generate`), analyzing cross-component dependencies (use `omnistudio-dependencies-analyze`) |
| 11 | |
| 12 | --- |
| 13 | |
| 14 | ## Core Responsibilities |
| 15 | |
| 16 | 1. **Generation**: Create Data Mapper configurations (Extract, Transform, Load, Turbo Extract) from requirements |
| 17 | 2. **Field Mapping**: Design object-to-output field mappings with proper type handling, lookup resolution, and null safety |
| 18 | 3. **Dependency Tracking**: Identify related OmniStudio components (Integration Procedures, OmniScripts, FlexCards) that consume or feed Data Mappers |
| 19 | 4. **Validation & Scoring**: Score Data Mapper configurations against 5 categories (0-100 points) |
| 20 | |
| 21 | --- |
| 22 | |
| 23 | ## CRITICAL: Orchestration Order |
| 24 | |
| 25 | **omnistudio-dependencies-analyze -> omnistudio-datamapper-generate -> omnistudio-integration-procedure-generate -> omnistudio-omniscript-generate -> omnistudio-flexcard-generate** (you are here: omnistudio-datamapper-generate) |
| 26 | |
| 27 | Data Mappers are the data access layer of the OmniStudio stack. They must be created and deployed before Integration Procedures or OmniScripts that reference them. Use omnistudio-dependencies-analyze FIRST to understand existing component dependencies. |
| 28 | |
| 29 | --- |
| 30 | |
| 31 | ## Key Insights |
| 32 | |
| 33 | | Insight | Details | |
| 34 | |---------|---------| |
| 35 | | **Extract vs Turbo Extract** | Extract uses standard SOQL with relationship queries. Turbo Extract uses server-side compiled queries for read-heavy, high-volume scenarios (10x+ faster). Turbo Extract does not support formula fields, related lists, or write operations. | |
| 36 | | **Transform is in-memory** | Transform Data Mappers operate entirely in memory with no DML or SOQL. They reshape data structures between steps in an Integration Procedure. Use for JSON-to-JSON transformations, field renaming, and data flattening. | |
| 37 | | **Load = DML** | Load Data Mappers perform insert, update, upsert, or delete operations. They require proper FLS checks and error handling. Always validate field-level security before deploying Load Data Mappers to production. | |
| 38 | | **OmniDataTransform metadata** | Data Mappers are stored as OmniDataTransform and OmniDataTransformItem records. Retrieve and deploy using these metadata type names, not the legacy DataRaptor API names. | |
| 39 | |
| 40 | --- |
| 41 | |
| 42 | ## Workflow (5-Phase Pattern) |
| 43 | |
| 44 | ### Phase 1: Requirements Gathering |
| 45 | |
| 46 | **Ask the user** to gather: |
| 47 | - Data Mapper type (Extract, Transform, Load, Turbo Extract) |
| 48 | - Target Salesforce object(s) and fields |
| 49 | - Target org alias |
| 50 | - Consuming component (Integration Procedure, OmniScript, or FlexCard name) |
| 51 | - Data volume expectations (record counts, frequency) |
| 52 | |
| 53 | **Then**: |
| 54 | 1. Check existing Data Mappers: `Glob: **/OmniDataTransform*` |
| 55 | 2. Check existing OmniStudio metadata: `Glob: **/omnistudio/**` |
| 56 | 3. Create a task list |
| 57 | |
| 58 | --- |
| 59 | |
| 60 | ### Phase 2: Design & Type Selection |
| 61 | |
| 62 | | Type | Use Case | Naming Prefix | Supports DML | Supports SOQL | |
| 63 | |------|----------|---------------|--------------|---------------| |
| 64 | | **Extract** | Read data from one or more objects with relationship queries | `DR_Extract_` | No | Yes | |
| 65 | | **Turbo Extract** | High-volume read-only queries, server-side compiled | `DR_TurboExtract_` | No | Yes (compiled) | |
| 66 | | **Transform** | In-memory data reshaping between procedure steps | `DR_Transform_` | No | No | |
| 67 | | **Load** | Write data (insert, update, upsert, delete) | `DR_Load_` | Yes | No | |
| 68 | |
| 69 | **Naming Format**: `[Prefix][Object]_[Purpose]` using PascalCase |
| 70 | |
| 71 | **Examples**: |
| 72 | - `DR_Extract_Account_Details` -- Extract Account with related Contacts |
| 73 | - `DR_TurboExtract_Case_L |