Pass custom data through the widget and into the Helpdesk

In order to pass custom data through your widget and into the ticketing system, follow these steps:

Create the custom field in your UserVoice Account

  1. Click on "Settings" in the top right corner of the Admin Console
  2. Choose "General" from the drop down menu
  3. Choose "Ticket Fields, queues, and rules" 
  4. Choose "Ticket Fields"
  5. Click to Add a new custom field and select the "Read-Only option" and name your field.

Install the widget on your website

Add the following command before the widget code

For this example, let’s say you add a Text Input custom field named ‘Favorite Color’, which accepts open-ended values, and is also publicly displayed to the user on the widget.
    UserVoice.push(['set', 'ticket_custom_fields', {'Favorite Color': 'Blue'}]);

    Make sure to set this before calling your widget (with UserVoice.push(['addTrigger'...]), UserVoice.push(['showTab'...]), etc.).

    You can use this to pass custom data that's read-only (not visible to the user), or pre-fill a customer facing field for an end user. It also works the same way with the embedded widget. 

    That’s it! When your customer clicks on the widget, their information will be passed through the widget and into the UserVoice Helpdesk system.

    Note: If you are using the Classic Widget, you won't be able to pre-set public facing custom fields.

    Other Articles You Might Find Helpful:

    Feedback and Knowledge Base