younifyd
Menu

Search Metric Cards

Search metric cards

GET/api/metric-cards

Use it in a workflow

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

Request

Query parameters

categorystring

Filter cards by category.

statusstring

Filter by status. Defaults to `published` on the analytics side.

One ofpublisheddeprecated

qstring

Case-insensitive substring search across title and public content.

includestring

Set to `deprecated` to include deprecated cards alongside published ones.

One ofdeprecated

Response

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

dataarray<object>

The metric cards matching the query.

slugstringrequired

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

categorystringrequired

Metric category.

titlestringrequired

Display name.

statusstringrequired

One ofpublisheddeprecated

definition_revised_atstringrequired

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

publicobjectrequired3 fields
apiobject4 fields
aliasesarray<string>required

Previous slugs that still resolve to this card.

relatedarray<object>required2 fields

Related metric cards.

replacesarray<object>required2 fields

Metric cards this one replaces.

used_in_reportsarray<string>required

Report views where this metric is surfaced.

used_in_reports_linksarray<string>

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

json
{
  "data": [
    {
      "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": [
              null
            ]
          }
        ]
      },
      "used_in_reports_links": [
        "string"
      ]
    }
  ]
}

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

Was this page helpful?