# summary

Retrieve comprehensive object metadata — fields, record types, data age distribution, relationships, and profiling status — to make informed decisions about what and how to profile.

# description

Understanding an object before profiling it is the difference between a targeted assessment and a fishing expedition. Salesforce scatters object metadata across Object Manager, Schema Builder, and Setup. This command consolidates everything into structured sections from a single call:

- **Object Summary** — record count, field totals, type
- **Record Age Distribution** — year-by-year grid showing when records were created (Cuneiform-exclusive), revealing whether data is actively growing, historical, or stagnant
- **Record Types** — name, developer name, active status, default flag
- **Business Processes** — active processes with record type associations and per-process record age grids
- **Field Summary** — total, standard, custom, formula, lookup counts
- **Field Type Distribution** — type counts with percentages
- **Namespace Breakdown** — fields grouped by namespace prefix showing which managed packages contribute fields
- **External References** — other objects that reference this one via lookups or master-detail
- **Outbound Lookups** — this object's lookup fields and their target objects
- **Profiling Status** — existing definitions, summary counts, last profiled date
- **Field Listing** (opt-in via `--with-fields`) — individual field detail with filtering and sorting

The record age distribution and per-business-process age grids directly inform the choice between metadata, historical, and comparative profiling methods. The profiling status section shows whether definitions already exist, preventing duplicate work.

NATURAL LANGUAGE → FLAG MAPPING:

"Show me the fields" → `--with-fields`
"Just the lookup fields" → `--with-fields --field-type lookup`
"Just custom fields" → `--with-fields --field-pattern "*__c"`
"Sort fields by type" → `--with-fields --sort type`
"Compare multiple objects" → `--object Account,Contact,Opportunity`

For multiple objects (comma-separated), describes run in parallel with aggregate totals across all objects. Big Objects (**b) and External Objects (**x) are not supported — they lack standard SOQL support.

Read-only. Does not modify objects, fields, or metadata. The access gate validates Cuneiform installation and permissions before queries execute.

COMMAND SEQUENCE: `object list` (identify objects of interest) → `object describe` (deep dive on specific objects) → `definition create` (define profiling scope based on what you learned)

# flags.target-org.summary

Describe objects from this Salesforce org. Specify the org alias or username when you have multiple authenticated orgs.

# flags.object.summary

Object API name(s), comma-separated. Use one name for a complete deep dive or multiple for side-by-side comparison with aggregate totals (e.g., `Account,Contact,Opportunity`).

# flags.with-fields.summary

Include a detailed field listing and expand the Relationships and Lookups tables to show all rows (no truncation). Use with `--field-type`, `--field-pattern`, and `--sort` to filter and organize the field listing.

# flags.field-type.summary

Filter the field listing to a specific type (requires `--with-fields`). Valid types: text, picklist, lookup, number, date, formula, checkbox, id, address. Use `lookup` to map the object's relationship network.

# flags.field-pattern.summary

Filter the field listing by API name pattern with wildcard support (requires `--with-fields`). Examples: `*__c` for custom fields, `pnova__*` for Cuneiform namespace fields.

# flags.sort.summary

Sort the field listing by: `name` (alphabetical, the default), `type` (grouped by field type), or `label`. Requires `--with-fields`.

# examples

- Assess an object before building profiling definitions — see all 11 metadata sections:

  <%= config.bin %> <%= command.id %> --object Account --target-org myOrg

- Compare multiple objects in parallel with aggregate totals for profiling scope decisions:

  <%= config.bin %> <%= command.id %> --object Account,Contact,Opportunity --target-org myOrg

- Full field inventory — add detailed field listings to see every field on the object:

  <%= config.bin %> <%= command.id %> --object Account --with-fields --target-org myOrg

- Full relationship listing — expand the Relationships and Lookups tables to show all rows (suppresses the "... (N more)" truncation):

  <%= config.bin %> <%= command.id %> --object Case --with-fields --target-org myOrg

- Relationship mapping — isolate lookup fields to understand the object's position in the data model:

  <%= config.bin %> <%= command.id %> --object Account --with-fields --field-type lookup --sort type --target-org myOrg

- Custom field audit — filter to custom fields for a managed package or customization review:

  <%= config.bin %> <%= command.id %> --object Account --with-fields --field-pattern "\*\_\_c" --target-org myOrg

- JSON for automation — pipe structured metadata to assessment pipelines or architecture documentation:

  <%= config.bin %> <%= command.id %> --object Account --json --target-org myOrg

# output.identity.header

Org Identity

# output.identity.orgName

Org Name

# output.identity.orgId

Org ID

# output.identity.instanceUrl

Instance URL

# output.identity.orgType

Org Type

# output.identity.edition

Edition

# output.identity.namespace

Namespace

# output.identity.username

Username

# errors.orgIdentityFailed

Could not retrieve org identity information. Continuing without org context.

# output.table.recordTypes.name

Name

# output.table.recordTypes.developerName

Developer Name

# output.table.recordTypes.active

Active

# output.table.recordTypes.default

Default

# output.table.fieldTypes.type

Type

# output.table.fieldTypes.count

Count

# output.table.fieldTypes.percent

Percent

# output.table.namespaces.namespace

Namespace

# output.table.namespaces.fieldCount

Field Count

# output.table.fields.apiName

API Name

# output.table.fields.label

Label

# output.table.fields.type

Type

# output.table.fields.custom

Custom

# output.table.fields.namespace

Namespace

# output.table.relationships.relatedObject

Related Object

# output.table.relationships.field

Field

# output.table.lookups.lookupField

Lookup Field

# output.table.lookups.targetObject

Target Object

# output.table.profilingStatus.name

Definition

# output.table.profilingStatus.lastProfiled

Last Profiled
