aptible / minitron

DEPRECATED - Zendesk-to-Segment webhook-based integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Aptible, Inc.

Minitron

Minitron.rb is a Zendesk => Segment.io webhook-based integration.

Tickets updated to a Closed status will trigger a post to the sinatra server which contains ID, Status, and Group. Minitron uses the ticket ID to query the Zendesk api for ticket and ticket_metric data which is forwarded on to Segment.

Local testing

  1. Set up a local enpdoint using Localtunnel.

    a) Install localtunnel

    b) Run it using port 4567

     lt --port 4567
    
  2. Set up a test target and trigger in Zendesk.

    a) The Zendesk trigger should require the requester be you (the tester) and include any change. The trigger message should be a json block that includes the id and status.

           {
               "id": "{{ticket.id}}",
               "group":"{{ticket.group.name}}",
               "status": "{{ticket.status}}"
           }
    

    b) The Zendesk target should be set to the local endpoint you set up in (1). NB: You will need to reset this endpoint each time the tunnel session ends

  3. Make your changes to the app, then fire it up and alter your test ticket to see the response.

  4. View any received messages in the segment debugger logs.

Deploy on Aptible

  1. Create an app in your Aptible dashboard for Minitron.

  2. Use the Aptible CLI to set necessary env variables:

aptible config:set SEGMENTIO_WRITEKEY=<YOUR_KEY> ZENDESK_TOKEN=<YOUR_TOKEN> ZENDESK_USER=<YOUR_USER> PORT=3000 --app Minitron
  1. Clone this repository and push it to your Aptible app:
git clone https://github.com/aptible/minitron.git
cd minitron
git remote add aptible git@beta.aptible.com:minitron.git
git push aptible master
  1. Set your Zendesk target endpoint to your aptible domain (e.g. minitron.on-aptible.com)

Copyright and License

MIT License, see LICENSE for details.

Copyright (c) 2015 Aptible. All rights reserved.

@wcpines

About

DEPRECATED - Zendesk-to-Segment webhook-based integration

License:MIT License


Languages

Language:Ruby 100.0%