This project provides sample code which demonstrates how to write applications in Python and Java which can consume Helpshift webhooks and act on them.
We provide examples for the scenarios listed below.
Webhooks enable you to subscribe for changes (create issues and update issues) based on specific criteria. When a change occurs, an HTTPS POST will be sent to the target URL. For more details on how to setup webhook, refer to What Are Helpshift Webhooks, And How Do I Set Them Up?
Helpshift webhooks only support posting to secure https endpoints. For local testing the project includes sample payloads which can be used with the sample application servers. Sample payloads can be found here
To test with live Helpshift webhooks, you will need to setup a secure https server which proxies the webhook requests to the application servers. Configuring secure https server is out of the scope of this document but you can refer to nginx + SSL reverse proxy tutorial
The Slack integration demonstrates how to post messages to a Slack channel whenever an issue is created in Helpshift, and when an issue is updated. The sample code uses Slack's incoming webhooks feature to post messages to the channel for new issues as well as issue status updates.
The JIRA integration demonstrates how to create JIRA tickets corresponding to new issues in Helpshift, and how to keep the issue and the JIRA ticket in sync. A JIRA ticket is created for each new issue in Helpshift, and for each issue update, the JIRA ticket is updated accordingly. This includes -
- status updates - including mapping Helpshift status updates to the matching JIRA statuses
- tag updates - mapped to labels in JIRA
- new messages - added as comments to the JIRA ticket
The Helpshift integration demonstrates how to consume webhooks to be notified whenever a new issue is created in Helpshift, then use the Helpshift API to achieve following use cases:
- Update tags on newly created issue based on database lookup on the user's email (see HelpshiftHandler.java ).
- Update custom meta on newly created issue based on database lookup on the user's id (see helpshift_handler.py ).
This project includes sample application servers written in Java and Python to consume webhooks and implement the above integrations. Follow the below links for running the sample code.
Copyright 2017, Helpshift, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Library | License | Copyright/Creator |
---|---|---|
Spark Framework | Apache License 2.0 | (c) 2010 Christoph Hochstrasser |
Flask Framework | Flask License | (c) 2010 Armin Ronacher |