forcedotcom/sf-skills

dx-app-analytics-query

ISV App Analytics metadata types — AppAnalyticsQueryRequest and AppAnalyticsSettings.

查看源码
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

App Analytics

When This Skill Owns the Task

Use dx-app-analytics-query when the work involves:

  • Creating AppAnalyticsQueryRequest records via the REST/sObject API
  • Configuring AppAnalyticsSettings via the Metadata API (simulation mode, opt-out)
  • Understanding the query lifecycle: New → Pending → Complete → Expired → Failed
  • Choosing between dataType values: PackageUsageSummary, PackageUsageLog, SubscriberSnapshot
  • File format and compression options for analytics downloads
  • Time-range filtering with startTime, endTime, availableSince
  • Troubleshooting failed or expired analytics queries

Delegate elsewhere when the user is:

  • Running standard CRM SOQL queries → platform-soql-query
  • Building reports/dashboards on standard objects → reporting skills
  • Deploying or retrieving generic metadata XML → platform-metadata-deploy / retrieving-metadata

Available Types

AppAnalyticsQueryRequest (REST/sObject API)

An asynchronous query request that ISV partners use to retrieve usage analytics data for their managed packages from the ISV Intelligence Data Lake. Records are created via POST /services/data/vXX.0/sobjects/AppAnalyticsQueryRequest and polled via GET /services/data/vXX.0/sobjects/AppAnalyticsQueryRequest/<id>. The system processes the query and provides a presigned download URL upon completion.

Fields (14 properties):

FieldTypeDescription
DataTypestring (filterable)Type of analytics data. Values: PackageUsageSummary, PackageUsageLog, SubscriberSnapshot
RequestStatestring (filterable)Processing status. Values: New, Pending, Complete, Expired, Failed, NoData, Delivered
StartTimestringStart of time range for requested data
EndTimestringEnd of time range. Should be set on an hour boundary
AvailableSincestringLimits query to data indexed after this time (inclusive). Use for incremental retrieval
PackageIdsstringComma-delimited list of managed package IDs (033-prefix)
OrganizationIdsstringComma-delimited list of subscriber org IDs to filter results
DownloadUrlstringPresigned URL for downloading results. Populated when RequestState is Complete
DownloadSizelongSize in bytes of the result data file
DownloadExpirationTimestringTime at which the download URL expires
FileTypestring (filterable)Output format. Values: csv, parquet
FileCompressionstring (filterable)Compression. Values: none, gzip, snappy
QuerySubmittedTimestringTime the query was submitted to the Data Lake
ErrorMessagestringDiagnostic message for failed queries

AppAnalyticsSettings (Metadata API)

Configuration settings for ISV App Analytics that control simulation mode and opt-out behavior. Deployed via the Metadata API (sf project deploy) or Tooling API.

Fields (2 properties):

FieldTypeDescription
enableSimulationModeboolean (filterable)When true, allows querying sample usage logs for integration testing without real subscriber data
enableAppAnalyticsOptOutboolean (filterable)When true, opts this subscriber org out of AppExchange App Analytics data collection

Request Lifecycle

text
New → Pending → Complete → (download within expiration window)
                         → Expired (download URL no longer valid)
                         → Delivered (download confirmed received)
         → Failed (check errorMessage)
         → NoData (no matching records for the criteria)

Common Patterns

Query Package Usage Summary (last 7 days)

Create a record via the REST API:

bash
POST /services/data/v60.0/sobjects/AppAnalyticsQueryRequest
Content-Type: application/json

{
  "DataType": "PackageUsageSummary",
  "StartTime": "<7-days-ago>T00:00:00Z",
  "EndTime": "<today-on-hour-boundary>T00:00:00Z",
  "PackageIds": "033XXXXXXXXXXXX",
  "FileType": "csv",
  "FileCompression": "gzip"
}

Poll the record via GET until RequestState reaches Complete, then download from DownloadUrl.

Incremental Data Retrieval

Set AvailableSince to the timestamp of your last successful query completion to avoid re-downloading data you already have.

Enable Simulation Mode for Testing

Deploy AppAnalyticsSettings via Metadata API with enableSimulationMode: true to query sample data without real subscribers.


High-Signal Gotchas

  • AppAnalyticsQueryRequest is an sObject — create and poll records via the REST Data API (/sobjects/AppAnalyticsQueryRequest), NOT via Metadata API XML deployment.
  • AppAnalyticsQueryRequest does NOT have Apex triggers and does NOT flow through custom objects or Flows.
  • Download URLs expire — always check DownloadExpirationTime before attempting download.
  • EndTime should be set on an hour boundary for consistent results.
  • AvailableSince is inclusive — data indexed at exactly that timestamp will be included.
  • PackageIds uses 033-prefix IDs, not 04t (package version) IDs.
  • Data is processed asynchronously by the ISV Intelligence Data Lake infrastructure. There is no synchronous query option.
  • FileType: parquet with FileCompression: snappy gives optimal performance for large datasets.

Output Format

text
Analytics task: <query / configure / troubleshoot>
Data type: <PackageUsageSummary / PackageUsageLog / SubscriberSnapshot>
Package IDs: <033-prefixed IDs>
Time range: <startTime> to <endTime>
File format: <csv|parquet> / <none|gzip|snappy>
Request state: <current state>
Next step: <poll for completion / download / investigate failure>
来自同一仓库

更多 Skills

全部 Skills
forcedotcom
社区

design-systems-slds-apply

Apply SLDS-compliant UI using the correct blueprints, styling hooks, utility classes, and icons. Use when building any UI that needs SLDS, choosing between Lightning Base Components and SLDS Blueprints, applying styling hooks for theming, using utility classes for layout and spacing, or selecting icons. Triggers include \"build a modal\", \"create a form\", \"data table\", \"SLDS styling\", \"style with hooks\", \"add an icon\".

安装量
5
GitHub Stars
948
最近更新
8月28日
forcedotcom
社区

design-systems-slds-validate

Audit Lightning Web Components for SLDS design-system compliance and produce a scored quality report. Runs the SLDS linter and analyzes CSS for theming hook usage and pairing, scoring SLDS findings across categories into an overall grade. Use when asked to \"score my component's SLDS\", \"SLDS scorecard\", \"SLDS quality report\", \"audit SLDS compliance\", \"how good is my SLDS\", \"check SLDS quality\", \"rate my SLDS styling\", \"evaluate my component's SLDS\", \"is this component's SLDS ready to ship?\", \"look at my LWC for SLDS issues\", \"audit SLDS before I submit\", \"review my component's SLDS before code review\", or any time a user wants an SLDS quality assessment or SLDS production-readiness check on an LWC. Not for fixing violations (use design-systems-slds2-migrate), building new components (use design-systems-slds-apply), or accessibility/WCAG/ARIA audits (use experience-accessibility-validate).

安装量
5
GitHub Stars
948
最近更新
8月28日
forcedotcom
社区

design-systems-slds2-migrate

Migrate Lightning Web Components from SLDS 1 to SLDS 2 by running the SLDS linter and fixing violations. Use this skill whenever users mention SLDS 2, SLDS uplift, linter violations, LWC token migration, class overrides, hardcoded CSS values that need SLDS hook replacement, or styling hook selection. Covers all styling hook categories — color, spacing, sizing, typography, borders, radius, and shadows. Also use when users mention no-hardcoded-values, no-slds-class-overrides, lwc-to-slds-hooks, no-deprecated-tokens-slds1, or ask about SLDS component migration — even if they don't explicitly say \"uplift\" or \"migration\".

安装量
5
GitHub Stars
948
最近更新
8月28日
forcedotcom
社区

agentforce-architecture-analyze

Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA plugins. Renders a human-readable architecture document and Mermaid invocation graph from design-time metadata (not runtime audit rows). TRIGGER when user asks to describe, diagram, inventory, audit, document, or diff (e.g. v3 vs v5) the architecture / action tree / topic structure / tool inventory of a specific agent by agent API name in a specific org. DO NOT TRIGGER for runtime session traces, conversation transcripts, generation timings, or gateway audit chains — this skill reads design-time metadata only (use agentforce-d360-analyze for session traces).

安装量
4
GitHub Stars
948
最近更新
8月28日