Ticket predictions deliver data for a given ticket from a variety of ML models.

These predictions provide additional data using machine learning to enrich a ticket with important metadata such as written language or intent so that they can be routed more effectively.

This is an EAP feature. Some prediction types may not be available.

Making predictions

Predictions are made automatically when a ticket is created. Its relevant information is sent to various ML models for evaluation. The results are surfaced with this API.

Prediction Data Availability

There will be a slight delay from when the ticket is created until the prediction data is available. Similarly, data from each prediction type may become available at different rates.

Supported Prediction Types

Language Detection

Language predictions determine what language the ticket was written.

Intent Detection

Intent predictions detect the ticket's problem category. It answers the question, What problem(s) is this ticket trying to solve?

JSON Format

Predictions are represented as JSON objects with the following properties:

Name Type Read-only Mandatory Description
predictions array true true The prediction set
ticket_id string true true The ticket's identifier

This object contains the set of predictions for a given ticket.


{  "predictions": [    {      "id": "ABC123",      "prediction_data": {        "prediction": [          {            "language_code": "en",            "score": 0.9754506349563599          },          {            "language_code": "hu",            "score": 0.2410602867603302          },          {            "language_code": "eo",            "score": 0.2256614863872528          }        ]      },      "prediction_type": "LANGUAGE"    },    {      "id": "123XYZ",      "prediction_data": {        "prediction": [          {            "name": "order__fulfilment__delivered",            "score": 0.9951220154762268          },          {            "name": "account__update__phone",            "score": 0.00007570574234705          }        ]      },      "prediction_type": "INTENT"    }  ],  "ticket_id": "42"}

List ML predictions for a ticket

  • GET /api/v2/tickets/{ticket_id}/predictions

This returns the prediction data for the specified ticket.

Note: Some predictions may not be accessible to users due to user permissions.

Allowed for

  • Agents


Name Type In Required Description
ticket_id string Path true The ticket's id.

Using curl

curl https://{subdomain}.zendesk.com/api/v2/tickets/{ticket_id}/predictions -v -u {email_address}/token:{api_token}

Example Response

Status 200 OK
{  "predictions": [    {      "id": "2V89036SK4C9HKECHN00000000",      "prediction_data": {        "prediction": [          {            "language_code": "en",            "score": 0.55744404          },          {            "language_code": "fr",            "score": 0.08380914          },          {            "language_code": "ru",            "score": 0.05690828          }        ]      },      "prediction_type": "LANGUAGE"    },    {      "id": "2V89036E9S6CSKERHH00000000",      "prediction_data": {        "prediction": [          {            "name": "order__status__what_is_status",            "score": 0.2668222          },          {            "name": "billing__refund__request",            "score": 0.2589306          },          {            "name": "order__availability__stock",            "score": 0.2509685          }        ]      },      "prediction_type": "INTENT"    }  ],  "ticket_id": "850"}