원클릭으로
sf-data
Data operations including SOQL queries, single record CRUD, bulk import/export/update, and search.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Data operations including SOQL queries, single record CRUD, bulk import/export/update, and search.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Salesforce CLI (sf command) reference and best practices. Use this skill when working with Salesforce development, deployment, org management, data operations, or CI/CD workflows. Covers modern sf v2 commands from version 2.140.6 (June 28, 2026).
Raw REST API and GraphQL requests via sf CLI. Use for custom endpoints, GraphQL queries/mutations, and arbitrary HTTP calls to Salesforce APIs.
Org management commands including listing, displaying, opening, and creating Scratch Orgs and Sandboxes.
Agentforce agent management commands including creation, activation, deactivation, and testing.
Apex development commands including class and trigger generation, anonymous execution, unit test running, and debug log management.
Authentication commands for connecting to Salesforce orgs. Includes Web Login, JWT, SFDX-URL, and Access Token flows.
| name | sf-data |
| description | Data operations including SOQL queries, single record CRUD, bulk import/export/update, and search. |
sf data OperationsCommands for data operations.
Execute SOQL queries.
# Basic query
sf data query --target-org myOrg --query "SELECT Id, Name FROM Account LIMIT 10"
# Query with result format
sf data query --target-org myOrg \
--query "SELECT Id, Name, BillingCity FROM Account WHERE BillingCity = 'San Francisco'" \
--result-format json
# Query for output to file
sf data query --target-org myOrg \
--query "SELECT Id, Name FROM Account" > accounts.json
# Query with tooling API
sf data query --target-org myOrg \
--query "SELECT Id, Name FROM ApexClass" \
--use-tooling-api
# Query including deleted records
sf data query --target-org myOrg \
--query "SELECT Id, Name FROM Account" \
--all-rows
# Large exports should use Bulk API 2.0
sf data export bulk --target-org myOrg \
--query "SELECT Id, Name FROM Account" \
--output-file accounts.json \
--result-format json
| Flag | Description |
|---|---|
-q, --query | SOQL query string |
-o, --target-org | Target org |
-r, --result-format | Output format: human, json, csv |
--use-tooling-api | Use Tooling API |
--all-rows | Include deleted records |
--output-file | Write CSV or JSON query output to a file |
Create a single record.
sf data create record --target-org myOrg \
--sobject Account \
--values "Name='Test Account' Industry='Technology'"
Retrieve a single record.
# Get record by ID
sf data get record --target-org myOrg --sobject Account --record-id 001xx
# Get record using WHERE clause
sf data get record --target-org myOrg --sobject Account \
--where "Name='Test Account'"
Update a single record.
sf data update record --target-org myOrg \
--sobject Account \
--record-id 001xx \
--values "Name='Updated Name'"
Delete a single record.
sf data delete record --target-org myOrg --sobject Account --record-id 001xx
Bulk insert records from a CSV file using Bulk API 2.0.
sf data import bulk --target-org myOrg \
--sobject Account \
--file accounts.csv \
--line-ending LF
# With custom column delimiter
sf data import bulk --target-org myOrg \
--sobject Contact \
--file contacts.csv \
--line-ending LF \
--column-delimiter COMMA
| Flag | Description |
|---|---|
-s, --sobject | Target object API name (required) |
-f, --file | CSV file with records (required) |
--line-ending | Line ending: CRLF or LF (required) |
--column-delimiter | Delimiter: BACKQUOTE, CARET, COMMA, PIPE, SEMICOLON, TAB |
-w, --wait | Wait time in minutes |
Bulk export records to a file using SOQL query with Bulk API 2.0.
# Export to CSV
sf data export bulk --target-org myOrg \
--query "SELECT Id, Name FROM Account" \
--output-file accounts.csv \
--result-format csv
# Export to JSON
sf data export bulk --target-org myOrg \
--query "SELECT Id, Name, BillingCity FROM Account WHERE BillingCity = 'Sydney'" \
--output-file accounts.json \
--result-format json
# Export all rows including deleted
sf data export bulk --target-org myOrg \
--query "SELECT Id FROM Account" \
--output-file all.csv \
--all-rows
| Flag | Description |
|---|---|
-q, --query | SOQL query to execute |
--query-file | File containing SOQL query |
-r, --result-format | Output format: csv or json (default: csv) |
--output-file | Output file path (required) |
--all-rows | Include deleted records |
Bulk update records from a CSV file using Bulk API 2.0.
sf data update bulk --target-org myOrg \
--sobject Account \
--file updates.csv \
--line-ending LF
CSV must include the Id column. Flags same as sf data import bulk.
Bulk upsert records using Bulk API 2.0.
# Bulk upsert from CSV with external ID
sf data upsert bulk --target-org myOrg \
--sobject Account \
--file accounts.csv \
--external-id Id
# Upsert with custom external ID
sf data upsert bulk --target-org myOrg \
--sobject Account \
--file accounts.csv \
--external-id Account_External_Id__c
Same as sf data import bulk, plus:
| Flag | Description |
|---|---|
--external-id | External ID field for matching (required) |
Bulk delete records using Bulk API 2.0.
sf data delete bulk --target-org myOrg \
--sobject Account \
--file delete_accounts.csv
CSV must include the Id column.
Export/import data in tree format (parent-child relationships).
# Export data
sf data tree export --target-org myOrg \
--query "SELECT Id, Name, (SELECT Id, Name FROM Contacts) FROM Account LIMIT 10" \
--output-dir export-data
# Import data
sf data tree import --target-org myOrg \
--sobject-tree-files export-data/Account.json
Execute SOSL search.
sf data search --target-org myOrg --query "FIND {John} IN ALL FIELDS"
Upload file to Salesforce.
sf data create file --target-org myOrg \
--file path/to/document.pdf \
--title "My Document" \
--parent-id 001xx000003DGbY
Resume bulk operations. There is no generic sf data bulk status,
sf data bulk results, or sf data resume bulk command in CLI 2.140.6; use
the operation-specific resume command printed by the original bulk command.
# Resume bulk import
sf data import resume --job-id <job-id> --json
# Resume bulk export
sf data export resume --job-id <job-id> --json
# Resume bulk update/upsert/delete
sf data update resume --job-id <job-id> --target-org myOrg --json
sf data upsert resume --job-id <job-id> --target-org myOrg --json
sf data delete resume --job-id <job-id> --target-org myOrg --json