Giter VIP home page Giter VIP logo

tap-zendesk-chat's Introduction

tap-zendesk-chat

This is a Singer tap that produces JSON-formatted data following the Singer spec.

This tap:

Quick Start

  1. Install

    pip install tap-zendesk-chat

  2. Get a Zendesk Chat Access Token

You will need to be able to create a token using an OAuth 2 authorization request. To do this locally, you can use Postman.

Once you know how you will authorize (including the redirect URLs for the authorization request), log into your Zendesk Chat / Zopim account, go to

Settings -> Account -> API -> Add API Client

Once you create the API Client you will receive a client ID and client secret. Use these in conjunction with your chose method of performing the OAuth 2 reqeust to obtain an access token to your (or a third-party) Zendesk Chat / Zopim account.

  1. Create the Config File

Create a JSON file called config.json containing the access token and a start_date, which specifies the date at which the tap will begin pulling data (for those resources that support this).

{
    "start_date": "2010-01-01",
    "access_token": "your-access-token"
}
  1. Run the Tap in Discovery Mode

    tap-zendesk-chat -c config.json -d

See the Singer docs on discovery mode here.

  1. Run the Tap in Sync Mode

    tap-zendesk-chat -c config.json -p catalog-file.json

Chats Full Re-syncs

You can configure the tap to re-sync all chats every so many number of days. This is configured with the chats_full_sync_days option in your config.json file.

This exists due to the options (or lack thereof) the Zendesk Chat API provides when syncing chats. Each chat has an "end timestamp" that indicates when the chat was "ended." However, even after the chat has ended, it may be modified. In order to not sync all of the chats during every run of the tap, the tap filters data based on the "end timestamp." But this means if the chat is modified after the tap has already synced it, any modifications will be missed by the tap. By re-syncing every N days, you are able to update any chats that may have changed since they were synced by the tap.

Two Bookmarks for Chats

In addition to the above oddities around the "end timestamp," the chats resource provides another unique challenge. There are two different types of chats: offline messages and normal chats.

Offline messages do not have the end timestamp property. Instead, they only provide a timestamp when the offline message was created. As a result, the tap syncs offline timestamps based on their timestamp and syncs regular chats based on their end timestamp. This requires storing two separate bookmarks in the tap's "state."


Copyright © 2017 Stitch

tap-zendesk-chat's People

Contributors

b-ryan avatar kallan357 avatar dmosorast avatar leslievandemark avatar cosimon avatar richard-clark avatar luandy64 avatar nick-mccoy avatar eternallearner42 avatar rinkeraven avatar jakedave avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.