ArticleComments
Returns article comments, including comment body, author, locale, and vote details.
Table-Specific Information
Select
The following queries are processed server-side while other filters are processed client-side within the provider.SELECT * FROM ArticleComments WHERE UserId = '19128124956177'
SELECT * FROM ArticleComments WHERE ArticleId = '19206579478289'
SELECT * FROM ArticleComments WHERE ArticleId = '19206579478289' AND Locale = 'en-us'
SELECT * FROM ArticleComments WHERE ArticleId = '19206579478289' AND Id = '19244072685969'
SELECT * FROM ArticleComments WHERE ArticleId = '19206579478289' AND Id = '19244072685969' AND Locale = 'en-us'
Insert
The Locale, ArticleId, and Body fields are required to insert.
INSERT INTO ArticleComments (ArticleId, Locale, Body, NotifySubscribers) VALUES ('19206579478289', 'en-us', 'Sample Comment Body', false)
Update
You must specify the ArticleId and Id of the comment to update. This operation is allowed for logged-in users with the "agent" role, or the end user who created the comment.
UPDATE ArticleComments SET Body = 'Updated Comment' WHERE ArticleId = '19206579478289' AND Id = '19268721555473'
Delete
You must specify the ArticleId and Id of the comment to delete it. This operation is allowed for logged-in users with the "agent" role, or the end user who created the comment.
DELETE FROM ArticleComments WHERE ArticleId = '19206579478289' AND Id = '19269079247633'
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Long | True |
The Id automatically assigned when the comment is created. | |
| AuthorId | Long | False |
The Id of the author of this comment. Writable on create by Help Center managers. | |
| Body | String | False |
The comment made by the author. | |
| Locale | String | False |
The locale in which this comment was made. | |
| url | String | True |
The API URL of this comment. | |
| HtmlUrl | String | True |
The URL at which the comment is presented in Help Center. | |
| NonAuthorEditorId | Long | True |
The Id of the user who performed the most recent non-author edit, if any. A non-author edit is an edit made by a user other than the author that creates or updates the body or author Id. Note that only edits made after May 17, 2021 are reflected in this field. If no non-author edits have occurred since May 17, 2021, this field is null. | |
| NonAuthorUpdatedAt | Datetime | True |
The date and time when the comment was last edited by a non-author user. | |
| SourceId | Long | True |
The Id of the item on which this comment was made. | |
| SourceType | String | True |
The type of the item on which this comment was made. Currently only supports 'Article'. | |
| VoteCount | Integer | True |
The total number of upvotes and downvotes. | |
| VoteSum | Integer | True |
The sum of upvotes (+1) and downvotes (-1), which may be positive or negative. | |
| CreatedAt | Datetime | True |
The date and time when the comment was created. Writable on create by Help Center managers. | |
| UpdatedAt | Datetime | True |
The date and time when the comment was last updated. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer more granular control over the data returned from the data source.
| Name | Type | Description |
| ArticleId | Long |
The Id of the article. |
| UserId | Long |
The Id of the user. |
| NotifySubscribers | Boolean |
Indicates whether to notify subscribers to the comment's article when a new comment is created. Setting this to false prevents subscribers from receiving a comment creation email notification. This can be useful when creating many comments at a time. |