Overview
Webhooks
You can provide us a webhook endpoint and we will send real time notifications data to you in processed format or raw format. We trigger a notification whenever an action type
occurs on a comment.
List of Action Types
Action Type | Description |
---|---|
added | When a new comment is added |
updated | When an existing comment gets updated |
deleted | When an existing comments gets deleted |
approved | When the comment is approved by the moderator. This is only applicable if you have turned on Moderator Mode. |
assigned | When a comment gets assigned to a user |
reopened | When a closed comment gets reopened |
statusChanged | When a comment has its status changed (e.g. in progress, resolved, opened) |
priorityChanged | When a comment has its priority changed (e.g. P0, P1, P2 or custom set priorities) |
Setting up a Webhook
To enable Webhooks go to the Configurations -> Webhook Service in the Velt Console, or click here
Then provide the following:
-
Webhook Auth Token - this is an optional security feature. You can generate and set a unique auth token(string) on your velt console in the webhooks setting. We will add that to the authorization header whenever we are making a post request to your endpoint. This is so that you can validate that the request is coming from us and not a spammer.
-
Processed Notification URL - endpoint for processed notifications, usually hosted on your server and is used to process the incoming body data in Processed Format
-
Raw Notification URL - endpoint for processed notifications, usually hosted on your server and is used to process the incoming body data in Raw Format
Processed vs Raw Formats
The Raw Format contains lot more metadata that might not be very useful for your notification processing.
In the Processed Format, we will automatically populate who should get what type of notification so that you dont have to write that logic. Eg: If someone was previously tagged on a comment, then they should receive an update notification vs if someone if tagged in this thread, then they should receive a notification that they were tagged in a comment. We recommend using this so that you dont have to maintain the logic on your end.
Processed format
Field | Type | Required | Description |
---|---|---|---|
from | User | Yes | The user who added, updated or deleted the target Comment. |
commentText | string | Optional | text for the added, updated or deleted Comment. This is empty when entire CommentAnnotation is deleted. |
toContactsTagged | UserContact[] | Optional | List of user contacts that are tagged to the target Comment. |
toContactsUpdated | UserContact[] | Optional | List of user contacts that are on the target CommentAnnotation. This excludes all the user contacts that are on the target Comment. |
pageTitle | string | Yes | Title of the page on which the target CommentAnnotation is present. |
pageUrl | string | Yes | Full URL of the page on which the target CommentAnnotation is present. |
actionType | string | Yes | This can have 5 values: added, updated, deleted, resolved, approved |
Raw format
Field | Type | Required | Description |
---|---|---|---|
commentAnnotation | CommentAnnotation | Yes | The target CommentAnnotation object on which the event happened. |
targetComment | Comment | Optional | The target Comment object on which the event happened. This field will not be present if the event was at CommentAnnotation level. Eg: deleted the entire comment annotation, resolved comment, approved comment. |
actionType | string | Yes | This can have 5 values: added, updated, deleted, resolved, approved |
{
"from": {
"color": "#FFD600",
"contacts": [
{
"email": "john.doe@snippyly.com",
"name": "John Doe",
"photoUrl": "https://i.pravatar.cc/300",
"userId": "d5558f1f-bdea-4eb5-9fd5-ed657e460307",
"visibility": "group"
},
{
"email": "mary.doe@snippyly.com",
"name": "Mary Doe",
"photoUrl": "https://i.pravatar.cc/300",
"userId": "d5558f1f-bdea-4eb5-9fd5-ed657e460308",
"visibility": "group"
}
],
"email": "ben@velt.dev",
"groupId": "admins",
"name": "ben",
"photoUrl": "https://media.licdn.com/dms/image/C5603AQHgHt3GquPb0g/profile-displayphoto-shrink_400_400/0/1650605489047?e=1696464000&v=beta&t=9056kSSbnv5pNtD6IfTKJ6Facx5LV7myV2FwE5sEv7A",
"type": "signedIn",
"userId": "123ben",
"userSnippylyId": "4658641886513752"
},
"commentText": "test",
"commentTextFrom": {
"color": "#FFD600",
"contacts": [
{
"email": "john.doe@snippyly.com",
"name": "John Doe",
"photoUrl": "https://i.pravatar.cc/300",
"userId": "d5558f1f-bdea-4eb5-9fd5-ed657e460307",
"visibility": "group"
},
{
"email": "mary.doe@snippyly.com",
"name": "Mary Doe",
"photoUrl": "https://i.pravatar.cc/300",
"userId": "d5558f1f-bdea-4eb5-9fd5-ed657e460308",
"visibility": "group"
}
],
"email": "ben@velt.dev",
"groupId": "admins",
"name": "ben",
"photoUrl": "https://media.licdn.com/dms/image/C5603AQHgHt3GquPb0g/profile-displayphoto-shrink_400_400/0/1650605489047?e=1696464000&v=beta&t=9056kSSbnv5pNtD6IfTKJ6Facx5LV7myV2FwE5sEv7A",
"type": "signedIn",
"userId": "123ben",
"userSnippylyId": "4658641886513752"
},
"toContactsTagged": [],
"toContactsUpdated": [],
"pageTitle": "",
"pageUrl": "https://mixpanel-demo.vercel.app/?username=ben&scommentId=-NdDJhxEEljnpY-n8gH6",
"actionType": "added",
"status": {
"color": "#625DF5",
"id": "OPEN",
"lightColor": "#E7E8FA",
"name": "Open",
"svg": "\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M8.00016 13.3333C10.9457 13.3333 13.3335 10.9455 13.3335 8.00001C13.3335 5.05449 10.9457 2.66668 8.00016 2.66668C5.05464 2.66668 2.66683 5.05449 2.66683 8.00001C2.66683 10.9455 5.05464 13.3333 8.00016 13.3333ZM8.00016 14.6667C11.6821 14.6667 14.6668 11.6819 14.6668 8.00001C14.6668 4.31811 11.6821 1.33334 8.00016 1.33334C4.31826 1.33334 1.3335 4.31811 1.3335 8.00001C1.3335 11.6819 4.31826 14.6667 8.00016 14.6667Z\"\n fill=\"currentColor\"\n />\n </svg>\n ",
"type": "default"
},
"notificationSource": "comment",
"slackChannelId": "",
"documentId": "7528509053768138",
"clientDocumentId": "mixpanel-demo",
"deviceInfo": {
"browserName": "Chrome",
"browserVersion": "116",
"deviceType": "Desktop",
"orientation": "landscape",
"osName": "Macintosh",
"osVersion": "10.15.7",
"screenHeight": 982,
"screenWidth": 1512,
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
}
}
{
"from": {
"color": "#FFD600",
"contacts": [
{
"email": "john.doe@snippyly.com",
"name": "John Doe",
"photoUrl": "https://i.pravatar.cc/300",
"userId": "d5558f1f-bdea-4eb5-9fd5-ed657e460307",
"visibility": "group"
},
{
"email": "mary.doe@snippyly.com",
"name": "Mary Doe",
"photoUrl": "https://i.pravatar.cc/300",
"userId": "d5558f1f-bdea-4eb5-9fd5-ed657e460308",
"visibility": "group"
}
],
"email": "ben@velt.dev",
"groupId": "admins",
"name": "ben",
"photoUrl": "https://media.licdn.com/dms/image/C5603AQHgHt3GquPb0g/profile-displayphoto-shrink_400_400/0/1650605489047?e=1696464000&v=beta&t=9056kSSbnv5pNtD6IfTKJ6Facx5LV7myV2FwE5sEv7A",
"type": "signedIn",
"userId": "123ben",
"userSnippylyId": "4658641886513752"
},
"commentText": "test",
"commentTextFrom": {
"color": "#FFD600",
"contacts": [
{
"email": "john.doe@snippyly.com",
"name": "John Doe",
"photoUrl": "https://i.pravatar.cc/300",
"userId": "d5558f1f-bdea-4eb5-9fd5-ed657e460307",
"visibility": "group"
},
{
"email": "mary.doe@snippyly.com",
"name": "Mary Doe",
"photoUrl": "https://i.pravatar.cc/300",
"userId": "d5558f1f-bdea-4eb5-9fd5-ed657e460308",
"visibility": "group"
}
],
"email": "ben@velt.dev",
"groupId": "admins",
"name": "ben",
"photoUrl": "https://media.licdn.com/dms/image/C5603AQHgHt3GquPb0g/profile-displayphoto-shrink_400_400/0/1650605489047?e=1696464000&v=beta&t=9056kSSbnv5pNtD6IfTKJ6Facx5LV7myV2FwE5sEv7A",
"type": "signedIn",
"userId": "123ben",
"userSnippylyId": "4658641886513752"
},
"toContactsTagged": [],
"toContactsUpdated": [],
"pageTitle": "",
"pageUrl": "https://mixpanel-demo.vercel.app/?username=ben&scommentId=-NdDJhxEEljnpY-n8gH6",
"actionType": "added",
"status": {
"color": "#625DF5",
"id": "OPEN",
"lightColor": "#E7E8FA",
"name": "Open",
"svg": "\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M8.00016 13.3333C10.9457 13.3333 13.3335 10.9455 13.3335 8.00001C13.3335 5.05449 10.9457 2.66668 8.00016 2.66668C5.05464 2.66668 2.66683 5.05449 2.66683 8.00001C2.66683 10.9455 5.05464 13.3333 8.00016 13.3333ZM8.00016 14.6667C11.6821 14.6667 14.6668 11.6819 14.6668 8.00001C14.6668 4.31811 11.6821 1.33334 8.00016 1.33334C4.31826 1.33334 1.3335 4.31811 1.3335 8.00001C1.3335 11.6819 4.31826 14.6667 8.00016 14.6667Z\"\n fill=\"currentColor\"\n />\n </svg>\n ",
"type": "default"
},
"notificationSource": "comment",
"slackChannelId": "",
"documentId": "7528509053768138",
"clientDocumentId": "mixpanel-demo",
"deviceInfo": {
"browserName": "Chrome",
"browserVersion": "116",
"deviceType": "Desktop",
"orientation": "landscape",
"osName": "Macintosh",
"osVersion": "10.15.7",
"screenHeight": 982,
"screenWidth": 1512,
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
}
}