younifyd
Menu

Download Legacy Statistic

Download a statistic

POST/api/stats/{name}/download

Use it in a workflow

  1. Add a step and choose the Gorgias connector.
  2. Pick the Download Legacy Statistic action (under Statistics).
  3. Fill in the fields below, then reference the result from later steps as {{downloadLegacyStatistic.response.data}}.

Request

Path parameters

namestringrequired

The name of the statistic to retrieve.

One ofoverviewtotal-tickets-createdtotal-tickets-repliedtotal-tickets-closedtotal-messages-senttotal-messages-receivedmedian-first-response-timemedian-resolution-timetotal-one-touch-ticketssupport-volumeresolution-timefirst-response-timetickets-created-per-hour-per-weekdaytickets-per-tagtickets-created-per-channeltickets-created-per-channel-per-daytickets-closed-per-agenttickets-closed-per-agent-per-daymessages-sent-per-macrosatisfaction-surveyslatest-satisfaction-surveysintents-occurrenceintents-overviewintents-breakdown-per-dayrevenue-overviewrevenue-per-agentrevenue-per-dayrevenue-per-ticketself-service-volume-per-flowself-service-article-recommendation-performanceself-service-top-reported-issuesself-service-products-with-most-issues-and-return-requestsself-service-workflows-performance

Request body

Enter the body as JSON in the step's Body field.

filtersobjectrequired

Miscellaneous criteria to define the scope of the statistic.

periodobject2 fields

Time period to filter the statistic by.

agentsarray<integer>

ID of users to filter the statistic by.

Default []

channelsarray<string>

Channels to filter the statistic by.

Default []

campaignsarray<string>

Campaigns to filter the statistic by.

Default []

tagsarray<integer>

ID of tags to filter the statistic by.

Default []

integrationsarray<integer>

ID of integrations to filter the statistic by.

Default []

scorearray<integer>

Satisfaction survey scores to filter the statistic by.

Default []

json
{
  "filters": {
    "period": {
      "start_datetime": "2020-06-10T00:00:00-05:00",
      "end_datetime": "2020-06-16T23:59:59-05:00"
    },
    "agents": [
      12345,
      67890
    ],
    "channels": [
      "chat",
      "email"
    ],
    "campaigns": [
      "123",
      "234"
    ],
    "tags": [
      321,
      654,
      987
    ],
    "integrations": [
      555,
      777
    ],
    "score": [
      3,
      4
    ]
  }
}

Response

Returns 201 with a string. Read it in later steps with {{downloadLegacyStatistic.response.data.<field>}}.

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

Was this page helpful?