# summary

Update metadata attributes (name, category, time category, segment category, description) on an existing profiling definition.

# description

A profiling definition has two distinct surfaces: its metadata attributes (name, category, time category, segment category, description) and its field selection. This command edits the metadata attributes only — the field selection set at creation time is not mutable through this command.

Supply one or more of the five attribute flags to update exactly those columns; untouched attributes are preserved.

WHAT IT DOES:

- Writes only the supplied attributes; untouched columns are preserved on the record
- Validates the definition ID format (15 or 18 character Salesforce ID)
- Enforces length constraints: name, category, time category, segment category max 255 chars; description max 8192 chars
- Returns the list of attribute names that were written

WHEN TO USE:

- To rename a definition after a scope change or project rebranding
- To reclassify definitions under a new category for cleaner reporting
- To assign or update time and segment labels after profiling results are reviewed
- To add or revise the description for team documentation purposes

NATURAL LANGUAGE → FLAG MAPPING:
"rename this definition" → --name "New Definition Name"
"set the category to Revenue" → --category "Revenue"
"tag this as Q1 2025" → --time-category "Q1 2025"
"classify as Closed Won accounts" → --segment-category "Closed Won"
"update the description" → --description "Detailed profiling of high-value accounts"

COMMAND SEQUENCE: `definition get` (retrieve current metadata and definition ID) → `definition update` (update attributes) → `definition list` (confirm updated values)

# flags.target-org.summary

Salesforce org containing the definition to update. The command validates permissions before writing.

# flags.id.summary

Salesforce record ID (15 or 18 character) of the profiling definition to update. Retrieve definition IDs with `sf cuneiform definition get` or `sf cuneiform definition list`.

# flags.name.summary

New definition name (max 255 characters). Replaces the current Prop_Name\_\_c value.

# flags.category.summary

New category label (max 255 characters). Replaces the current Prop_Category\_\_c value. Use to group definitions for reporting.

# flags.time-category.summary

New time category label (max 255 characters). Replaces the current Prop_TimeCategory\_\_c value. Examples: "Q1 2025", "Lifetime", "2024".

# flags.segment-category.summary

New segment category label (max 255 characters). Replaces the current Prop_SegmentCategory\_\_c value. Examples: "Closed Won", "PersonAccounts", "Open Cases".

# flags.description.summary

New description (max 8192 characters). Replaces the current Prop_Description\_\_c value. Supports HTML content.

# flags.format.summary

Output format: table (human-readable, default) or json (structured output for scripting).

# examples

- Rename a definition:

  <%= config.bin %> <%= command.id %> --target-org myOrg --id a00000000000001AAA --name "Q1 2025 Revenue Analysis"

- Update the category and time category together:

  <%= config.bin %> <%= command.id %> --target-org myOrg --id a00000000000001AAA --category "Revenue" --time-category "Q1 2025"

- Add a segment category to an existing definition:

  <%= config.bin %> <%= command.id %> --target-org myOrg --id a00000000000001AAA --segment-category "Closed Won"

- Update all five attributes at once:

  <%= config.bin %> <%= command.id %> --target-org myOrg --id a00000000000001AAA --name "Full Profile" --category "Revenue" --time-category "2025" --segment-category "All" --description "Complete revenue profile"

- Output update results as JSON for scripted pipelines:

  <%= config.bin %> <%= command.id %> --target-org myOrg --id a00000000000001AAA --name "Renamed" --json

# errors.invalidDefinitionId

Invalid definition ID format: %s. Expected a 15 or 18 character Salesforce ID.

# errors.noAttributesProvided

No attributes provided. Supply at least one of: --name, --category, --time-category, --segment-category, --description.

# errors.nameTooLong

--name value exceeds maximum length of 255 characters (received %s characters).

# errors.categoryTooLong

--category value exceeds maximum length of 255 characters (received %s characters).

# errors.timeCategoryTooLong

--time-category value exceeds maximum length of 255 characters (received %s characters).

# errors.segmentCategoryTooLong

--segment-category value exceeds maximum length of 255 characters (received %s characters).

# errors.descriptionTooLong

--description value exceeds maximum length of 8192 characters (received %s characters).

# errors.updateFailed

Failed to update definition %s: %s
