# summary

Send a stop signal to in-progress profiling summaries — halt execution to free org resources, preserving fields that already completed.

# description

Profiling runs in the background and consumes org resources — API calls, processing time, and storage writes. When a profiling run needs to yield — because of resource contention, a scheduling conflict, or a configuration issue — this command provides immediate control.

The stop signal is sent and the command returns immediately (fire-and-forget). The backend handles the actual halting asynchronously. Fields that completed before the stop are preserved; unprocessed and in-progress fields are marked as failed. The summary status transitions to canceled.

IMPORTANT: This command stops SUMMARIES, not requests. Summaries are the execution records created after a profiling request is processed. To prevent queued requests from being processed, use `sf cuneiform profile request cancel` instead.

STOP vs CANCEL — these address different objects at different lifecycle stages:

- **Cancel** prevents a Request from being processed. No Summary is created.
- **Stop** halts an active Summary. Partially completed results are preserved.

STOP + REPROFILE form a natural pair: stop a summary to release resources now, then use `sf cuneiform summary reprofile` later to re-execute only the failed and unprocessed fields. The existing summary is reused — no reconfiguration needed.

THREE SELECTION MODES (mutually exclusive):

- **By ID** (`--ids`) — Stop specific summaries by Salesforce record ID
- **All** (`--all`) — Stop all in-progress summaries
- **By object** (`--objects`) — Stop summaries for specific Salesforce objects

Only summaries with in-progress profiling status are eligible. Completed, failed, and canceled summaries are excluded.

WHEN TO USE:

- Peak hours resource management — halt profiling to free API capacity, reprofile during off-hours
- Long-running profiling on a large object — stop one object while others continue
- Pre-maintenance window — stop active summaries before planned downtime
- Definition adjustment — stop a run, fix the definition, then reprofile

NATURAL LANGUAGE → FLAG MAPPING:
"stop everything" → --all
"stop just Account profiling" → --objects Account
"stop this specific summary" → --ids a0Bxx0000001234AAA
"what would be stopped?" → --all --dry-run
"stop without asking" → --all --no-prompt

COMMAND SEQUENCE:
`profile request list` (identify resource-consuming runs) → **`summary stop`** → `summary reprofile` (re-execute when conditions are appropriate)

# flags.target-org.summary

Stop profiling summaries in this Salesforce org. Specify the org alias or username when you have multiple authenticated orgs.

# flags.ids.summary

Stop specific profiling summaries by Salesforce record ID (comma-separated). Use for targeted halting when only some summaries need to stop. Find summary IDs with `definition get`. Mutually exclusive with --all and --objects.

# flags.all.summary

Stop all in-progress profiling summaries across the org. Use for peak hours resource management, pre-maintenance windows, or when the org needs its full API capacity immediately. Mutually exclusive with --ids and --objects.

# flags.objects.summary

Stop profiling for specific Salesforce objects by API name (comma-separated). Use when one object is consuming disproportionate resources while profiling on other objects should continue. Mutually exclusive with --ids and --all.

# flags.dry-run.summary

Preview which summaries would be stopped, showing definition key, summary key, object, status, and planned action. Use to verify scope before sending stop signals — especially important with --all.

# flags.no-prompt.summary

Skip the confirmation prompt and send stop signals immediately. Use in automated scripts, runbooks, or time-sensitive situations where interactive prompts are not practical.

# examples

- Preview what would be stopped — verify scope before committing:

  <%= config.bin %> <%= command.id %> --target-org myOrg --all --dry-run

- Stop all in-progress summaries — free resources during peak hours:

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

- Stop profiling for a specific object while others continue:

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

- Stop specific summaries by ID — targeted precision:

  <%= config.bin %> <%= command.id %> --target-org myOrg --ids a0Bxx0000001234AAA,a0Bxx0000005678AAA

- Stop profiling for multiple objects at once:

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

- Stop immediately for automated runbooks:

  <%= config.bin %> <%= command.id %> --target-org myOrg --all --no-prompt

# errors.noTargetOrg

Could not determine target org username.

# errors.noSelectionCriteria

No selection criteria specified. Provide --ids, --all, or --objects to select summaries.

# errors.mutuallyExclusive

The flags --ids, --all, and --objects are mutually exclusive. Provide only one.

# errors.noEligibleSummaries

No in-progress profiling summaries found matching the specified criteria.

# errors.queryFailed

Failed to query summaries: %s

# errors.stopFailed

Failed to stop summaries: %s

# prompt.confirm.singular

Stop profiling for this summary?

# prompt.confirm.plural

Stop profiling for these %s summaries?

# output.noEligible.message

No in-progress summaries were found matching the specified criteria.

# output.noEligible.guidance

- Please check your filters and confirm that in-progress summaries exist in your Salesforce org.

# output.cancelled

Stop cancelled. No summaries were stopped.

# output.dryRunBanner

[DRY RUN] Would stop %s summary(ies). No changes made.

# output.summary.stopped

Stopped

# output.summary.failed

Failed

# output.summary.total

Total

# output.summaryHeader

Summary
