PluginBench
Skill
Review
Audit score 70

data360-query

forcedotcom/sf-skills

Query, search, and inspect Salesforce Data Cloud objects with SQL, vector search, and metadata introspection.

What is data360-query?

This skill handles Data Cloud retrieve operations: SQL queries (sync and async), vector and hybrid search, search-index lifecycle, and metadata inspection. Use it when working with Data Cloud SQL, async queries, vector search, search-index workflows, or describing Data Cloud objects—not for standard CRM SOQL or segment design.

  • Run sync and async SQL queries against Data Cloud tables
  • Execute vector and hybrid semantic searches on search indexes
  • Describe Data Cloud object schemas and field metadata
  • Manage search-index lifecycle and configuration
  • Classify org readiness for Data Cloud retrieve operations
  • Handle paginated result sets with sqlv2 and async query flows

How to install data360-query

npx skills add https://github.com/forcedotcom/sf-skills --skill data360-query
Prerequisites
  • Node.js ≥18.0.0
  • Salesforce CLI (sf) ≥2.0.0
  • Access to a Salesforce org with Data Cloud enabled
  • Target org alias configured in sf
Claude Code
Cursor
Windsurf
Cline

How to use data360-query

  1. 1.Run the readiness classifier to confirm org health: `node ../data360-orchestrate/scripts/diagnose-org.mjs -o <org> --phase retrieve --json`
  2. 2.Choose the appropriate query shape: COUNT for quick counts, sql for small sets, sqlv2 for medium paginated results, async-create for large exports
  3. 3.Use describe to inspect table schema before querying: `sf data360 query describe -o <org> --table <table_name>`
  4. 4.For search operations, list available indexes first: `sf data360 search-index list -o <org>`
  5. 5.Execute your query or search command and verify results match expected row counts and schema

Use cases

Good for
  • Query a large Data Cloud table asynchronously and export results
  • Search a knowledge base using vector embeddings with semantic queries
  • Inspect the schema of a Data Cloud object before writing queries
  • Set up and validate a hybrid search index with prefilter conditions
  • Diagnose Data Cloud readiness and query-plane health before retrieve work
Who it's for
  • Data Cloud architects and developers
  • Analytics engineers querying enterprise data models
  • Teams building semantic search experiences
  • Data integration specialists inspecting Data Cloud schemas

data360-query FAQ

When should I use data360-query vs. platform-soql-query?

Use data360-query for Data Cloud SQL, async queries, vector search, and search-index operations. Use platform-soql-query only for standard CRM SOQL against Salesforce objects.

What's the difference between sql, sqlv2, and async-create?

sql is for quick counts and small result sets; sqlv2 handles medium result sets with pagination; async-create is for large exports that run in the background.

Can I use hybrid search with prefilters?

Yes, but only on fields configured as prefilter-capable when the search index was created. Use the --prefilter flag to narrow results.

How do I know if my search index is healthy?

Run `sf data360 search-index list -o <org>` to list indexes and check their status. Use the readiness classifier to diagnose broader Data Cloud health.

Should I quote table names in Data Cloud SQL?

Yes, always use double quotes around table names in Data Cloud SQL queries, e.g., `SELECT * FROM "ssot__Individual__dlm"`.

Full instructions (SKILL.md)

Source of truth, from forcedotcom/sf-skills.


name: data360-query description: "Salesforce Data Cloud Retrieve phase. Use this skill when the user runs Data Cloud SQL, async queries, vector search, search-index workflows, or metadata introspection for Data Cloud objects. TRIGGER when: user runs Data Cloud SQL, describe, async queries, vector search, search-index workflows, or metadata introspection for Data Cloud objects. DO NOT TRIGGER when: the task is standard CRM SOQL (use platform-soql-query), segment creation or calculated insight design (use data360-segment), or STDM/session tracing/parquet analysis (use agentforce-observe)." metadata: cliTools: - tool: ["node"] semver: ">=18.0.0" - tool: ["sf"] semver: ">=2.0.0" relatedSkills: - "agentforce-observe" - "data360-orchestrate" - "data360-segment" - "platform-soql-query" version: "1.0" domains: ["Data 360"]

data360-query: Data Cloud Retrieve Phase

Use this skill when the user needs query, search, and metadata introspection for Data Cloud: sync SQL, paginated SQL, async query workflows, table describe, vector search, hybrid search, or search index operations.

When This Skill Owns the Task

Use data360-query when the work involves:

  • sf data360 query *
  • sf data360 search-index *
  • sf data360 metadata *
  • sf data360 profile * or sf data360 insight * inspection
  • understanding Data Cloud SQL results or query shape

Delegate elsewhere when the user is:

  • writing standard CRM SOQL only → platform-soql-query
  • designing segment or calculated insight assets → data360-segment
  • analyzing STDM/session tracing/parquet telemetry → agentforce-observe

Required Context to Gather First

Ask for or infer:

  • target org alias
  • whether the user needs quick count, medium result set, large export, schema inspection, or semantic search
  • table/index name if known
  • whether the task is read-only SQL or search-index lifecycle management

Core Operating Rules

  • Treat Data Cloud SQL as its own query language, not SOQL.
  • Run the shared readiness classifier before relying on query/search surfaces: node ../data360-orchestrate/scripts/diagnose-org.mjs -o <org> --phase retrieve --json.
  • Use describe before guessing columns.
  • Prefer sqlv2 or async query flows for larger result sets.
  • Use vector search or hybrid search only when the search index lifecycle is healthy.
  • Keep STDM/parquet/session-tracing workflows out of this skill family.

Recommended Workflow

1. Classify readiness for retrieve work

node ../data360-orchestrate/scripts/diagnose-org.mjs -o <org> --phase retrieve --json
# optional query-plane probe, only with a real table name
node ../data360-orchestrate/scripts/diagnose-org.mjs -o <org> --phase retrieve --describe-table MyDMO__dlm --json

2. Choose the smallest correct query shape

sf data360 query sql -o <org> --sql 'SELECT COUNT(*) FROM "ssot__Individual__dlm"' 2>/dev/null
sf data360 query sqlv2 -o <org> --sql 'SELECT * FROM "ssot__Individual__dlm"' 2>/dev/null
sf data360 query async-create -o <org> --sql 'SELECT * FROM "ssot__Individual__dlm"' 2>/dev/null

3. Use describe before guessing fields

sf data360 query describe -o <org> --table ssot__Individual__dlm 2>/dev/null

4. Use vector or hybrid search only when an index exists

sf data360 search-index list -o <org> 2>/dev/null
sf data360 query vector -o <org> --index Knowledge_Index --query "reset password" --limit 5 2>/dev/null
sf data360 query hybrid -o <org> --index Knowledge_Index --query "reset password" --limit 5 2>/dev/null
sf data360 query hybrid -o <org> --index Insurance_Index --query "weather damage coverage" --prefilter "Type_of_Insurance__c='Home'" --limit 10 2>/dev/null

5. Reuse curated search-index examples when creating indexes

Use the phase-owned examples instead of inventing JSON from scratch:

  • examples/search-indexes/vector-knowledge.json
  • examples/search-indexes/hybrid-structured.json

High-Signal Gotchas

  • Data Cloud SQL is not SOQL.
  • Table names should be double-quoted in SQL.
  • sqlv2 is better than ad hoc OFFSET paging for medium result sets.
  • async query is preferable for large results.
  • search-index operations and vector/hybrid queries depend on the index lifecycle being healthy.
  • Hybrid search can use --prefilter, but only on fields configured as prefilter-capable when the search index was created.
  • HNSW index parameters are typically read-only on create; leave userValues: [] unless the platform explicitly documents otherwise.
  • query describe is not a universal tenant probe; only run it with a known DMO or DLO table after broader readiness has been confirmed.

Output Format

Retrieve task: <sql / sqlv2 / async / describe / vector / search-index>
Target org: <alias>
Target object: <table or index>
Commands: <key commands run>
Verification: <query rows / schema / status>
Next step: <segment / harmonize / follow-up>

References