This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.
A comments interface can let a visitor or member express an opinion and change it later. Keep the same authenticated identity throughout this flow.
Prerequisite: Use a comment in a context that allows the caller to vote. The app ID and context ID must match that comment's integration.
To cast, change, and remove a vote:
contextData.resourceId, wix.comments.v2.comment as resourceFqdn, and that contextData.vote.voteId and display the selection from vote.type.vote.voteId and the same context to clear the selection.When comments load, retrieve the current visitor's or member's votes to restore the voting controls. An application query can return other identities' votes and isn't a substitute for this personal query.
To restore the selections:
Collect the displayed comment IDs that share the same app and context.
Call Query Votes with the visitor's or member's authentication, that contextData, and a query.filter such as:
Retrieve the remaining pages using paging.cursors.next as query.cursorPaging.cursor, keeping the filter and context unchanged.
Index the returned votes by resourceId and render each selection from type. After all pages are loaded, comments without a matching vote have no selection.
Keep each voteId for later removal. Clear and reload personal vote state when the identity changes.
Last updated: 10 September 2026