Receive updates from Jira, Agile Central, TFS, Salesforce, and more using an External Listener
This article applies to All editions.
Note that while Centercode’s integration features are intended to be approachable by a Customer Validation Professional, you might need to enlist help from an internal technical resource and refer to our vocabulary and troubleshooting documentation.
The principles included in this guide apply to any API-capable endpoint that can externally trigger a feedback macro within Centercode. In this example, we’ll be triggering a Status change within Centercode by changing the status of the corresponding ticket in Jira.
In this guide, you will:
- Create (or identify) an API Key in Centercode
- Create a Feedback Macro in Centercode
- Create a Feedback External Listener in Centercode
- Create a Jira Webhook to trigger your new Feedback External Listener in Jira
In order to configure both sides of this integration, you will need:
- Access to an existing API Key or Community Manager access to create a new one
- Project Manager access in the project of your choice (or your project template)
- A Jira Administrator account or assistance from your Jira Administrator
Preparing Centercode to listen for your external system
1. Creating an API key
From the Centercode side, the first step in any API integration is to ensure that you have an API Key available within your Centercode Community. API Keys are used to track and control how API endpoints are accessed and can be leveraged by multiple simultaneous API integrations. If one is already created and available for use, you may continue past this step.
If necessary, create a Community API Key by following steps outlined here.
2. Creating a Feedback Macro
Macros allow you to create a single instruction that includes a set of actions to complete a desired task. Feedback Macros perform these actions on Feedback Tickets (like bugs or suggestions) using information relative to that ticket. In this example, we’re creating a Feedback Macro to change the Status of a feedback ticket to Closed.
From the Project home:
- Click the desired Feedback Type (from the feedback section of the menu)
- If necessary, click the Switch to Advanced View button (top right corner)
- Click the Feedback resources button
- Click the Create a macro button
- Select the Adjust workflow checkbox
- Choose the appropriate responsible Team (typically Beta Support or Project Managers)
- Select the appropriate Workflow (typically Default)
- Select the appropriate Status (typically Closed)
- Click the Submit button
You’ve just created your Feedback Macro.
Your next step is to create the external listener that will listen for Jira to tell Centercode to trigger this macro.
3. Creating an external listener
Now that you’ve created the Macro telling Centercode what to do, you’ll need to set up how to trigger it. An External Listener is effectively a URL created by Centercode that your third party system reaches out to. This provides a path for that system to interact with your Centercode site for a predetermined purpose - in this case, to trigger a pre-created macro and close a specific feedback ticket.
After creating the Macro above (from Feedback Resources):
- Click Feedback automation
- Click Create an external listener
- Create an (internally-facing) name
- Add a simple key to help identify this External Listener (ex: “jiraclosed”)
- Add a filter, if desired
- Under Listener Type dropdown, select Macro execution
- Select a Feedback macro
- Copy / Save the provided API Endpoint URL (needed in Section 4 below)
- Click Submit
You’ve just created your External Listener!
Configuring your external system to talk to Centercode
4. Configure a webhook in your external system (Jira):
You’ll now need to add a Webhook in your external system to contact the Centercode platform via the External Listener. In order to do that, you’ll need to verify Webhooks are enabled within that system. This example follows the process for enabling Webhooks in Atlassian Jira (Atlassian Support Documentation). Please note: enabling Webhooks requires global administrator access in Jira.
From your Jira instance:
- Click on Settings (screenshot)
- Click on System (screenshot)
- Scroll down to Advanced and click Webhooks (screenshot)
- Click Create a webhook (screenshot)
- Add your API Endpoint URL from your Centercode External Listener; customize your Jira Webhook as needed (Section 3.8; screenshot)
- The "Issue related events" field is your webhook's trigger requirements. Please refer to your Jira admin for JQL custom to your Jira project and your triggering needs. Here are some generic examples:
- project = Sandbox AND status changed to "In Progress"
- project = Sandbox AND status changed to "Done"
- project = Sandbox AND status changed to "Closed" AND resolution = "Fixed"
- project = "Sandbox" ANDlabels = delta AND resolution changed to (Fixed, Done)
- The "Issue related events" field is your webhook's trigger requirements. Please refer to your Jira admin for JQL custom to your Jira project and your triggering needs. Here are some generic examples:
- Replace the placeholder of VALUE with the stored Centercode ID or Jira ID - ${issue.key} - via the available dynamic identifiers
If the Centercode ticket has been sent to Jira through our first-class Jira integration, use ${issue.key} to target the ticket that’s being updated. If the ticket was not sent through our first-class Jira integration, VALUE must reference the Centercode ID.
Example:
https://example.centercode.com/api/v1/projects/project_key/feedbackMacroListeners/listener_key?find=${issue.key}&apiKey=prefix-community_API_key
Common issue
If you find that your webhooks are not being triggered from your Jira instance or the statuses of your Centercode tickets aren't updating as you're expecting, you may need to try different JQL in the "Issue related events" field within your Jira's webhooks. Please refer to your API Key's logs (Community Manager access only) to view the activity. To do that:
- Click on your Community's logo
- Hover over Community Administration
- Click All Community Tools
- Click API Keys
- Hover over your API key and click the Log icon
Notes
- The URL values included in the API Endpoint URL in Section 4.6 are critical to the success of your integration and correspond to the following:
- project_key - the key for your Centercode Project found in Basic Project Settings (screenshot)
- listener_key - the value that targets your External Listener in order to trigger the desired action within Centercode (“jiraclosed” in Section 3)
- find= - targets the feedback ticket within Centercode. This corresponds to either the Centercode Feedback ID (e.g. BUG-0001) or the Jira ID of a Centercode ticket that was sent to Jira through our first-class Jira Integration feature. Your endpoint system will need to dynamically insert the appropriate ID.
- prefix-community_API_key - refers to the Community API Key from Section 1 above
- Filters in the External Listener automation are used to limit the list of macro targets. In other words, the Listener will only trigger if the user or feedback is within the filter results. For example, rather than trigger the Listener for any Centercode feedback ticket (No Filter), you can designate only iOS issues or issues in the Logged to Jira status to be targeted.
- This example uses an Event Listener to trigger a specific Feedback Macro - a macro could be used for much more than just a changing Status (ex: scoring, static comments, email notifications, and more)
When sending a Post request to your Centercode API endpoint, the JSON body must be JSON encoded.