AGENT SKILLBY FORCEDOTCOM
App analytics
AT A GLANCE
App analytics is an analytics agent skill from forcedotcom. ISV App Analytics metadata types — AppAnalyticsQueryRequest and AppAnalyticsSettings. It is published in the forcedotcom/sf-skills GitHub repository (919 stars) under the Apache-2.0 license. Its SKILL.md runs to about 750 words. Install it with: npx skills add forcedotcom/sf-skills --skill dx-app-analytics-query
- SOURCE REPOSITORY
- forcedotcom/sf-skills (opens GitHub in a new tab)
- REPO STARS
- SOURCE REPOSITORY
- LICENSE
- Apache-2.0
- CATEGORIES
- SKILL.MD SIZE
- 5.6 KB127 LINES
QUICK ANSWER
- WHAT IT IS01
- ISV App Analytics metadata types, AppAnalyticsQueryRequest and AppAnalyticsSettings. Use this skill when the user asks about retrieving managed package usage data, configuring App Analytics simulation mode, querying. What sets it apart is how it narrows marketing analytics into one specific workflow rather than a broad, generic prompt.
- INPUTS02
- Context for marketing analytics: your goals, audience, constraints, and any source material the skill asks for.
- OUTPUT03
- A ready-to-use result for marketing analytics: the analysis, copy, or recommendations the agent produces.
INSTALL
One command adds this skill from its source repository.
npx skills add forcedotcom/sf-skills --skill dx-app-analytics-queryREAD THE SKILL.MD BELOW BEFORE YOU RUN IT. SKILLS INSTRUCT YOUR AGENT.
SKILL.MD
The full file, as published in the source repository. Copy it, download it or open it on GitHub.
ON THIS PAGE · 11
App Analytics#
When This Skill Owns the Task#
Use dx-app-analytics-query when the work involves:
- Creating
AppAnalyticsQueryRequestrecords via the REST/sObject API - Configuring
AppAnalyticsSettingsvia 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):
| Field | Type | Description |
|---|---|---|
| DataType | string (filterable) | Type of analytics data. Values: PackageUsageSummary, PackageUsageLog, SubscriberSnapshot |
| RequestState | string (filterable) | Processing status. Values: New, Pending, Complete, Expired, Failed, NoData, Delivered |
| StartTime | string | Start of time range for requested data |
| EndTime | string | End of time range. Should be set on an hour boundary |
| AvailableSince | string | Limits query to data indexed after this time (inclusive). Use for incremental retrieval |
| PackageIds | string | Comma-delimited list of managed package IDs (033-prefix) |
| OrganizationIds | string | Comma-delimited list of subscriber org IDs to filter results |
| DownloadUrl | string | Presigned URL for downloading results. Populated when RequestState is Complete |
| DownloadSize | long | Size in bytes of the result data file |
| DownloadExpirationTime | string | Time at which the download URL expires |
| FileType | string (filterable) | Output format. Values: csv, parquet |
| FileCompression | string (filterable) | Compression. Values: none, gzip, snappy |
| QuerySubmittedTime | string | Time the query was submitted to the Data Lake |
| ErrorMessage | string | Diagnostic 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):
| Field | Type | Description |
|---|---|---|
| enableSimulationMode | boolean (filterable) | When true, allows querying sample usage logs for integration testing without real subscriber data |
| enableAppAnalyticsOptOut | boolean (filterable) | When true, opts this subscriber org out of AppExchange App Analytics data collection |
Request Lifecycle#
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:
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
DownloadExpirationTimebefore attempting download. EndTimeshould be set on an hour boundary for consistent results.AvailableSinceis inclusive — data indexed at exactly that timestamp will be included.PackageIdsuses 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: parquetwithFileCompression: snappygives optimal performance for large datasets.
Output Format#
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>FAQ
07 QUESTIONS
01What is the App analytics agent skill?
ISV App Analytics metadata types, AppAnalyticsQueryRequest and AppAnalyticsSettings. Use this skill when the user asks about retrieving managed package usage data, configuring App Analytics simulation mode, querying. It is listed under analytics in the 100xLab agent skills directory.
02How do I install App analytics in Cursor, Claude Code, or Codex?
Run npx skills add forcedotcom/sf-skills --skill dx-app-analytics-query in the project where you want it, then ask your agent for the skill by name. The --skill flag installs only App analytics, not every skill in the repository.
03What does the App analytics SKILL.md cover?
The SKILL.md includes sections on When This Skill Owns the Task, Available Types, AppAnalyticsQueryRequest (REST/sObject API), AppAnalyticsSettings (Metadata API), Request Lifecycle and Common Patterns. Read the full text on this page or in plain markdown at /resources/agent-skills/forcedotcom-sf-skills--dx-app-analytics-query--kqxn51/raw.
04Which agents can use App analytics?
App analytics installs with the cross-agent skills installer (npx skills add), which sets it up for agents such as Claude Code, Cursor and Codex. Each agent loads the SKILL.md when you ask for the skill by name.
05What license is App analytics under?
The forcedotcom/sf-skills repository declares the Apache-2.0 license. Read the license file in the repository before you copy or redistribute the skill.
06Is App analytics free to use?
Reading, copying and installing App analytics costs nothing: it is published in a public GitHub repository under the Apache-2.0 license. Reuse and redistribution follow that license.
07Where is the source of App analytics?
App analytics comes from https://github.com/forcedotcom/sf-skills, which has 919 GitHub stars. The SKILL.md is at https://github.com/forcedotcom/sf-skills/blob/HEAD/skills/dx-app-analytics-query/SKILL.md. The author is forcedotcom.
Need an agent workflow built around your stack?
Tell us the workflow you want automated. We reply within 4 working hours (IST).
ATTRIBUTION
App analytics was written by its original authors and is published in forcedotcom/sf-skills (opens GitHub in a new tab) under the Apache-2.0 license. All rights stay with the original authors.
100xLab did not write, maintain or endorse this skill. This page lists it for discovery. Repo stars belong to the source repository, not to the skill. Review any skill before you install it.