$npx -y skills add forcedotcom/sf-skills --skill data360-schema-getRetrieve Data Lake Object (DLO) and Data Model Object (DMO) schema information from Salesforce Data Cloud using REST APIs. Use this skill when you need to inspect DLO or DMO field definitions, data types, or metadata. Takes org alias and optional DLO/DMO name as parameters.
| 1 | # data360-schema-get Skill |
| 2 | |
| 3 | |
| 4 | ## Overview |
| 5 | |
| 6 | This skill retrieves Data Lake Object (DLO) and Data Model Object (DMO) schema information from Salesforce Data Cloud using the SSOT REST API. It can list all DLOs or DMOs in an org, or retrieve detailed schema for a specific DLO or DMO. |
| 7 | |
| 8 | ## When to Use |
| 9 | |
| 10 | - User wants to see all DLOs or DMOs in a Data Cloud org |
| 11 | - User needs field schema for a specific DLO or DMO |
| 12 | - User is exploring Data Cloud data structures |
| 13 | - User needs to understand DLO or DMO field types and metadata |
| 14 | |
| 15 | ## Prerequisites |
| 16 | |
| 17 | - SF CLI installed and authenticated to target org |
| 18 | - Org has Data Cloud enabled |
| 19 | - User has appropriate Data Cloud permissions |
| 20 | |
| 21 | ## Skill Execution |
| 22 | |
| 23 | ### Parameters |
| 24 | |
| 25 | 1. **org_alias** (required): The SF CLI org alias (e.g., 'afvibe', 'myorg') |
| 26 | 2. **dlo_name** (optional): Specific DLO developer name (e.g., 'Employee__dll') |
| 27 | 3. **dmo_name** (optional): Specific DMO developer name (e.g., 'Individual__dlm') |
| 28 | |
| 29 | ### Step 1: Discover Connected Org |
| 30 | |
| 31 | First, run `sf org list` to find out which org is connected and extract the alias to use for all subsequent calls: |
| 32 | |
| 33 | ```bash |
| 34 | sf org list |
| 35 | ``` |
| 36 | |
| 37 | Example output: |
| 38 | ```text |
| 39 | ┌────┬───────┬──────────────────────────┬────────────────────┬───────────┐ |
| 40 | │ │ Alias │ Username │ Org Id │ Status │ |
| 41 | ├────┼───────┼──────────────────────────┼────────────────────┼───────────┤ |
| 42 | │ 🍁 │ myorg │ chandresh@afvidedemo.org │ 00DKZ00000b80NT2AY │ Connected │ |
| 43 | └────┴───────┴──────────────────────────┴────────────────────┴───────────┘ |
| 44 | ``` |
| 45 | |
| 46 | Extract the **Alias** value (e.g., `myorg`) from the output and use it as the `<org_alias>` for all subsequent calls. Use `--all` to see expired and deleted scratch orgs as well. |
| 47 | |
| 48 | ### Step 2: Validate SF CLI Authentication |
| 49 | |
| 50 | Before making API calls, verify the org is connected: |
| 51 | |
| 52 | ```bash |
| 53 | sf org display --target-org <org_alias> --json |
| 54 | ``` |
| 55 | |
| 56 | If not connected, inform user to run: |
| 57 | ```bash |
| 58 | sf org login web --alias <org_alias> |
| 59 | ``` |
| 60 | |
| 61 | ### Step 3a: Execute DLO Schema Script |
| 62 | |
| 63 | The Python scripts are bundled with this skill in the `scripts/` subdirectory. |
| 64 | |
| 65 | **To list all DLOs:** |
| 66 | ```bash |
| 67 | python3 ./scripts/get_dlo_schema.py <org_alias> |
| 68 | ``` |
| 69 | |
| 70 | **To get specific DLO schema:** |
| 71 | ```bash |
| 72 | python3 ./scripts/get_dlo_schema.py <org_alias> <dlo_name> |
| 73 | ``` |
| 74 | |
| 75 | ### Step 3b: Execute DMO Schema Script |
| 76 | |
| 77 | **To list all DMOs:** |
| 78 | ```bash |
| 79 | python3 ./scripts/get_dmo_schema.py <org_alias> |
| 80 | ``` |
| 81 | |
| 82 | **To get specific DMO schema:** |
| 83 | ```bash |
| 84 | python3 ./scripts/get_dmo_schema.py <org_alias> <dmo_name> |
| 85 | ``` |
| 86 | |
| 87 | ### Step 4: Present Results |
| 88 | |
| 89 | Parse and present the results in a user-friendly format: |
| 90 | |
| 91 | **For DLO List:** |
| 92 | - Show DLO name, label, category, and ID |
| 93 | - Indicate total count |
| 94 | - Highlight DLOs with data (totalRecords > 0) |
| 95 | |
| 96 | **For DLO Schema:** |
| 97 | - Show basic info (name, label, category, status) |
| 98 | - List all fields with: |
| 99 | - Field name |
| 100 | - Data type |
| 101 | - Primary key indicator |
| 102 | - Nullable status |
| 103 | - Highlight custom fields (exclude system fields like DataSource__c, cdp_sys_*) |
| 104 | - Show record count if available |
| 105 | |
| 106 | **For DMO List:** |
| 107 | - Show DMO name, label, category, and ID |
| 108 | - Indicate total count |
| 109 | |
| 110 | **For DMO Schema:** |
| 111 | - Show basic info (name, label, category, description) |
| 112 | - List all fields with: |
| 113 | - Field name |
| 114 | - Data type |
| 115 | - Primary key indicator |
| 116 | - Nullable status |
| 117 | - Show dataspace information if available |
| 118 | |
| 119 | ### Step 5: Offer Next Steps |
| 120 | |
| 121 | After displaying results, suggest relevant follow-up actions: |
| 122 | - Query data from the DLO |
| 123 | - Create calculated insights |
| 124 | - Build segments |
| 125 | - Set up data streams |
| 126 | - Create DMO mappings |
| 127 | |
| 128 | ## API Endpoints Used |
| 129 | |
| 130 | ### List All DLOs |
| 131 | ```text |
| 132 | GET /services/data/v64.0/ssot/data-lake-objects |
| 133 | ``` |
| 134 | |
| 135 | Response structure: |
| 136 | ```json |
| 137 | { |
| 138 | "dataLakeObjects": [ |
| 139 | { |
| 140 | "name": "Employee__dll", |
| 141 | "label": "Employee", |
| 142 | "category": "Profile", |
| 143 | "id": "1dlXXXXXXXXXXXXXXX", |
| 144 | "status": "ACTIVE", |
| 145 | "totalRecords": 12, |
| 146 | "fields": [...] |
| 147 | } |
| 148 | ], |
| 149 | "totalSize": 5 |
| 150 | } |
| 151 | ``` |
| 152 | |
| 153 | ### Get DLO Schema |
| 154 | ```text |
| 155 | GET /services/data/v64.0/ssot/data-lake-objects/{dlo_name} |
| 156 | ``` |
| 157 | |
| 158 | Response structure (same as individual object in list response, but wrapped in paginated format). |
| 159 | |
| 160 | ### List All DMOs |
| 161 | ```text |
| 162 | GET /services/data/v64.0/ssot/data-model-objects |
| 163 | ``` |
| 164 | |
| 165 | Response structure: |
| 166 | ```json |
| 167 | { |
| 168 | "dataModelObjects": [ |
| 169 | { |
| 170 | "name": "Individual__dlm", |
| 171 | "label": "Individual", |
| 172 | "category": "Profile", |
| 173 | "id": "0dmXXXXXXXXXXXXXXX", |
| 174 | "fields": [...] |
| 175 | } |
| 176 | ], |
| 177 | "totalSize": 10 |
| 178 | } |
| 179 | ``` |
| 180 | |
| 181 | ### Get DMO Schema |
| 182 | ```text |
| 183 | GET /services/data/v64.0/ssot/data-model-objects/{dmo_name} |
| 184 | ``` |
| 185 | |
| 186 | Response structure (same as individual object in list response, but wrapped in paginated format). |
| 187 | |
| 188 | ## Error Handling |
| 189 | |
| 190 | **Common Issues:** |
| 191 | |
| 192 | 1. **Org not connected** |