# Dx App Analytics Query

ISV App Analytics metadata types, AppAnalyticsQueryRequest and AppAnalyticsSettings.

- Repository: https://github.com/forcedotcom/sf-skills (1134 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add forcedotcom/sf-skills --skill dx-app-analytics-query -g -a claude-code -y`
Codex: `npx skills add forcedotcom/sf-skills --skill dx-app-analytics-query -g -a codex -y`
Cursor: `npx skills add forcedotcom/sf-skills --skill dx-app-analytics-query -g -a cursor -y`
Gemini CLI: `npx skills add forcedotcom/sf-skills --skill dx-app-analytics-query -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add forcedotcom/sf-skills`

## Description

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 subscriber snapshots, or understanding the AppAnalyticsQueryRequest lifecycle (New → Pending → Complete → Expired). TRIGGER when: user mentions App Analytics, AppAnalyticsQueryRequest, AppAnalyticsSettings, package usage data, subscriber analytics, ISV analytics, or simulation mode for app analytics. DO NOT TRIGGER when: the task is about standard Salesforce reports/dashboards (use reporting skills), custom SOQL on Account/Contact (use querying-soql), or Data Cloud query/search (use retrieving-datacloud).

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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
- Working with Data Cloud SQL or DMOs → retrieving-datacloud
- Building reports/dashboards on standard objects → reporting skills
- Deploying or retrieving generic metadata XML → deploying-metadata / 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):**

The rest: https://github.com/forcedotcom/sf-skills/blob/HEAD/plugins/builder/dx-isv-partner/skills/dx-app-analytics-query/SKILL.md
