UserVoice Integration for Feedback Collection
UserVoice is a platform for collecting feature requests and feedback with support for SSO, custom fields, and integration with Jira/Salesforce. Designed for B2B SaaS with product administrator roles.
Widget Embedding
<!-- Basic integration via Gadget (sidebar widget) -->
<script>
UserVoice = window.UserVoice || [];
(function(){
var uv = document.createElement('script');
uv.type = 'text/javascript';
uv.async = true;
uv.src = '//widget.uservoice.com/YOUR_KEY.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(uv, s);
})();
UserVoice.push(['identify', {
email: currentUser.email,
name: currentUser.name,
id: currentUser.id,
account: {
id: currentUser.accountId,
name: currentUser.accountName,
}
}]);
UserVoice.push(['addTrigger', '#feedback-button', {
mode: 'satisfaction',
forum_id: 12345,
}]);
</script>
REST API for Idea Management
class UserVoiceService
{
private string $baseUrl;
private string $token;
public function __construct()
{
$this->baseUrl = 'https://' . config('services.uservoice.subdomain') . '.uservoice.com/api/v2';
$this->token = config('services.uservoice.token');
}
public function getSuggestions(string $forumId, array $params = []): array
{
$response = Http::withToken($this->token)
->get("{$this->baseUrl}/forums/{$forumId}/suggestions", array_merge([
'sort' => 'votes',
'per_page' => 25,
'filter' => 'public',
], $params));
return $response->json('suggestions', []);
}
public function createSuggestion(string $forumId, string $title, string $body, int $userId): array
{
return Http::withToken($this->token)
->post("{$this->baseUrl}/forums/{$forumId}/suggestions", [
'suggestion' => [
'title' => $title,
'body' => $body,
],
'user_id' => $userId,
])->json('suggestion');
}
}
Jira Synchronization
UserVoice supports native integration with Jira (in paid tiers). Ideas with a specific status automatically create tasks in Jira, and changes to task status update the idea status in UserVoice.
For custom synchronization, use a webhook from UserVoice and Jira REST API:
Route::post('/webhooks/uservoice', function (Request $request) {
if ($request->json('event') === 'suggestion.status_changed') {
$suggestion = $request->json('suggestion');
if ($suggestion['status']['key'] === 'planned') {
// Create task in Jira
Http::withBasicAuth(config('jira.user'), config('jira.token'))
->post(config('jira.url') . '/rest/api/3/issue', [
'fields' => [
'project' => ['key' => 'PROD'],
'summary' => $suggestion['title'],
'description' => ['type' => 'doc', 'version' => 1,
'content' => [['type' => 'paragraph',
'content' => [['type' => 'text', 'text' => $suggestion['body']]]]]],
'issuetype' => ['name' => 'Story'],
],
]);
}
}
return response('ok');
});
Timeline
UserVoice integration with SSO and status synchronization: 2–3 business days.







