younifyd
Menu

Get Metric Card

Retrieve a metric card by slug

GET/api/metric-cards/{slug}

Use it in a workflow

  1. Add a step and choose the Gorgias connector.
  2. Pick the Get Metric Card action (under Metric Cards).
  3. Fill in the fields below, then reference the result from later steps as {{getMetricCard.response.data}}.

Request

Path parameters

slugstringrequired

Response

Returns 200 with an object. Read it in later steps with {{getMetricCard.response.data.<field>}}.

slugstring

The slugs gorgias exposes, mirroring the published + deprecated cards in the analytics repo. gorgias owns this list as the public contract: it is enumerated in the OpenAPI spec, gates which cards the list/detail endpoints surface, and validates the get-by-slug path parameter. It is a point-in-time snapshot of `analytics/docs/metrics` (status: published | deprecated) and MUST be updated (here) whenever a card is added, renamed, deprecated, or removed in analytics — a new card is not exposed through gorgias until this enum ships. `SearchMetricCardsUseCase` logs + counts any slug analytics returns that is missing here, so a forgotten update surfaces as a Datadog signal.

One ofabandoned-callsaccuracyachievement-rateagents-offlineagents-onlineai-agent-automation-rateai-agent-average-csatai-agent-closed-ticketsall-used-tags-allall-used-tags-all-createdall-used-valuesall-used-values-createdarticle-viewsassigned-open-ticketsautomated-interactionsaverage-csataverage-discount-amountaverage-order-valueaverage-survey-scoreaverage-talk-timeaverage-ticket-handle-timeaverage-wait-timebrand-voicebuy-through-ratecallback-requestscalls-in-queuecancelled-callsclick-through-rateclosed-ticketsclosed-tickets-per-hourcomment-highlightscommunication-skillscontribution-to-total-salesconversion-ratecost-savedcoverage-ratecreated-ticketsdecrease-in-frtdecrease-in-resolution-timediscount-codes-applied

categorystring

Metric category.

titlestring

Display name.

statusstring

One ofpublisheddeprecated

definition_revised_atstring

Date the public content was last revised (YYYY-MM-DD).

publicobject
definitionstringrequired

Plain-text metric definition.

formulastringrequired

Plain-text formula.

computation_logicarray<string>required

Plain-text computation-logic entries, one per bullet.

apiobject
scopestringrequired

The /stats discriminated-union scope variant for this metric.

measuresarray<string>

Measures to request on the scope.

dimensionsarray<string>

Dimensions to request on the scope.

filtersarray<object>2 fields

Filters the caller must include to disambiguate this metric.

aliasesarray<string>

Previous slugs that still resolve to this card.

relatedarray<object>

Related metric cards.

slugstringrequired

Slug of the referenced metric card.

urlstringrequired

Relative URL of the referenced metric card.

replacesarray<object>

Metric cards this one replaces.

slugstringrequired

Slug of the referenced metric card.

urlstringrequired

Relative URL of the referenced metric card.

used_in_reportsarray<string>

Report views where this metric is surfaced.

used_in_reports_linksarray<string>

Direct report/dashboard URLs (relative paths) where this metric is surfaced.

json
{
  "slug": "abandoned-calls",
  "category": "string",
  "title": "string",
  "status": "published",
  "definition_revised_at": "string",
  "public": {
    "definition": "string",
    "formula": "string",
    "computation_logic": [
      "string"
    ]
  },
  "aliases": [
    "string"
  ],
  "related": [
    {
      "slug": "string",
      "url": "string"
    }
  ],
  "replaces": [
    {
      "slug": "string",
      "url": "string"
    }
  ],
  "used_in_reports": [
    "string"
  ],
  "api": {
    "scope": "string",
    "measures": [
      "string"
    ],
    "dimensions": [
      "string"
    ],
    "filters": [
      {
        "member": "string",
        "values": [
          "string"
        ]
      }
    ]
  },
  "used_in_reports_links": [
    "string"
  ]
}

Need more? See the Gorgias guide for connection setup and behaviour shared by every action.