{
  "schemaVersion": "1.0",
  "item": {
    "slug": "salesforce",
    "name": "Salesforce Skill",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/ArvorCo/salesforce",
    "canonicalUrl": "https://clawhub.ai/ArvorCo/salesforce",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/salesforce",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=salesforce",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/salesforce"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/salesforce",
    "agentPageUrl": "https://openagent3.xyz/skills/salesforce/agent",
    "manifestUrl": "https://openagent3.xyz/skills/salesforce/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/salesforce/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Salesforce Skill",
        "body": "Use the Salesforce CLI (sf) to interact with Salesforce orgs. The CLI must be authenticated before use. Always add --json for structured output.\n\nIf the sf binary is not available, install it via npm (npm install -g @salesforce/cli) or download it from https://developer.salesforce.com/tools/salesforcecli. After installing, authenticate immediately with sf org login web to connect to a Salesforce org."
      },
      {
        "title": "Log in (opens browser)",
        "body": "sf org login web --alias my-org\n\nOther login methods:\n\n# JWT-based login (CI/automation)\nsf org login jwt --client-id <consumer-key> --jwt-key-file server.key --username user@example.com --alias my-org\n\n# Login with an existing access token\nsf org login access-token --instance-url https://mycompany.my.salesforce.com\n\n# Login via SFDX auth URL (from a file)\nsf org login sfdx-url --sfdx-url-file authUrl.txt --alias my-org"
      },
      {
        "title": "Manage orgs",
        "body": "# List all authenticated orgs\nsf org list --json\n\n# Display info about the default org (access token, instance URL, username)\nsf org display --json\n\n# Display info about a specific org\nsf org display --target-org my-org --json\n\n# Display with SFDX auth URL (sensitive - contains refresh token)\nsf org display --target-org my-org --verbose --json\n\n# Open org in browser\nsf org open\nsf org open --target-org my-org\n\n# Log out\nsf org logout --target-org my-org"
      },
      {
        "title": "Configuration and aliases",
        "body": "# Set default target org\nsf config set target-org my-org\n\n# List all config variables\nsf config list\n\n# Get a specific config value\nsf config get target-org\n\n# Set an alias\nsf alias set prod=user@example.com\n\n# List aliases\nsf alias list"
      },
      {
        "title": "Querying Data (SOQL)",
        "body": "Standard SOQL queries via the default API:\n\n# Basic query\nsf data query --query \"SELECT Id, Name, Email FROM Contact LIMIT 10\" --json\n\n# WHERE clause\nsf data query --query \"SELECT Id, Name, Amount, StageName FROM Opportunity WHERE StageName = 'Closed Won'\" --json\n\n# Relationship queries (parent-to-child)\nsf data query --query \"SELECT Id, Name, (SELECT LastName, Email FROM Contacts) FROM Account LIMIT 5\" --json\n\n# Relationship queries (child-to-parent)\nsf data query --query \"SELECT Id, Name, Account.Name FROM Contact\" --json\n\n# LIKE for text search\nsf data query --query \"SELECT Id, Name FROM Account WHERE Name LIKE '%Acme%'\" --json\n\n# Date filtering\nsf data query --query \"SELECT Id, Name, CreatedDate FROM Lead WHERE CreatedDate = TODAY\" --json\n\n# ORDER BY + LIMIT\nsf data query --query \"SELECT Id, Name, Amount FROM Opportunity ORDER BY Amount DESC LIMIT 20\" --json\n\n# Include deleted/archived records\nsf data query --query \"SELECT Id, Name FROM Account\" --all-rows --json\n\n# Query from a file\nsf data query --file query.soql --json\n\n# Tooling API queries (metadata objects like ApexClass, ApexTrigger)\nsf data query --query \"SELECT Id, Name, Status FROM ApexClass\" --use-tooling-api --json\n\n# Output to CSV file\nsf data query --query \"SELECT Id, Name, Email FROM Contact\" --result-format csv --output-file contacts.csv\n\n# Target a specific org\nsf data query --query \"SELECT Id, Name FROM Account\" --target-org my-org --json\n\nFor queries returning more than 10,000 records, use Bulk API instead:\n\nsf data export bulk --query \"SELECT Id, Name, Email FROM Contact\" --output-file contacts.csv --result-format csv --wait 10\nsf data export bulk --query \"SELECT Id, Name FROM Account\" --output-file accounts.json --result-format json --wait 10"
      },
      {
        "title": "Text Search (SOSL)",
        "body": "SOSL searches across multiple objects at once:\n\n# Search for text across objects\nsf data search --query \"FIND {John Smith} IN ALL FIELDS RETURNING Contact(Name, Email), Lead(Name, Email)\" --json\n\n# Search in name fields only\nsf data search --query \"FIND {Acme} IN NAME FIELDS RETURNING Account(Name, Industry), Contact(Name)\" --json\n\n# Search from a file\nsf data search --file search.sosl --json\n\n# Output to CSV\nsf data search --query \"FIND {test} RETURNING Contact(Name)\" --result-format csv"
      },
      {
        "title": "Get a record",
        "body": "# By record ID\nsf data get record --sobject Contact --record-id 003XXXXXXXXXXXX --json\n\n# By field match (WHERE-like)\nsf data get record --sobject Account --where \"Name=Acme\" --json\n\n# By multiple fields (values with spaces need single quotes)\nsf data get record --sobject Account --where \"Name='Universal Containers' Phone='(123) 456-7890'\" --json"
      },
      {
        "title": "Create a record (confirm with user first)",
        "body": "sf data create record --sobject Contact --values \"FirstName='Jane' LastName='Doe' Email='jane@example.com'\" --json\n\nsf data create record --sobject Account --values \"Name='New Company' Website=www.example.com Industry='Technology'\" --json\n\n# Tooling API object\nsf data create record --sobject TraceFlag --use-tooling-api --values \"DebugLevelId=7dl... LogType=CLASS_TRACING\" --json"
      },
      {
        "title": "Update a record (confirm with user first)",
        "body": "# By ID\nsf data update record --sobject Contact --record-id 003XXXXXXXXXXXX --values \"Email='updated@example.com'\" --json\n\n# By field match\nsf data update record --sobject Account --where \"Name='Old Acme'\" --values \"Name='New Acme'\" --json\n\n# Multiple fields\nsf data update record --sobject Account --record-id 001XXXXXXXXXXXX --values \"Name='Acme III' Website=www.example.com\" --json"
      },
      {
        "title": "Delete a record (require explicit user confirmation)",
        "body": "# By ID\nsf data delete record --sobject Account --record-id 001XXXXXXXXXXXX --json\n\n# By field match\nsf data delete record --sobject Account --where \"Name=Acme\" --json"
      },
      {
        "title": "Bulk Data Operations (Bulk API 2.0)",
        "body": "For large datasets (thousands to millions of records):"
      },
      {
        "title": "Bulk export",
        "body": "# Export to CSV\nsf data export bulk --query \"SELECT Id, Name, Email FROM Contact\" --output-file contacts.csv --result-format csv --wait 10\n\n# Export to JSON\nsf data export bulk --query \"SELECT Id, Name FROM Account\" --output-file accounts.json --result-format json --wait 10\n\n# Include soft-deleted records\nsf data export bulk --query \"SELECT Id, Name FROM Account\" --output-file accounts.csv --result-format csv --all-rows --wait 10\n\n# Resume a timed-out export\nsf data export resume --job-id 750XXXXXXXXXXXX --json"
      },
      {
        "title": "Bulk import",
        "body": "# Import from CSV\nsf data import bulk --file accounts.csv --sobject Account --wait 10\n\n# Resume a timed-out import\nsf data import resume --job-id 750XXXXXXXXXXXX --json"
      },
      {
        "title": "Bulk upsert",
        "body": "sf data upsert bulk --file contacts.csv --sobject Contact --external-id Email --wait 10"
      },
      {
        "title": "Bulk delete",
        "body": "# Delete records listed in CSV (CSV must have an Id column)\nsf data delete bulk --file records-to-delete.csv --sobject Contact --wait 10"
      },
      {
        "title": "Tree export/import (for related records)",
        "body": "# Export with relationships into JSON tree format\nsf data export tree --query \"SELECT Id, Name, (SELECT Name, Email FROM Contacts) FROM Account\" --json\n\n# Export with a plan file (for multiple objects)\nsf data export tree --query \"SELECT Id, Name FROM Account\" --plan --output-dir export-data\n\n# Import from tree JSON files\nsf data import tree --files Account.json,Contact.json\n\n# Import using a plan definition file\nsf data import tree --plan Account-Contact-plan.json"
      },
      {
        "title": "Schema Inspection",
        "body": "# Describe an object (fields, relationships, picklist values)\nsf sobject describe --sobject Account --json\n\n# Describe a custom object\nsf sobject describe --sobject MyCustomObject__c --json\n\n# Describe a Tooling API object\nsf sobject describe --sobject ApexClass --use-tooling-api --json\n\n# List all objects\nsf sobject list --json\n\n# List only custom objects\nsf sobject list --sobject custom --json\n\n# List only standard objects\nsf sobject list --sobject standard --json"
      },
      {
        "title": "Execute Apex Code",
        "body": "# Execute Apex from a file\nsf apex run --file script.apex --json\n\n# Run interactively (type code, press Ctrl+D to execute)\nsf apex run\n\n# Run Apex tests\nsf apex run test --test-names MyTestClass --json\n\n# Get test results\nsf apex get test --test-run-id 707XXXXXXXXXXXX --json\n\n# View Apex logs\nsf apex list log --json\nsf apex get log --log-id 07LXXXXXXXXXXXX"
      },
      {
        "title": "REST API (Advanced)",
        "body": "Make arbitrary authenticated REST API calls:\n\n# GET request\nsf api request rest 'services/data/v62.0/limits' --json\n\n# List API versions\nsf api request rest '/services/data/' --json\n\n# Create a record via REST\nsf api request rest '/services/data/v62.0/sobjects/Account' --method POST --body '{\"Name\":\"REST Account\",\"Industry\":\"Technology\"}' --json\n\n# Update a record via REST (PATCH)\nsf api request rest '/services/data/v62.0/sobjects/Account/001XXXXXXXXXXXX' --method PATCH --body '{\"BillingCity\":\"San Francisco\"}' --json\n\n# GraphQL query\nsf api request graphql --body '{\"query\":\"{ uiapi { query { Account { edges { node { Name { value } } } } } } }\"}' --json\n\n# Custom headers\nsf api request rest '/services/data/v62.0/limits' --header 'Accept: application/xml'\n\n# Save response to file\nsf api request rest '/services/data/v62.0/limits' --stream-to-file limits.json"
      },
      {
        "title": "Metadata Deployment and Retrieval",
        "body": "# Deploy metadata to an org\nsf project deploy start --source-dir force-app --json\n\n# Deploy specific metadata components\nsf project deploy start --metadata ApexClass:MyClass --json\n\n# Retrieve metadata from an org\nsf project retrieve start --metadata ApexClass --json\n\n# Check deploy status\nsf project deploy report --job-id 0AfXXXXXXXXXXXX --json\n\n# Generate a new Salesforce DX project\nsf project generate --name my-project\n\n# List metadata components in the org\nsf project list ignored --json"
      },
      {
        "title": "Diagnostics",
        "body": "# Run CLI diagnostics\nsf doctor\n\n# Check CLI version\nsf version\n\n# See what is new\nsf whatsnew"
      },
      {
        "title": "Common SOQL Patterns",
        "body": "-- Count records\nSELECT COUNT() FROM Contact WHERE AccountId = '001XXXXXXXXXXXX'\n\n-- Aggregate query\nSELECT StageName, COUNT(Id), SUM(Amount) FROM Opportunity GROUP BY StageName\n\n-- Date literals\nSELECT Id, Name FROM Lead WHERE CreatedDate = LAST_N_DAYS:30\n\n-- Subquery (semi-join)\nSELECT Id, Name FROM Account WHERE Id IN (SELECT AccountId FROM Contact WHERE Email LIKE '%@acme.com')\n\n-- Polymorphic lookup\nSELECT Id, Who.Name, Who.Type FROM Task WHERE Who.Type = 'Contact'\n\n-- Multiple WHERE conditions\nSELECT Id, Name, Amount FROM Opportunity WHERE Amount > 10000 AND StageName != 'Closed Lost' AND CloseDate = THIS_QUARTER"
      },
      {
        "title": "Guardrails",
        "body": "Always use --json for structured, parseable output.\nNever create, update, or delete records without explicit user confirmation. Describe the operation and ask before executing.\nNever delete records unless the user explicitly requests it and confirms the specific record(s).\nNever bulk delete or bulk import without user reviewing the file/query and confirming.\nUse LIMIT on queries to avoid excessive data. Start with LIMIT 10 and increase if the user needs more.\nFor queries over 10,000 records, use sf data export bulk instead of sf data query.\nWhen the user asks to \"find\" or \"search\" a single object, use SOQL WHERE ... LIKE '%term%'. When searching across multiple objects, use SOSL via sf data search.\nUse --target-org <alias> when the user has multiple orgs; ask which org if ambiguous.\nIf authentication fails or a session expires, guide the user through sf org login web.\nBulk API 2.0 has SOQL limitations (no aggregate functions like COUNT()). Use standard sf data query for those.\nWhen describing objects (sf sobject describe), the JSON output can be very large. Summarize the key fields, required fields, and relationships for the user rather than dumping the raw output."
      }
    ],
    "body": "Salesforce Skill\n\nUse the Salesforce CLI (sf) to interact with Salesforce orgs. The CLI must be authenticated before use. Always add --json for structured output.\n\nIf the sf binary is not available, install it via npm (npm install -g @salesforce/cli) or download it from https://developer.salesforce.com/tools/salesforcecli. After installing, authenticate immediately with sf org login web to connect to a Salesforce org.\n\nAuthentication and Org Management\nLog in (opens browser)\nsf org login web --alias my-org\n\n\nOther login methods:\n\n# JWT-based login (CI/automation)\nsf org login jwt --client-id <consumer-key> --jwt-key-file server.key --username user@example.com --alias my-org\n\n# Login with an existing access token\nsf org login access-token --instance-url https://mycompany.my.salesforce.com\n\n# Login via SFDX auth URL (from a file)\nsf org login sfdx-url --sfdx-url-file authUrl.txt --alias my-org\n\nManage orgs\n# List all authenticated orgs\nsf org list --json\n\n# Display info about the default org (access token, instance URL, username)\nsf org display --json\n\n# Display info about a specific org\nsf org display --target-org my-org --json\n\n# Display with SFDX auth URL (sensitive - contains refresh token)\nsf org display --target-org my-org --verbose --json\n\n# Open org in browser\nsf org open\nsf org open --target-org my-org\n\n# Log out\nsf org logout --target-org my-org\n\nConfiguration and aliases\n# Set default target org\nsf config set target-org my-org\n\n# List all config variables\nsf config list\n\n# Get a specific config value\nsf config get target-org\n\n# Set an alias\nsf alias set prod=user@example.com\n\n# List aliases\nsf alias list\n\nQuerying Data (SOQL)\n\nStandard SOQL queries via the default API:\n\n# Basic query\nsf data query --query \"SELECT Id, Name, Email FROM Contact LIMIT 10\" --json\n\n# WHERE clause\nsf data query --query \"SELECT Id, Name, Amount, StageName FROM Opportunity WHERE StageName = 'Closed Won'\" --json\n\n# Relationship queries (parent-to-child)\nsf data query --query \"SELECT Id, Name, (SELECT LastName, Email FROM Contacts) FROM Account LIMIT 5\" --json\n\n# Relationship queries (child-to-parent)\nsf data query --query \"SELECT Id, Name, Account.Name FROM Contact\" --json\n\n# LIKE for text search\nsf data query --query \"SELECT Id, Name FROM Account WHERE Name LIKE '%Acme%'\" --json\n\n# Date filtering\nsf data query --query \"SELECT Id, Name, CreatedDate FROM Lead WHERE CreatedDate = TODAY\" --json\n\n# ORDER BY + LIMIT\nsf data query --query \"SELECT Id, Name, Amount FROM Opportunity ORDER BY Amount DESC LIMIT 20\" --json\n\n# Include deleted/archived records\nsf data query --query \"SELECT Id, Name FROM Account\" --all-rows --json\n\n# Query from a file\nsf data query --file query.soql --json\n\n# Tooling API queries (metadata objects like ApexClass, ApexTrigger)\nsf data query --query \"SELECT Id, Name, Status FROM ApexClass\" --use-tooling-api --json\n\n# Output to CSV file\nsf data query --query \"SELECT Id, Name, Email FROM Contact\" --result-format csv --output-file contacts.csv\n\n# Target a specific org\nsf data query --query \"SELECT Id, Name FROM Account\" --target-org my-org --json\n\n\nFor queries returning more than 10,000 records, use Bulk API instead:\n\nsf data export bulk --query \"SELECT Id, Name, Email FROM Contact\" --output-file contacts.csv --result-format csv --wait 10\nsf data export bulk --query \"SELECT Id, Name FROM Account\" --output-file accounts.json --result-format json --wait 10\n\nText Search (SOSL)\n\nSOSL searches across multiple objects at once:\n\n# Search for text across objects\nsf data search --query \"FIND {John Smith} IN ALL FIELDS RETURNING Contact(Name, Email), Lead(Name, Email)\" --json\n\n# Search in name fields only\nsf data search --query \"FIND {Acme} IN NAME FIELDS RETURNING Account(Name, Industry), Contact(Name)\" --json\n\n# Search from a file\nsf data search --file search.sosl --json\n\n# Output to CSV\nsf data search --query \"FIND {test} RETURNING Contact(Name)\" --result-format csv\n\nSingle Record Operations\nGet a record\n# By record ID\nsf data get record --sobject Contact --record-id 003XXXXXXXXXXXX --json\n\n# By field match (WHERE-like)\nsf data get record --sobject Account --where \"Name=Acme\" --json\n\n# By multiple fields (values with spaces need single quotes)\nsf data get record --sobject Account --where \"Name='Universal Containers' Phone='(123) 456-7890'\" --json\n\nCreate a record (confirm with user first)\nsf data create record --sobject Contact --values \"FirstName='Jane' LastName='Doe' Email='jane@example.com'\" --json\n\nsf data create record --sobject Account --values \"Name='New Company' Website=www.example.com Industry='Technology'\" --json\n\n# Tooling API object\nsf data create record --sobject TraceFlag --use-tooling-api --values \"DebugLevelId=7dl... LogType=CLASS_TRACING\" --json\n\nUpdate a record (confirm with user first)\n# By ID\nsf data update record --sobject Contact --record-id 003XXXXXXXXXXXX --values \"Email='updated@example.com'\" --json\n\n# By field match\nsf data update record --sobject Account --where \"Name='Old Acme'\" --values \"Name='New Acme'\" --json\n\n# Multiple fields\nsf data update record --sobject Account --record-id 001XXXXXXXXXXXX --values \"Name='Acme III' Website=www.example.com\" --json\n\nDelete a record (require explicit user confirmation)\n# By ID\nsf data delete record --sobject Account --record-id 001XXXXXXXXXXXX --json\n\n# By field match\nsf data delete record --sobject Account --where \"Name=Acme\" --json\n\nBulk Data Operations (Bulk API 2.0)\n\nFor large datasets (thousands to millions of records):\n\nBulk export\n# Export to CSV\nsf data export bulk --query \"SELECT Id, Name, Email FROM Contact\" --output-file contacts.csv --result-format csv --wait 10\n\n# Export to JSON\nsf data export bulk --query \"SELECT Id, Name FROM Account\" --output-file accounts.json --result-format json --wait 10\n\n# Include soft-deleted records\nsf data export bulk --query \"SELECT Id, Name FROM Account\" --output-file accounts.csv --result-format csv --all-rows --wait 10\n\n# Resume a timed-out export\nsf data export resume --job-id 750XXXXXXXXXXXX --json\n\nBulk import\n# Import from CSV\nsf data import bulk --file accounts.csv --sobject Account --wait 10\n\n# Resume a timed-out import\nsf data import resume --job-id 750XXXXXXXXXXXX --json\n\nBulk upsert\nsf data upsert bulk --file contacts.csv --sobject Contact --external-id Email --wait 10\n\nBulk delete\n# Delete records listed in CSV (CSV must have an Id column)\nsf data delete bulk --file records-to-delete.csv --sobject Contact --wait 10\n\nTree export/import (for related records)\n# Export with relationships into JSON tree format\nsf data export tree --query \"SELECT Id, Name, (SELECT Name, Email FROM Contacts) FROM Account\" --json\n\n# Export with a plan file (for multiple objects)\nsf data export tree --query \"SELECT Id, Name FROM Account\" --plan --output-dir export-data\n\n# Import from tree JSON files\nsf data import tree --files Account.json,Contact.json\n\n# Import using a plan definition file\nsf data import tree --plan Account-Contact-plan.json\n\nSchema Inspection\n# Describe an object (fields, relationships, picklist values)\nsf sobject describe --sobject Account --json\n\n# Describe a custom object\nsf sobject describe --sobject MyCustomObject__c --json\n\n# Describe a Tooling API object\nsf sobject describe --sobject ApexClass --use-tooling-api --json\n\n# List all objects\nsf sobject list --json\n\n# List only custom objects\nsf sobject list --sobject custom --json\n\n# List only standard objects\nsf sobject list --sobject standard --json\n\nExecute Apex Code\n# Execute Apex from a file\nsf apex run --file script.apex --json\n\n# Run interactively (type code, press Ctrl+D to execute)\nsf apex run\n\n# Run Apex tests\nsf apex run test --test-names MyTestClass --json\n\n# Get test results\nsf apex get test --test-run-id 707XXXXXXXXXXXX --json\n\n# View Apex logs\nsf apex list log --json\nsf apex get log --log-id 07LXXXXXXXXXXXX\n\nREST API (Advanced)\n\nMake arbitrary authenticated REST API calls:\n\n# GET request\nsf api request rest 'services/data/v62.0/limits' --json\n\n# List API versions\nsf api request rest '/services/data/' --json\n\n# Create a record via REST\nsf api request rest '/services/data/v62.0/sobjects/Account' --method POST --body '{\"Name\":\"REST Account\",\"Industry\":\"Technology\"}' --json\n\n# Update a record via REST (PATCH)\nsf api request rest '/services/data/v62.0/sobjects/Account/001XXXXXXXXXXXX' --method PATCH --body '{\"BillingCity\":\"San Francisco\"}' --json\n\n# GraphQL query\nsf api request graphql --body '{\"query\":\"{ uiapi { query { Account { edges { node { Name { value } } } } } } }\"}' --json\n\n# Custom headers\nsf api request rest '/services/data/v62.0/limits' --header 'Accept: application/xml'\n\n# Save response to file\nsf api request rest '/services/data/v62.0/limits' --stream-to-file limits.json\n\nMetadata Deployment and Retrieval\n# Deploy metadata to an org\nsf project deploy start --source-dir force-app --json\n\n# Deploy specific metadata components\nsf project deploy start --metadata ApexClass:MyClass --json\n\n# Retrieve metadata from an org\nsf project retrieve start --metadata ApexClass --json\n\n# Check deploy status\nsf project deploy report --job-id 0AfXXXXXXXXXXXX --json\n\n# Generate a new Salesforce DX project\nsf project generate --name my-project\n\n# List metadata components in the org\nsf project list ignored --json\n\nDiagnostics\n# Run CLI diagnostics\nsf doctor\n\n# Check CLI version\nsf version\n\n# See what is new\nsf whatsnew\n\nCommon SOQL Patterns\n-- Count records\nSELECT COUNT() FROM Contact WHERE AccountId = '001XXXXXXXXXXXX'\n\n-- Aggregate query\nSELECT StageName, COUNT(Id), SUM(Amount) FROM Opportunity GROUP BY StageName\n\n-- Date literals\nSELECT Id, Name FROM Lead WHERE CreatedDate = LAST_N_DAYS:30\n\n-- Subquery (semi-join)\nSELECT Id, Name FROM Account WHERE Id IN (SELECT AccountId FROM Contact WHERE Email LIKE '%@acme.com')\n\n-- Polymorphic lookup\nSELECT Id, Who.Name, Who.Type FROM Task WHERE Who.Type = 'Contact'\n\n-- Multiple WHERE conditions\nSELECT Id, Name, Amount FROM Opportunity WHERE Amount > 10000 AND StageName != 'Closed Lost' AND CloseDate = THIS_QUARTER\n\nGuardrails\nAlways use --json for structured, parseable output.\nNever create, update, or delete records without explicit user confirmation. Describe the operation and ask before executing.\nNever delete records unless the user explicitly requests it and confirms the specific record(s).\nNever bulk delete or bulk import without user reviewing the file/query and confirming.\nUse LIMIT on queries to avoid excessive data. Start with LIMIT 10 and increase if the user needs more.\nFor queries over 10,000 records, use sf data export bulk instead of sf data query.\nWhen the user asks to \"find\" or \"search\" a single object, use SOQL WHERE ... LIKE '%term%'. When searching across multiple objects, use SOSL via sf data search.\nUse --target-org <alias> when the user has multiple orgs; ask which org if ambiguous.\nIf authentication fails or a session expires, guide the user through sf org login web.\nBulk API 2.0 has SOQL limitations (no aggregate functions like COUNT()). Use standard sf data query for those.\nWhen describing objects (sf sobject describe), the JSON output can be very large. Summarize the key fields, required fields, and relationships for the user rather than dumping the raw output."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/ArvorCo/salesforce",
    "publisherUrl": "https://clawhub.ai/ArvorCo/salesforce",
    "owner": "ArvorCo",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/salesforce",
    "downloadUrl": "https://openagent3.xyz/downloads/salesforce",
    "agentUrl": "https://openagent3.xyz/skills/salesforce/agent",
    "manifestUrl": "https://openagent3.xyz/skills/salesforce/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/salesforce/agent.md"
  }
}