killbill-zendesk-plugin ======================= Plugin to mirror Kill Bill data into Zendesk. User data mapping -----------------
Zendesk attributeValue
nameKill Bill account name
external_idKill Bill account external key if specified, Kill Bill account id otherwise
localeKill Bill account locale
time_zoneKill Bill account timezone
emailKill Bill account email
phoneKill Bill account phone
detailsKill Bill account address1, Kill Bill account address2, Kill Bill account city, Kill Bill account state or province, Kill Bill account postal code, Kill Bill account country
Usage ----- The plugin will automcatically listen to all account events (creation or update), and create or update the associated user in Zendesk. If you need to trigger a refresh manually, the plugin exposes the following endpoint: ``` curl -v \ -d'webrick=stupid' \ -XPUT \ "http://$HOST:8080/plugins/killbill-zendesk/users/" ``` Given a Kill Bill account id or Zendesk user id, you can retrieve the Kill Bill - Zendesk mapping via: ``` curl -v \ "http://$HOST:8080/plugins/killbill-zendesk/users/" ``` Requirements ------------ The plugin needs a database to keep a local mapping between Kill Bill account ids and Zendesk user ids (this is to work around indexing delays in Zendesk). The latest version of the schema can be found here: https://raw.github.com/killbill/killbill-zendesk-plugin/master/db/ddl.sql. Configuration ------------- The plugin expects a `zendesk.yml` configuration file containing the following: ``` :zendesk: :subdomain: 'mysubdomain' :username: 'email@domain.com' :password: 'password' # Alternatively, to use Token Authentication or OAuth #token: 'kX53RIXZKUFhZxSYhRxe7QGFocTkDmmERDxpcddF'  #access_token: 'kX53RIXZKUFhZxSYhRxe7QGFocTkDmmERDxpcddF' # Optional # :retry: true :database: :adapter: 'sqlite3' :database: 'test.db' # For MySQL # :adapter: 'jdbc' # :username: 'your-username' # :password: 'your-password' # :driver: 'com.mysql.jdbc.Driver' # :url: 'jdbc:mysql://127.0.0.1:3306/your-database' ``` By default, the plugin will look at the plugin directory root (where `killbill.properties` is located) to find this file. Alternatively, set the Kill Bill system property `-Dcom.ning.billing.osgi.bundles.jruby.conf.dir=/my/directory` to specify another location.