metproof

How to import Zendesk tickets for SLA reporting

Zendesk exports tickets to CSV, and Metproof reads that file. The export has no first response, so for that you need the live feed: Zendesk can send each ticket as it changes, with a short template you paste in once.

Export from Zendesk

Zendesk exports the columns of a view, and the built-in views leave out the solved date and the assignee. Create a view for the export once:

  1. In Views, add a view for the tickets you want. A condition such as Status is less than Closed works. Under Table columns add Requested, Priority, Assignee and Solved, besides ID and Status.
  2. Open the view, choose its options menu and Export as CSV. Zendesk emails a download link to the administrator who asked for it. A view exports up to 1,000 tickets, so split a large history by date.

Import into Metproof

  1. Pick the client, choose Zendesk as the source and upload the file.
  2. The columns (ID, Requested, Priority, Status, Assignee and Solved), the date format, the priorities and the statuses are filled in for you. Check them and fix anything marked as not matched. A file from a built-in view has Ticket status instead of Status and no Solved column: solved tickets then fail with no resolution date, so use the view above.
  3. Run the import. Re-importing later updates the tickets by their ID, so there are no duplicates.

How Zendesk’s values are read

Keep it up to date with a webhook

On the Team plan, Zendesk can send each ticket to Metproof as it changes. Zendesk has no default body, so you paste the one below into two triggers. The webhook replaces the export and import above for keeping the data current. Tickets that already exist are not sent, so import a CSV once if you want the history.

  1. In Metproof, open Clients, create the client’s webhook and copy the address. It is shown only once.
  2. In Zendesk Admin Center open Apps and integrations › Webhooks and create a webhook connected to Zendesk events or Trigger or automation. Use the POST method, the JSON request format, No authentication and the webhook address, copied from the client’s page in Metproof, as the endpoint. The token in that address identifies the client, so create one webhook per client.
  3. Open Objects and rules › Business rules › Triggers and create the first trigger, Ticket created or changed. Under Meet ALL put Ticket › Status › Is not › Closed. Under Meet ANY put Ticket › Is › Created, Ticket › Status › Changed, Ticket › Priority › Changed and Ticket › Assignee › Changed. For the action choose Notify by › Active webhook, pick the webhook and paste this as the JSON body:
    {"source":"zendesk","external_id":"{{ticket.id}}","priority":"{{ticket.priority}}","status":"{{ticket.status}}","opened_at":"{{ticket.created_at_with_timestamp}}","status_changed_at":"{{ticket.updated_at_with_timestamp}}","agent_name":"{{ticket.assignee.name}}"}
  4. Create the second trigger, First public agent reply, to record the first response. Under Meet ALL put Ticket › Is › Updated, Comment › Is › Public, Current user › Role › Is not › End-user and Ticket › Tags › Contains none of the following › metproof_first_reply. It has two actions: Add tags metproof_first_reply, and the same webhook with this JSON body:
    {"source":"zendesk","external_id":"{{ticket.id}}","priority":"{{ticket.priority}}","status":"{{ticket.status}}","opened_at":"{{ticket.created_at_with_timestamp}}","status_changed_at":"{{ticket.updated_at_with_timestamp}}","agent_name":"{{ticket.assignee.name}}","first_response_at":"{{ticket.updated_at_with_timestamp}}"}

The tag stops the second trigger after the first reply, so only the first public reply by an agent counts. An internal note does not, and neither does a reply by the customer or the first comment of a ticket an agent opened for the customer.

More on the import route

The general method works for any helpdesk: see SLA tracking from your helpdesk’s CSV export.

Stop guessing. Start proving.

Every plan starts with a free 30-day pilot on your own data. Prices exclude VAT.

Start free pilot

More guides