Votes
Create, Delete and Query the Votes in Zendesk. Votes represents positive and negative opinions of users about articles, article comments, posts or post comments.
Table Specific Information
Select
The following queries are processed server side while other filters are processed client side within the connector.SELECT * FROM Votes WHERE UserId = '19128124956177' SELECT * FROM Votes WHERE ArticleId = '19206579478289' SELECT * FROM Votes WHERE Locale = 'en-us' AND ArticleId = '19206579478289' SELECT * FROM Votes WHERE ArticleId = '19206579478289' AND CommentId = '19244072685969' SELECT * FROM Votes WHERE Locale = 'en-us' AND ArticleId = '19206579478289' AND CommentId = '19244072685969' SELECT * FROM Votes WHERE PostId = '19206579516945' SELECT * FROM Votes WHERE PostId = '19206579516945' AND CommentId = '19244379733521'
You can turn off the client-side execution of the query by setting SupportEnhancedSQL to false in which case any other search criteria will be ignored and an unfiltered response will be returned.
Insert
The Value field is required to insert. Allowed for End-users.
To create an vote for a given Article:
INSERT INTO Votes (ArticleId, Value) VALUES ('19206579478289', 1)
To create an vote for a given Article comment:
INSERT INTO Votes (ArticleId, CommentId, Value) VALUES ('19206579478289', '19244072685969', 1)
To create an vote for a given Post:
INSERT INTO Votes (PostId, Value) VALUES ('19206579516945', -1)
To create an vote for a given Post Comment:
INSERT INTO Votes (PostId, CommentId, Value) VALUES ('19206579516945', '19244379733521', -1)
Delete
You must specify the Id of the Vote to delete it. Allowed for Agents and End-users.
DELETE FROM Votes WHERE Id = '19243214837905'
Columns
Name | Type | ReadOnly | References | Description |
Id [KEY] | Long | True |
Automatically assigned when the vote is created. | |
UserId | Long | True |
Users.Id |
The id of the user who cast this vote. |
ItemId | Long | True |
The id of the item for which this vote was cast. | |
ItemType | String | True |
The type of the item. Can be Article, Comment, Post or PostComment. | |
Value | Integer | False |
The value of the vote. Specify 1 for up and -1 for down. The allowed values are 1, -1. | |
Url | String | True |
The ids of user segments that have edit privileges. For insertion and updation provide these values separated by semicolon. | |
CreatedAt | Datetime | True |
The time at which the vote was created. | |
UpdatedAt | Datetime | True |
The time at which the vote was last updated. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
Locale | String |
The locale value. |
ArticleId | Long |
The Id of the Article. |
CommentId | Long |
The Id of the Article Comment or Post Comment. |
PostId | Long |
The Id of the Post. |