Skip to content

Instantly share code, notes, and snippets.

@asafb-wix
Created April 10, 2018 19:56
Show Gist options
  • Select an option

  • Save asafb-wix/c7b35079162343fd2e85280c6b920e9c to your computer and use it in GitHub Desktop.

Select an option

Save asafb-wix/c7b35079162343fd2e85280c6b920e9c to your computer and use it in GitHub Desktop.
Wix Answers Webhooks
Both Webhooks will be sent as POST requests to the webhook URL.
The json payload will be sent in the request body.
Webhook values definitions:
==================================
1. All id values are of Guid type.
2. All dates are represented as long timestamp milliseconds (epoch/unix timestamp).
3. user.externalId - This is a String type representing the SSO external user id (for those using an external authentication method - SSO).
4. user.userType - is one of possible values:
1 - AUTHENTICATED
2 - UNAUTHENTICATED
5. channel - is one of possible values:
100 - HELP_CENTER
110 - EMAIL
120 - PHONE CALLBACK
121 - PHONE OUTBOUND
122 - PHONE INBOUND
130 - EMAIL OUTBOUND
140 - FACEBOOK
170 - WIDGET
180 - API
6. status - in ticket json is one of possible values:
100 - OPEN
110 - PENDING
120 - CLOSED
140 - SOLVED
150 - INVESTIGATING
7. priority - in ticket json is one of possible values:
10 - LOW
20 - NORMAL
30 - HIGH
{
"payload": {
"content": "my reply",
"user": {
"id": "795b56cf-8478-4211-8d3d-4229b2c6040b",
"email": "[email protected]",
"externalId": "795b56cf-8478-4211-8d3d-4229b2c6040b",
"userType": 1,
"firstName": "John",
"lastName": "Doe",
"profileImage": "https://wix.com/image_path.png",
"fullName": "John Doe"
},
"channel": 100,
"creationDate": 1523384142463,
"lastUpdateDate": 1523384142463,
"userInfo": {
"userAgent": "Apache-HttpClient/4.5.5 (Java/1.8.0_31)",
"operatingSystemFamily": "JVM",
"operatingSystemName": "JVM (Java)",
"operatingSystemVersion": "1.8.0_31",
"browserFamily": "Jakarta Commons-HttpClient",
"browserName": "Apache-HttpClient",
"browserVersion": "4"
},
"attachments": [
{
"name": "bob.jpg",
"url": "https://path/attachment.ico",
"sizeBytes": 3000,
"contentType": "image/x-icon",
"status": 200
}
],
"id": "353b9b38-91d3-43d3-b3a7-d298f1b8b8ae",
"ticketId": "f649b9f7-653e-4f94-b251-0fa0eee894c4",
"parentTicket": {
"content": "content",
"user": {
"id": "795b56cf-8478-4211-8d3d-4229b2c6040b",
"email": "[email protected]",
"externalId": "795b56cf-8478-4211-8d3d-4229b2c6040b",
"userType": 1,
"firstName": "John",
"lastName": "Doe",
"profileImage": "https://wix.com/image_path.png",
"fullName": "John Doe"
},
"channel": 100,
"creationDate": 1523384129386,
"lastUpdateDate": 1523384142468,
"userInfo": {
"userAgent": "Apache-HttpClient/4.5.5 (Java/1.8.0_31)",
"operatingSystemFamily": "JVM",
"operatingSystemName": "JVM (Java)",
"operatingSystemVersion": "1.8.0_31",
"browserFamily": "Jakarta Commons-HttpClient",
"browserName": "Apache-HttpClient",
"browserVersion": "4"
},
"id": "f649b9f7-653e-4f94-b251-0fa0eee894c4",
"locale": "en",
"ticketNumber": 567840219,
"status": 100,
"priority": 20,
"lastOpenedDate": 1523384129000,
"repliesCount": 1,
"subject": "subject",
"spam": false,
"unauthenticated": false,
"url": "https://wixanswers.com/en/ticket/c7e4f131-c25b-4a54-81e5-79157fc75e16",
"uri": "/ticket/c7e4f131-c25b-4a54-81e5-79157fc75e16"
}
},
"url": "http://the-webhook-url"
}
{
"payload": {
"content": "ticket content",
"user": {
"id": "795b56cf-8478-4211-8d3d-4229b2c6040b",
"email": "[email protected]",
"externalId": "795b56cf-8478-4211-8d3d-4229b2c6040b",
"userType": 1,
"firstName": "John",
"lastName": "Doe",
"profileImage": "https://wix.com/image_path.png",
"fullName": "John Doe"
},
"channel": 100,
"creationDate": 1523383824201,
"lastUpdateDate": 1523383824201,
"userInfo": {
"userAgent": "Apache-HttpClient/4.5.5 (Java/1.8.0_31)",
"operatingSystemFamily": "JVM",
"operatingSystemName": "JVM (Java)",
"operatingSystemVersion": "1.8.0_31",
"browserFamily": "Jakarta Commons-HttpClient",
"browserName": "Apache-HttpClient",
"browserVersion": "4"
},
"attachments": [
{
"name": "bob.jpg",
"url": "https://path/attachment.ico",
"sizeBytes": 3000,
"contentType": "image/x-icon",
"status": 200
}
],
"id": "c7e4f131-c25b-4a54-81e5-79157fc75e16",
"locale": "en",
"ticketNumber": 726433060,
"status": 100,
"priority": 20,
"lastOpenedDate": 1523383824000,
"repliesCount": 0,
"subject": "my ticket",
"relatedArticleIds": [
"bb563e73-01e3-479b-80ff-c6f1ec20802f"
],
"spam": false,
"unauthenticated": false,
"url": "https://wixanswers.com/en/ticket/c7e4f131-c25b-4a54-81e5-79157fc75e16",
"uri": "/ticket/c7e4f131-c25b-4a54-81e5-79157fc75e16"
},
"url": "http://the-webhook-url"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment