Keep your community in the loop by by sending Centercode feedback to Discord
This article applies to Pro, Team, and Legacy editions.
Note that while Centercode’s integration features are intended to be approachable by a Centercode Program Manager, you might need to enlist help from an internal technical resource and refer to our vocabulary and troubleshooting documentation.
Often used as a means of proactive community building, communication, and collaboration, a Discord community is a great resource for finding enthusiastic testers as well as soliciting feedback from product users. Depending on your product and audience, integrating with Centercode can expand your testing program’s footprint and build an even stronger sense of community from your users.
In this example, we’ll discuss sending a webhook from Centercode, catching it on your Discord server to create a post, and updating your post as things change in Centercode (e.g. the Status changes). Also, a huge Thank you! to Jake F. at Intel, a great customer partner and Centercode power-user who helped define this integration.
Preparing to catch a feedback webhook in Discord
Discord offers some clear, simple guidance on setting up the receiving side via their Webhooks help article, found here.
Here are the highlights:
- Within your Discord server settings, find the Integrations menu
- Create a new webhook using the New Webhook button
- Name the webhook and choose the channel it will post to
- Copy the Webhook URL for use later on
Sending feedback from Centercode
On the Centercode side, you’ll configure a Webhook Macro in the feedback type of your choosing. Follow this Centercode help article to cover the basics. Here are a couple tips:
- To send feedback from Centercode to Discord, you’ll need a POST webhook macro using the Webhook URL from the previous section.
- The webhook URL determines which bot posts the message and to which channel. If you want different feedback types to post into different Discord channels, you’ll need different Discord Webhooks and webhook URLs.
- Collecting Return Values including the Discord Message ID lets you reference the feedback posted by your integration, allowing you to update it at a later date.
- Within the JSON you send, use the Discord Markdown reference to add formatting and some extra pizzazz to your post.
Once your webhook macro has been created, all you need to do is decide when it's triggered - when it creates the post in Discord. This macro could be initiated by a Feedback Macro Trigger (On Submission or On Modify) under Feedback Automation, or it can be done manually when modifying the feedback within the Centercode UI.
Updating the message in Discord
If you captured the Discord Message ID in the previous section, your Centercode feedback will have a unique linking value between these two systems. That means that you can use another Centercode webhook to update the post when important factors change - particularly Status.
- Copy the webhook macro exactly as you have it in the previous section
- Change the Web request method to PATCH
- Adjust the Webhook URL in order to target a specific post via Dynamic Tag as shown below:
- Adjust the JSON body to include whatever new data or formatting you want - note that the PATCH method will completely replace the original message, so don’t leave off anything you want to keep
Repeat these steps for each update type you want to enable. If you want to update the message for every change of your feedback’s Status, you’ll need a webhook macro and a macro trigger for each.
Troubleshooting & Notes
Updating the message isn’t working - the Return Value (message ID) isn’t being stored in my External Data.
Updating requires that the system know which message to update -- we use the Message ID for this. In order to give the integration enough time to capture and store the Message ID value, make sure you include ?wait=true at the end of the webhook URL on the macro that creates the initial post. Once you have that External Data captured, you should be able to use it in accordance with the Updating section above.
Can I post the feedback to Discord as a thread, allowing more discussion to take place in that channel?
You sure can! Threads can only be created in Forum channels, and Forum channels require that your Discord server be classified as a Community. Here’s a Discord help article that describes that process. Note that the JSON in your webhook macros will need to provide a “thread_name” in order to create a thread. Otherwise it’ll just be a normal post.
Can I sync comments between the systems?
While a custom Discord Bot might be able to accomplish this task, it’s not a consideration at this time. If it’s critical for your use of the Discord integration, let us know!