UserVoice API now provides a way to map your system’s data to its own. You create mappings that are called External IDs. This is useful in cases where you want to link your data to UserVoice data or if you want to maintain information in your system using data in UserVoice. For example, you might want to link suggestions or tickets to your own issue or ticketing system and let UserVoice provide easy links back to your system. We provide an API for this.
External IDs simply mean storing another system’s IDs in UserVoice. You don’t need to make any changes to your own system’s data model. All you need is unique primary keys that UserVoice can store in the external_id array of each data record. Any data record in UserVoice can have as many data mappings as you want. These mappings can be used in various ways, especially in synchronizing data. You can choose between global and selective synchronization. For the time being, only suggestions (tickets support will be added) can be selectively synchronized by polling UserVoice, but the system will be improved to utilize service hooks in the future. Pushing data is much more efficient than polling.
Global Ticket and Suggestion Synchronization
Typically, you want to request the records that do not yet have a mapping in
UserVoice. This can be achieved by calling the listing endpoints
/api/v1/tickets) in the UserVoice API. Then, we
just map the suggestions to our own data model. Suppose that we have the
following set of records that we would like to map from one system to another.
1 2 3 4 5 6
Mappings are created with
identify call. Let’s map the tickets first. At this
point you can create the records in your system, if you are doing a full
identify serves as a confirmation that lets UserVoice
know about the synchronized tickets.
1 2 3 4 5 6 7 8 9 10 11
Now we have connected the two tickets in UserVoice to their corresponding issues, as shown in the diagram below.
Then, let’s query for the suggestions that haven’t been synchronized.
1 2 3 4 5
To connect the suggestion, we have to do the following kind of request:
1 2 3 4 5 6 7 8 9 10
Now we have a new mapping in our diagram.
Now we have all the suggestions and tickets mapped. We can make sure by requesting the mapped tickets and requests via these two calls:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16