1. Help Center
  2. Enhanced Integrations & APIs
  3. Centercode Guides to Endpoint Specific Systems

How can Jira update feedback within Centercode?

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:

  1. Create (or identify) an API Key in Centercode
  2. Create a Feedback Macro in Centercode
  3. Create a Feedback External Listener in Centercode
  4. 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:

  1. Click the desired Feedback Type (from the feedback section of the menu)
  2. If necessary, click the Switch to Advanced View button (top right corner)
  3. Click the Feedback Resources button
  4. Click the Create a Macro button
  5. Select the Adjust Workflow checkbox
  6. Choose the appropriate responsible Team (typically Beta Support or Project Managers)
  7. Select the appropriate Workflow (typically Default)
  8. Select the appropriate Status (typically Closed)
  9. 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):

  1. Click Feedback Automation
  2. Click Create an External Listener
  3. Create an (internally-facing) name
  4. Add a simple key to help identify this External Listener (ex: “jiraclosed”)
  5. Add a Filter, if desired
  6. Under Listener Type dropdown, select Macro Execution
  7. Select a Feedback Macro 
  8. Copy / Save the provided API Endpoint URL (needed in Section 4 below)
  9. 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:

  1. Click on Settings (screenshot)
  2. Click on System (screenshot)
  3. Scroll down to Advanced and click Webhooks (screenshot)
  4. Click Create a Webhook (screenshot)
  5. Add your API Endpoint URL from your Centercode External Listener; customize your Jira Webhook as needed (Section 3.8; screenshot)
    1. 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:
      1.  project = Sandbox AND status changed to "In Progress"
      2.  project = Sandbox AND status changed to "Done"
      3.  project = Sandbox AND status changed to "Closed" AND resolution = "Fixed"
      4. project = "Sandbox" ANDlabels = delta AND resolution changed to (Fixed, Done) 
  6. 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:

  1. Click on your Community's logo
  2. Hover over Community Administration
  3. Click All Community Tools
  4. Click API Keys
  5. 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.