dx-app-analytics-query

Query ISV managed package usage analytics via AppAnalyticsQueryRequest and configure AppAnalyticsSettings.

Updated Jul 2, 2026
One-click install
npx skills add https://github.com/padjei/SF_Build --skill dx-app-analytics-query-padjei
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dx-app-analytics-query
Source: https://github.com/padjei/SF_Build/tree/main/.claude/skills/dx-app-analytics-query
Command: npx skills add https://github.com/padjei/SF_Build --skill dx-app-analytics-query-padjei

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? ISV partners need managed package usage data from subscriber orgs, but the App Analytics API is asynchronous, has a non-obvious request lifecycle, and mixes sObject REST calls with Metadata API configuration, making it easy to misuse. ## Core Features & Use Cases - Usage Data Retrieval: Create and poll AppAnalyticsQueryRequest records for PackageUsageSummary, PackageUsageLog, and SubscriberSnapshot data with time-range and package filters. - Lifecycle Management: Understand and handle request states from New through Pending, Complete, Expired, Failed, and NoData, including download URL expiration. - Simulation & Opt-Out Configuration: Deploy AppAnalyticsSettings via the Metadata API to enable simulation mode for testing or opt subscriber orgs out of data collection. - Use Case: An ISV wants the last 7 days of package usage logs as gzip-compressed CSV. Create an AppAnalyticsQueryRequest with the right DataType, PackageIds, and hour-aligned EndTime, poll until Complete, then download from the presigned URL before it expires. ## Quick Start Ask the assistant to create an AppAnalyticsQueryRequest for PackageUsageSummary covering the last 7 days for your managed package and poll it until the download URL is ready.

Frequently Asked Questions about dx-app-analytics-query

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query managed package usage data as an ISV?▼

Create an AppAnalyticsQueryRequest record via POST to /services/data/vXX.0/sobjects/AppAnalyticsQueryRequest with DataType, StartTime, EndTime, and PackageIds. Poll the record with GET until RequestState reaches Complete, then download results from the DownloadUrl field.

What data types does AppAnalyticsQueryRequest support?▼

AppAnalyticsQueryRequest supports three DataType values: PackageUsageSummary, PackageUsageLog, and SubscriberSnapshot. Results can be output as csv or parquet files with none, gzip, or snappy compression.

Can I test App Analytics without real subscriber data?▼

Yes, deploy AppAnalyticsSettings via the Metadata API with enableSimulationMode set to true. This lets you query sample usage logs for integration testing without real subscriber data.

Why did my App Analytics query fail or expire?▼

Failed queries include a diagnostic message in the ErrorMessage field, while NoData means no records matched your criteria. Expired means the download URL is no longer valid, so always check DownloadExpirationTime before downloading.

Is AppAnalyticsQueryRequest deployed via Metadata API?▼

No, AppAnalyticsQueryRequest is an sObject created and polled through the REST Data API, not Metadata API XML deployment. Only AppAnalyticsSettings is deployed via the Metadata API or Tooling API.