Pass custom data through the widget and into the Support Tools

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

Create a read-only ticket field in your UserVoice settings

  1. Click the icon in the bottom left corner.
  2. Choose "General"
  3. Choose "Ticket Fields, queues, and rules" 
  4. Choose "Ticket Fields"
  5. Click to add a new custom field, 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 ticket 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 Support Tools system.

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

    You Might Find Helpful:

    Feedback and Knowledge Base