Skip to content
Development
Skill

/experience-afv-analytics-query

System-of-record for the public Lightning Instrumentation Headless Connect REST API route that retrieves Agentforce Vibes (AFV) metrics, analytics, data, and adoption/usage insights, including token/LOC, weekly active-user, and per-user activity. Supports local result filtering

From plugin
sf-skills
1.2k200 skills6 agents15 commands4 MCP

Claude Code

$ npx -y skills add forcedotcom/sf-skills --skill experience-afv-analytics-query --agent claude-code

SKILL.md

experience-afv-analytics-query.SKILL.md
name: experience-afv-analytics-query
description: "System-of-record for the public Lightning Instrumentation Headless Connect REST API route that retrieves Agentforce Vibes (AFV) metrics, analytics, data, and adoption/usage insights, including token/LOC, weekly active-user, and per-user activity. Supports local result filtering by period (default current), orgType (default All), recordType, modelName (default All), and other explicitly returned row fields after one parameterless API call."
metadata:
  version: "1.0"
  minApiVersion: "68.0"
  accessCheck: "(DxDevopsAnalytics.orgHasDevopsAnalyticsAccess)"
  domains:
  - "Experience"
  - "Agentforce"

Agentforce Vibes metrics

Use this skill when a user asks to retrieve Agentforce Vibes (AFV) usage or instrumentation metrics for the current Salesforce org.

This skill describes one public, read-only Connect API operation:

  • **Get AFV metrics** — trigger phrases: "get afv metrics", "agentforce vibes metrics", "afv analytics", "fetch agentforce vibes analytics", "headless afv metrics", "afv data", "agentforce vibes data", "get afv adoption usage data", "Vibes adoption", "token/LOC metrics", "weekly active users", "per-user AFV activity", "current or prior AFV metrics", "AFV model metrics", "AFV metrics by org type", and "filter AFV metrics by record type". Primary route: `GET /instrumentation/afv-metrics` (`operationId: getAFVMetrics`).

The route is available at external API version **v68.0 or later**. Call it at v68.0; do not infer a lower version from the source spec's generic `info.version` or `servers` example. v67.0 returns `404 NOT_FOUND`. A version above the org's own maximum also returns `404`; that is an org limit, not a reason to call a version below v68.0.

Workflow

1. Call `GET /services/data/v68.0/instrumentation/afv-metrics`. 2. Send no path parameters, query parameters, or request body. 3. Read the returned `AFVMetricsOutputRepresentation`:

  • `success` — whether the metrics download succeeded.
  • `message` — an optional status or failure message.
  • `rows` — an array of metric maps; each map can contain heterogeneous

metric names and values. 4. If `success` is `false`, surface `message` and the raw response. Do not present the rows as a successful metrics result or retry automatically. 5. If `success` is `true` and `rows` is empty, report the no-data result and stop. Do not retry, treat it as an API error, or fall back to an internal API. 6. Branch on each row's `recordType` before reading class-specific fields. Do not assume that any particular record class is present. Preserve unknown record types and fields instead of dropping them.

Optional result filters

Users can narrow the displayed metrics with optional result filters. These filters control local processing after the complete response is received; they are not Connect API query parameters or `get-afv-metrics` dispatch inputs.

| Filter | Accepted value | Matching rule | |---|---|---| | `period` | `current` (default) or `prior` | Exact match on `rows[*].period`. Reject another explicit value before calling the API. | | `orgType` | `All` (default) or an org-type value returned by the API | Case-insensitive exact match on `rows[*].orgType`. `All` is a literal roll-up value, not a wildcard. | | `recordType` | One or more record-type names | Exact match on `rows[*].recordType`. Known values include `aggregate`, `dailyTimeSeries`, `modelMetrics`, `orgBreakdown`, `userMetrics`, and `weeklyActiveUsers`, but accept an exact future value when the user supplies it. | | `modelName` | `All` (default) or a model name returned by the API | Case-insensitive exact match on `rows[*].modelName`. `All` is a literal roll-up value, not a wildcard. | | Other returned row field | Explicit field name and value supplied by the user | Exact match only when that field is present. Do not invent aliases or assume the field exists on every record type. |

If the user does not supply `period`, apply `period=current`; if the user does not supply `orgType`, apply `orgType=All`; if the user does not supply `modelName`, apply `modelName=All`. These are default local result filters. An explicit value overrides its corresponding default. A request that compares the current and prior periods explicitly selects both values and therefore overrides the single-period default. Likewise, a request to compare or rank models explicitly selects the concrete model names present in the response instead of the `All` model roll-up. If the user supplies more than one filter name, combine them with AND. If the user supplies multiple values for the same field, match any of those values. Each default still applies when the user supplies another filter but omits one of these three fields.

Apply filters only after checking HTTP status, `success`, and the unfiltered `rows` array:

1. Capture the requested result filters from the user's prompt and add the defaults `period=current`, `orgType=All`, and `modelName=All` when those fields were omitted and the request does not imply a multi-value comparison. 2. Call `get-afv-metrics` once with no arguments and no query string. 3. If `success` is `false` or the complete `rows` array is empty, follow the normal response handling without filtering. 4. Otherwise, filter the returned rows in memory and render the matching rows. 5. Report the filters applied, the total rows returned by the API, and the number of rows matched.

A successful response with rows but zero filter matches, including when a default filter finds no rows, is a successful zero-match view, not an empty API response. Report that the complete response contained no matching rows. Do not retry, change the request URL, infer zero metric values, or report that the API itself returned no data. When the requested `recordType` is `userMetrics`, also apply the permission-dependent guidance below instead of treating the absence as proof of zero user activity.

Permis

Read more
@forcedotcom
Ships withsf-skills

This repository provides Salesforce agent skills, plugins, and sample apps for building applications.

1.2k200 skills6 agents4 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.2k
Star history of forcedotcom/sf-skills on GitHub, a chart by star-history.com

Other skills on sf-skills.

agentforce-observe

agentforce-observe

Analyze production Agentforce agent behavior using session traces and Data Cloud, and manage Agent Health Monitoring (AHM)…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc3w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react10d252k
@facebook@facebookInstall Skill

Questions about experience-afv-analytics-query.

Which coding agents can use experience-afv-analytics-query?
experience-afv-analytics-query installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.