What are Webhooks?
Webhooks operate on the concept of “event reaction” and thus avoids the need for constant polling of the server-side application by the client-side application. Therefore, rather than the client-side application constantly polling the server-side application to check for new events, the server-side application calls the client-side application (by invoking a client provided webhook URL) anytime the server-side has something new to report to the client. This is the core concept of the webhook.
Benefits:
- With webhooks, you can get push notifications when certain events happen on the server. You do not need to poll the API anymore to observe if these events have occurred. You can just ‘subscribe’ to an event with webhooks.
- Webhooks are powerful resources that you can use to automate your use cases and improve your productivity. Unlike the API resources, which represent static data that you can create, update and retrieve as needed, webhooks represent dynamic resources. You can configure them to automatically notify you when a customer has taken a particular action, such as initiating or replying to a conversation.
Creating and Managing Webhooks
You can create and manage the webhooks with the REST API available
here .
Trusted source validation (via signature):
What is a public key and how to generate it via API?
SalesIQ signs every webhook event passed on to the endpoint URL using RSA Cryptosystem.
- We use SHA256 with RSA as the signature algorithm.
- The signature is Base64 encoded
- The charset used is UTF-8
The generated Public key can be copied and saved in the endpoint server, which can later be used to check the authenticity of the data received with the signature attached. We will generate a public and a private key pair.
- API: /api/v2/{screenname}/webhooks/{id}/keys
- METHOD : POST
- Scope: SalesIQ.webhooks.CREATE
- API: /api/v2/{screenname}/webhooks/{id}/keys/{keyid}
- METHOD : DELETE
- Scope: SalesIQ.webhooks.DELETE
The trusted source validation is to secure the Webhooks, i.e., for you (integration services) to verify the data sent is from SalesIQ services by getting the public key in the API response and validating the signature available in the x-siqsignature request headers for that data. If the signature is valid, then the source can be trusted. This process is to secure the Webhooks from unauthorized access.
To validate the source with the help of signature header:
- HEADERS :
- {
- x-siqsignature : $signature
- }
If you wish to set up a secure callback, then create the webhook and set the secure as true ("secured:true".)
- Payload:
- {
- webhook : {
- url : $webhookurl,
- secured : <boolean>},
- published : <boolean>
- }
Note:
- Maximum Admin webhooks allowed per portal is 3
- Maximum auto retry count for a webhook is 3
- Auto retry occur after a minute
- Timeout per execution is 5 seconds
- Default error log retention period is 60 days
- Webhooks are available only in the Enterprise plan
Webhook Payload
The webhook is invoked when the event you've subscribed occur in SalesIQ. For example, if you have subscribed for conversation.visitor.replied then when a visitor replies to the chat then you'll be notified with some data.
Payload definition:
- version - The version of the webhook payload.
- event - The event notified.
- event_time - The time at which the event happened
- org_id - Your SalesIQ portal ID
- app_id - Your embed ID, available only for data events
- attempt - The number of attempts made to notify an event through webhook
- entity - The entity of the event occurred
- entity_type - The type of the entity (ex: Bot, department, operator)
- entity_id - Unique id of the entity. For ex, conversation id in case of conversation.* events
- modified_fields - List of properties modified
The payload should be received in the below format.
- {
- "version" : "1",
- "event" : "operator.created",
- "event_time" : $time of event,
- "org_id" : $soid,
- "app_id" : $appid,
- "attempt" : $count of retry,
- "entity_type" : $type of entity,
- "entity_id" : $ID,
- "entity" : {
- $ENTITY OBJECT
- },
- "modified_fields" : [ ]
- }
Example:
- {
- "entity_type":"conversation",
- "org_id":"14327896",
- "event":"conversation.operator.replied",
- "entity_id":"8000000004009",
- "attempt":1,
- "version":"1",
- "app_id":8000000000047,
- "entity":{
- "id":"8000000004009",
- "message":{
- "sender":{
- "name":"Tricia",
- "id":"8000000000005"
- },
- "msgid":"1566480708251",
- "text":"Hello, I need some help with the shipping status"
- }
- },
- "event_time":1566480708268
- }
Webhook Pre-requisites
- The "https" URL is recommended for security reasons.
- Our server can not connect with the URL with the port number.
- Make sure the URL can be accessed in public API clients such as Postman and Talend API Tester to be accessible in our server.
- Once the URL is provided, it will be pinged to get validated with the read time out of 5 seconds.
- If it is not reached within 5 seconds, an HTTP HEAD request gets triggered to the URL to check the status code 200.
- Ensure the webhook returns the response within 10 seconds. If not, the bot will not work.
Cases where webhook will be disabled:
Case 1: When the webhook returns HTTP code 400 and above which fails to return success acknowledgment continuously, the portal owner and webhook creator will receive a set of warnings via email.
- The first warning mail will be triggered when the webhook fails continuously for 3 hours, and a second warning mail will be triggered when it fails for 6 hours.
- The webhook will be disabled and a final mail will be triggered when the webhook fails for 12 hours continuously.
Case 2: When the webhook returns HTTP code 410 while posting the registered events. The SalesIQ system will delete the webhook, and both the portal owner and webhook creator will receive an email.
Note: If the webhook returns success response during this period, it works as usual. However, if it fails again, the above cycle will begin from the first.
Events:
With Webhooks, you can get notified when certain events happen on SalesIQ. If you have subscribed to the following list of events then you will be notified with the data when the respective event occur.
Webhook Modules:
The following modules are available and you can be notified when an action relating to that module occurs.
- Conversation : A conversation lets you track and describe communications with your website visitors. The conversation can have the visitor/operator messages, the operator involved, the admin/supervisor assigned to the conversation and other information related to the conversation.
- Department : The departments is an administration event, you can subscribe to the event and get notified when a new department is created, updated or deleted. There are two different types of event in the Webhooks: Data and administration.
Conversation
A conversation lets you track and describe communications with your website visitors. The conversation can have the visitor/operator message, the operator involved, the admin/supervisor assigned to the conversation and other information related to the conversation.
List of conversation events:
- conversation.created
- conversation.attender.updated
- conversation.missed
- conversation.completed
- conversation.rated
- conversation.visitor.replied
- conversation.operator.replied
- conversation.completed
- conversation.rated
- conversation.transfer.initiated
- conversation.transfer.accepted
- conversation.transfer.rejected
- conversation.participants.added
- conversation.participants.deleted
- conversation.supervisor.added
- conversation.message.edited
- conversation.message.deleted
conversation.created
You can subscribe to this event if you wish to be notified when a visitor initiates a chat.
- Payload:
- {
- "id": "17000000004021",
- "visitor_conversation_id": "ad433hjdid546f8n4b734j4omfhjsrwnet46fklf7",
- "reference_id": "1",
- "opened_time": "1556866331533",
- "attended_time": "1556866331553",
- "end_time": "1556866331929",
- "missed_time": "1556866333232",
- "app_id": "30185567778889",
- "department_id": "301050000004",
- "owner": {
- "id": "30102333033335",
- "name": "Patricia",
- "email_id": "patricia@zylker.com"
- },
- "visitor":{
- "email_id":"tricia@zylker.com",
- "phone":"1234354",
- "name":"Tricia",
- "channel":"website",
- "type" : "contact",
- "id": "30000000090034"
- },
- "question": "Hi, I need some assistance in buying a dining set.",
- "supervisors": [
- "30102333033336",
- "30102333033337"
- ],
- "participants": [
- "30102333033336",
- "30102333033337"
- ],
- "status": "Live",
- "chat_status": {
- "status_code": [
- "1,2"
- ],
- "state": [
- "1,2,3,4"
- ],
- "label": "Live"
- }
- }
conversation.attender.updated
You can subscribe to this event if you wish to be notified when operators pick up a chat.
- Payload:
- {
- "id": "17000000004021",
- "visitor_conversation_id": "ad433hjdid546f8n4b734j4omfhjsrwnet46fklf7",
- "reference_id": "1",
- "opened_time": "1556866331533",
- "attended_time": "1556866331553",
- "end_time": "1556866331929",
- "missed_time": "1556866333232",
- "app_id": "30185567778889",
- "department_id": "301050000004",
- "owner": {
- "id": "30102333033335",
- "name": "Patricia",
- "email_id": "patricia@zylker.com"
- },
- "visitor":{
- "email_id":"tricia@zylker.com",
- "phone":"124534354",
- "name":"Tricia",
- "channel":"website",
- "type" : "contact",
- "id": "30000000090034"
- }
- },
- "question": "Hi, I need some assistance in buying a dining set.",
- "supervisors": [
- "30102333033336",
- "30102333033337"
- ],
- "participants": [
- "30102333033336",
- "30102333033337"
- ],
- "status": "Connected",
- "chat_status": {
- "status_code": [
- "1,2"
- ],
- "state": [
- "1,2,3,4"
- ],
- "label": "Attended Online"
- }
- }
conversation.missed
You can subscribe to this event if you wish to be notified when a chat initiated by the visitor is not picked by any operator and missed.
- Payload:
- {
- "id": "17000000004021",
- "visitor_conversation_id": "ad433hjdid546f8n4b734j4omfhjsrwnet46fklf7",
- "reference_id": "1",
- "opened_time": "1556866331533",
- "attended_time": "1556866331553",
- "end_time": "1556866331929",
- "missed_time": "1556866333232",
- "app_id": "30185567778889",
- "department_id": "301050000004",
- "owner": {
- "id": "30102333033335",
- "name": "Patricia",
- "email_id": "patricia@zylker.com"
- },
- "visitor":{
- "email_id":"tricia@zylker.com",
- "phone":"12344354",
- "name":"Tricia",
- "channel":"website",
- "type" : "contact",
- "id": "30000000090034"
- },
- "question": "Hi, I need some assistance in buying a dining set.",
- "supervisors": [
- "30102333033336",
- "30102333033337"
- ],
- "participants": [
- "30102333033336",
- "30102333033337"
- ],
- "status": "Missed",
- "chat_status": {
- "status_code": [
- "1,2"
- ],
- "state": [
- "1,2,3,4"
- ],
- "label": "Tracked in CRM"
- }
- }
conversation.operator.replied
You can subscribe to this event if you wish to be notified when an operator replies to the chat initiated by the visitor.
- Payload for text messages:
- {
- "id":"8000000004009",
- "message":{
- "sender":{
- "name":"Tricia",
- "id":"8000000000005"
- },
- "msgid":"1566480708251",
- "text":"Hi, I need some assistance in buying a dining set."
- },
- "visitor":{
- "email_id":"tricia@zylker.com",
- "phone":"12344354",
- "name":"Tricia",
- "type" : "contact",
- "id": "30000000090034"
- },
- "owner":{
- "id":"30102333033335",
- "name":"Patricia",
- "email_id":"patricia@zylker.com"
- },
- "version":1
- }
- Payload for file attachements:
- {
- "id":"8000000004009",
- "message":{
- "sender":{
- "name":"Tricia",
- "id":"8000000000005"
- },
- "msgid":"1566480708251",
- "file":{
- "dimensions":{
- "height":700.0,
- "width":525.0
- },
- "name":"pricing-details.jpg",
- "comment":"Here is the pricing details."
- "url":"/attachments/734343/A_16872571388888",
- "id":"A_16872571388888",
- "blur_image":"/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDABwfijweifweijfiwjnefojnwiefowXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2Nj",
- "attachment_id":68564000016029999,
- "type":"image/jpeg",
- "extension":"image/jpeg",
- "size":40078
- }
- },
- "visitor":{
- "email_id":"tricia@zylker.com",
- "phone":"12344354",
- "name":"Tricia",
- "type" : "contact",
- "id": "30000000090034"
- },
- "owner":{
- "id":"30102333033335",
- "name":"Patricia",
- "email_id":"patricia@zylker.com"
- },
- "version":1
- }
- Bot conversation payload for text messages:
- {
- message : {
- "sender" : {
- "id" : $sender wms id,
- "name" : $sender name
- },
- "text" : $msg, // Absent for bot message
- "msgid" : $msg id, // Absent for bot message
- "meta" : $meta data, ---> applicable for bot message
- "list" : [
- $MESSAGE LIST
- ]
- }
- }
- Bot conversation payload for file attachements:
- message : {
- "sender" : {
- "id" : $sender wms id,
- "name" : $sender name
- },
- "file":{
- "dimensions":
- {
- "height":700.0,
- "width":525.0
- },
- "name":"tricia-proof.jpg",
- "comment":"Here is my ID for the verfication."
- "url":"/attachments/734343/A_16872571311111",
- "id":"A_16872571311111",
- "blur_image":"/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDwojrngovjwnrojngwojrnfvw9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2Nj",
- "attachment_id":68564000016011111,
- "type":"image/jpeg",
- "extension":"image/jpeg",
- "size":49078
- }
- "msgid" : $msg id, // Absent for bot message
- "meta" : $meta data, ---> applicable for bot message
- "list" : [
- $MESSAGE LIST
- ]
- }
- }
conversation.visitor.replied
You can subscribe to this event if you wish to be notified when a visitor replies.
- Payload for text messages:
- {
- "id": "8000000005001",
- "message": {
- "sender": {
- "name": "Tricia",
- "id": "$2463902591169630574"
- },
- "msgid": "1566481170562",
- "text": "Hi, i need some assistance in buying a dining set"
- },
- "owner": {
- "id": "30102333033335",
- "name": "Patricia",
- "email_id": "patricia@zylker.com"
- },
- "visitor":{
- "email_id":"tricia@zylker.com",
- "phone":"1234354",
- "name":"Tricia",
- "type" : "contact",
- "id": "30000000090034"
- },
- "version": 1
- }
- Payload for file attachments:
- {
- "id": "8000000004009",
- "message": {
- "sender": {
- "name": "Tricia",
- "id": "8000000000005"
- },
- "msgid": "1566480708251",
- "file":{
- "dimensions":{
- "height":700.0,
- "width":525.0
- },
- "name":"tricia-proof.jpg",
- "comment":"Here is my ID for the verfication."
- "url":"/attachments/734343/A_16872571322222",
- "id":"A_16872571322222",
- "blur_image":"/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2Nj",
- "attachment_id":68564000016021057,
- "type":"image/jpeg",
- "extension":"image/jpeg",
- "size":49078
- }
- },
- "visitor": {
- "email_id": "tricia@zylker.com",
- "phone": "12344354",
- "name": "Tricia",
- "type": "contact",
- "id": "30000000090034"
- },
- "owner": {
- "id": "30102333033335",
- "name": "Patricia",
- "email_id": "patricia@zylker.com"
- },
- "version": 1
- }
conversation.completed
You can subscribe to this event if you wish to be notified when a chat conversation ends.
- Payload:
- {
- "id": "17000000004021",
- "visitor_conversation_id": "ad433hjdid546f8n4b734j4omfhjsrwnet46fklf7",
- "reference_id": "1",
- "opened_time": "1556866331533",
- "attended_time": "1556866331553",
- "end_time": "1556866331929",
- "missed_time": "1556866333232",
- "app_id": "30185567778889",
- "department_id": "301050000004",
- "owner": {
- "id": "30102333033335",
- "name": "Patricia",
- "email_id": "patricia@zylker.com"
- },
- "visitor":{
- "email_id":"tricia@zylker.com",
- "phone":"12344354",
- "name":"Tricia",
- "channel":"website",
- "type" : "contact",
- "id": "30000000090034"
- },
- "question": "Hi, I need some assistance in buying a dining set.",
- "supervisors": [
- "30102333033336",
- "30102333033337"
- ],
- "participants": [
- "30102333033336",
- "30102333033337"
- ],
- "status": "Closed",
- "chat_status": {
- "status_code": [
- "1,2"
- ],
- "state": [
- "1,2,3,4"
- ],
- "label": "Attended by Email"
- }
- }
conversation.rated
You can subscribe to this event if you wish to be notified when the visitor rate or provide feedback for the chat conversation they had with the operator.
- Payload for rating:
- {
- "rating": 4,
- "feedback": "Good support",
- "owner": {
- "id": "30102333033335",
- "name": "Patricia",
- "email_id": "patricia@zylker.com"
- },
- "visitor":{
- "email_id":"tricia@zylker.com",
- "phone":"12344354",
- "name":"Tricia",
- "channel":"website",
- "type" : "contact",
- "id": "30000000090034"
- }
- }
- Payload for feedback:
- {
- "entity_type": "conversation",
- "org_id": "55778119",
- "event": "conversation.rated",
- "entity_id": "40526000001808033",
- "attempt": 1,
- "version": "1",
- "app_id": 40526000000002040,
- "entity": {
- "owner": {
- "name": "Patricia",
- "email_id": "patricia@zylker.com"
- "id": "40526000000002001"
- },
- "feedback": "Awesome support from the reps!",
- "id": "40526000001808033",
- "status": "Ended",
- "visitor":{
- "email_id":"tricia@zylker.com",
- "phone":"12344354",
- "name":"Tricia",
- "type" : "contact",
- "id": "30000000090034"
- }
- },
- "event_time": "1567065865617"
- }
conversation.transfer.initiated
You can subscribe to this event if you wish to be notified when a conversation transfer is initiated.
Payload:
- {
- "owner": {
- "email_id": "patricia@zylker.com",
- "name": "patricia@zylker.com",
- "id": "30000000099007"
- },
- "transfer": {
- "note": "More info required",
- "type": "user|department",
- "department_id": "30000000148001",
- "transferred_by": {
- "type": "bot|operator",
- "email_id": "patricia@zylker.com",
- "name": "patricia@zylker.com",
- "id": "30000000099007"
- },
- "transferred_to": [
- {
- "id": "30000000000006",
- "name": "Patricia",
- "email_id": "patricia@zylker.com"
- }
- ]
- },
- "waiting_time": "60",
- "question": "Hi, I need some assistance in buying a dining set",
- "department_id": "30000000000018",
- "id": "30000000095001",
- "visitor_conversation_id": "2d665c42a02e919ac0f91f62fa78581d",
- "visitor": {
- "email_id": "tricia@zylker.com",
- "phone": "1234354",
- "name": "Tricia",
- "type": "contact",
- "id": "30000000090034"
- }
conversation.transfer.accepted
You can subscribe to this event if you wish to be notified when a transferred chat is accepted by the operator.
- Payload:
- {
- "accepted_by": {
- "name": "Patricia",
- "id": "30000000000006",
- "email_id": "patricia@zylker.com"
- },
- "question": "Hi, i need some assistance in buying a dining set",
- "department_id": "30000000000018",
- "id": "30000000158001",
- "visitor": {
- "email_id": "tricia@zylker.com",
- "phone": "1234354",
- "name": "Tricia",
- "type": "contact",
- "id": "30000000090034"
- },
- "visitor_conversation_id": "2d665c42a02e919a171b7845509162e6"
- }
conversation.transfer.rejected
You can subscribe to this event if you wish to be notified when a transferred chat is rejected by the operator.
- Payload:
- {
- "rejected_by": {
- "type": "auto | manual",
- "name": "Patricia",
- "id": "30000000000006",
- "email_id": "patricia@zylker.com"
- },
- "question": "Hi, i need some assistance in buying a dining set",
- "department_id": "30000000000018",
- "id": "30000000158001",
- "visitor": {
- "email_id": "tricia@zylker.com",
- "phone": "1234354",
- "name": "Tricia",
- "type": "contact",
- "id": "30000000090034"
- },
- "visitor_conversation_id": "2d665c42a02e919ac0f91f62fa78581d"
- }
conversation.participants.added
You can subscribe to this event if you wish to be notified when participants are invited to the chat.
- Payload:
- {
- "question": "Hi, i need some assistance in buying a dining set",
- "department_id": "30000000000018",
- "id": "30000000095001",
- "invite": {
- "note": "asdfqsf",
- "added_by": {
- "name": "patricia@zylker.com",
- "id": "30000000099007",
- "email_id": "patricia@zylker.com"
- },
- "added_operators": [
- {
- "name": "Patricia",
- "id": "30000000000006",
- "email_id": "patricia@zylker.com"
- }
- ]
- },
- "visitor_conversation_id": "2d665c42a02e919ac0f91f62fa78581d",
- "visitor": {
- "email_id": "tricia@zylker.com",
- "phone": "1234354",
- "name": "Tricia",
- "type": "contact",
- "id": "30000000090034"
- },
- "owner": {
- "name": "Patricia",
- "id": "30000000000006",
- "email_id": "patricia@zylker.com"
- }
- }
conversation.participants.deleted
You can subscribe to this event if you wish to be notified when a participant is removed from a conversation.
- Payload:
- {
- "question": "Hi, i need some assistance in buying a dining set",
- "department_id": "30000000000018",
- "deleted_by": {
- "name": "Patricia",
- "id": "30000000000006",
- "email_id": "patricia@zylker.com"
- },
- "deleted_operators": [
- {
- "name": "Patricia+1",
- "id": "30000000000106",
- "email_id": "patricia@zylker.com"
- }
- ],
- "visitor": {
- "email_id": "tricia@zylker.com",
- "phone": "1234354",
- "name": "Tricia",
- "type": "contact",
- "id": "30000000090034"
- },
- "owner": {
- "name": "Patricia",
- "id": "30000000000006",
- "email_id": "patricia@zylker.com"
- },
- "id": "30000000095001",
- "visitor_conversation_id": "2d665c42a02e919ac0f91f62fa78581d"
- }
conversation.supervisor.added
You can subscribe to this event if you wish to be notified when a supervisor is added to the chat.
- Payload:
- {
- "added_operators": [
- {
- "name": "Patricia",
- "id": "30000000000006",
- "email_id": "patricia@zylker.com"
- }
- ],
- "id": "30000000095001",
- "question": "Hi, I need some assistance in buying a dining set",
- "department_id": "30000000000018",
- "visitor": {
- "email_id": "tricia@zylker.com",
- "phone": "1234354",
- "name": "Tricia",
- "type": "contact",
- "id": "30000000090034"
- },
- "owner": {
- "name": "Patricia+1",
- "id": "30000000000106",
- "email_id": "patricia@zylker.com"
- },
- "visitor_conversation_id": "2d665c42a02e919ac0f91f62fa78581d"
- }
conversation.message.edited
You can subscribe to this event if you wish to be notified when a message is edited in chat.
- Payload:
- {
- "id": "8000000005001",
- "message": {
- "sender": {
- "name": "Patricia",
- "id": "30000000000006"
- },
- "msgid": "1566481170562",
- "text": "abcc"
- },
- "visitor": {
- "email_id": "tricia@zylker.com",
- "phone": "1234354",
- "name": "Tricia",
- "type": "contact",
- "id": "30000000090034"
- },
- "owner": {
- "name": "Patricia+1",
- "id": "30000000000106",
- "email_id": "patricia@zylker.com"
- },
- "visitor_conversation_id": "2d665c42a02e919ac0f91f62fa78581d"
- }
conversation.message.deleted
You can subscribe to this event if you wish to be notified when a message is deleted in chat.
- Payload:
- {
- "id": "8000000005001",
- "message": {
- "sender": {
- "name": "Patricia",
- "id": "30000000000006"
- },
- "msgid": "1566481170562"
- },
- "visitor": {
- "email_id": "tricia@zylker.com",
- "phone": "1234354",
- "name": "Tricia",
- "type": "contact",
- "id": "30000000090034"
- },
- "owner": {
- "name": "Patricia+1",
- "id": "30000000000106",
- "email_id": "patricia@zylker.com"
- },
- "visitor_conversation_id": "2d665c42a02e919ac0f91f62fa78581d",
- }
Departments:
There are two different types of event in the Webhooks: Data and administration. The departments is an administration event, you can subscribe to the event and get notified when a new department is created, updated or deleted.
List of department events:
- department.created
- department.deleted
- department.updated
department.created
You can subscribe to this event if you wish to notify whenever a new department is created inside the portal.
- Payload:
- {
- "entity_type": "department",
- "org_id": "55778119",
- "event": "department.created",
- "entity_id": "40526000001808025",
- "attempt": 1,
- "version": "1",
- "entity": {
- "is_enabled": "true",
- "created_time": "1571032858870",
- "modified_time": "1571032858870",
- "operators": [
- "6000000000005"
- ],
- "is_system_generated": "false",
- "name": "Support",
- "is_public": "true",
- "email_configurations": {
- "missedchat_recipients": "",
- "cc_recipients": "",
- "is_blockip_mail_enabled": "true",
- "from_email": "tricia@zylker.com",
- "transcript_recipients": "tricia@zylker.com",
- "is_feedback_mail_enabled": "true",
- "blockip_recipients": "",
- "feedback_recipients": "",
- "is_missedchat_mail_enabled": "true",
- "is_cc_mail_enabled": "true",
- "is_transcript_mail_enabled": "true"
- },
- "description": "A team to support the visitors on your site",
- "id": "6000000009015",
- "display_name": "Zylker-support",
- "created_by": "6000000000005"
- },
- "event_time": "1567065647511"
- }
department.deleted
You can subscribe to this event if you wish to get notified when a department is deleted in the portal.
- Payload:
- {
- "entity_type": "department",
- "org_id": "55778119",
- "event": "department.deleted",
- "entity_id": "40526000001808025",
- "attempt": 1,
- "version": "1",
- "event_time": "1567065647511"
- }
department.updated
You can subscribe to this event if you wish to get notified when a details in the department is updated.
- Payload:
- {
- "entity_type": "department",
- "org_id": "55778119",
- "event": "department.updated",
- "entity_id": "40526000001808025",
- "attempt": 1,
- "version": "1",
- "entity": {
- "is_enabled": "true",
- "created_time": "1571032858870",
- "modified_time": "1571032858870",
- "operators": [
- "6000000000005"
- ],
- "is_system_generated": "false",
- "name": "Support",
- "is_public": "true",
- "email_configurations": {
- "missedchat_recipients": "",
- "cc_recipients": "",
- "is_blockip_mail_enabled": "true",
- "from_email": "tricia@zylker.com",
- "transcript_recipients": "tricia@zylker.com",
- "is_feedback_mail_enabled": "true",
- "blockip_recipients": "",
- "feedback_recipients": "",
- "is_missedchat_mail_enabled": "true",
- "is_cc_mail_enabled": "true",
- "is_transcript_mail_enabled": "true"
- },
- "description": "A team to support the visitors on your site",
- "id": "6000000009015",
- "display_name": "Zylker-support",
- "created_by": "6000000000005"
- },
- "event_time": "1567065647511"
- }
Operators
There are two different types of events in the Webhooks: Data and administration. The Operators are an administration event, you can subscribe to this and get notified when an operator event is performed.
List of Operator events:
- operator.created
- operator.updated
- operator.deleted
- operator.departments.associated
- operator.departments.dissociated
operator.created
You can subscribe to this event if you wish to get notified whenever a new operator is added to your organization.
Payload:
- {
- "entity_type": "operator",
- "org_id": "15188410",
- "event": "operator.created",
- "entity_id": "115000000029087",
- "attempt": 1,
- "version": "1",
- "entity": {
- "email_id": "patricia@zylker.com",
- "access_levels": [
- "chat",
- "tracking"
- ],
- "role": "Administrator",
- "signature": "2e8132839ffef039e24ab8e162b5b1f1",
- "date_of_birth": "",
- "description": "",
- "language": "",
- "chat_enabled": true,
- "type": "Salesiq User",
- "locale": "",
- "confirmed": false,
- "enabled": true,
- "notify": {
- "return_visit": false,
- "new_visit": false
- },
- "modified_time": "1596093400214",
- "id": "115000000029087",
- "departments": [
- "115000000004001",
- "115000000000018"
- ],
- "first_name": "",
- "owner": false,
- "created_time": "1596093400198",
- "time_format": "12 hours",
- "address": {
- "country": "",
- "pincode": "",
- "city": "",
- "street": "",
- "state": ""
- },
- "maximum_concurrent_chat": "none",
- "image_url": "",
- "mobile": "",
- "last_name": "",
- "time_zone": "",
- "locale_country": "",
- "deleted": false,
- "phone": "",
- "nick_name": "Patricia",
- "social_media": {
- "twitter": {
- "profile_url": ""
- },
- "linkedin": {
- "profile_url": ""
- },
- "enabled": false
- },
- "status": "Available"
- },
- "event_time": "1596093402483"
- }
operator.updated
You can subscribe to this event if you wish to be notified whenever an operator's setting is modified.
Payload:
- {
- "entity_type": "operator",
- "org_id": "15188410",
- "event": "operator.updated",
- "entity_id": "115000000000094",
- "attempt": 1,
- "version": "1",
- "entity": {
- "email_id": "patricia@zylker.com",
- "access_levels": [
- "chat",
- "tracking"
- ],
- "role": "Administrator",
- "signature": "2e8132839ffef039e7eaaa00748b47ec",
- "date_of_birth": "",
- "description": "",
- "language": "en",
- "chat_enabled": true,
- "type": "Salesiq User",
- "locale": "en",
- "confirmed": true,
- "enabled": true,
- "notify": {
- "return_visit": false,
- "new_visit": false
- },
- "modified_time": "1596092957234",
- "id": "115000000000094",
- "departments": [
- "115000000000018"
- ],
- "first_name": "Patricia",
- "owner": false,
- "created_time": "1594720783132",
- "time_format": "12 hours",
- "address": {
- "country": "us",
- "pincode": "625012",
- "city": "Malibu",
- "street": "Pacific Coast Highway",
- "state": "California"
- },
- "maximum_concurrent_chat": "none",
- "image_url": "",
- "mobile": "08903694722",
- "last_name": "Smith",
- "time_zone": "United States/California",
- "zuid": "15102744",
- "locale_country": "us",
- "deleted": false,
- "phone": "1234567890",
- "nick_name": "Patricia",
- "social_media": {
- "twitter": {
- "profile_url": ""
- },
- "linkedin": {
- "profile_url": ""
- },
- "enabled": false
- },
- "status": "Available"
- },
- "event_time": "1596092957257"
- }
operator.deleted
You can subscribe to this event if you wish to be notified when an operator is removed.
Payload:
- {
- "entity_type": "operator",
- "org_id": "15188410",
- "entity_id": "115000000029087",
- "event": "operator.deleted",
- "version": "1",
- "attempt": 1,
- "event_time": "1596093526367"
- }
operator.departments.associated
You can subscribe to this event if you wish to get notified whenever an operator is associated with a department.
Payload:
- {
- "entity_type": "operator",
- "org_id": "15188410",
- "event": "operator.departments.associated",
- "entity_id": "115000000000006",
- "attempt": 1,
- "version": "1",
- "entity": {
- "departments": [
- "115000000004001"
- ],
- "id": "115000000000006"
- },
- "event_time": "1596094781678"
- }
operator.departments.dissociated
You can subscribe to this event if you wish to get notified when an operator is removed from a department.
Payload:
- {
- "entity_type": "operator",
- "org_id": "15188410",
- "event": "operator.departments.dissociated",
- "entity_id": "115000000000006",
- "attempt": 1,
- "version": "1",
- "entity": {
- "departments": [
- "115000000004001"
- ],
- "id": "115000000000006"
- },
- "event_time": "1596094781678"
- }
Visitors
There are two different types of events in the Webhooks: Data and administration. The Visitors are data event, you can subscribe to this and get notified when a visitor event is performed.
List of Visitor events:
- visitor.updated
visitor.updated
You can subscribe to this event if you wish to be notified when a piece of visitor information is updated.
Case 1: You will receive this payload when lead information is updated.
Payload:
- {
- "id": "30000000095001",
- "type": "lead ",
- "first_name": "Scott",
- "last_name": "Smith",
- "modifier": {
- "type": "operator",
- "email_id": "patricia@zylker.com",
- "name": "patricia@zylker.com",
- "id": "30000000099007"
- }
- }
Case 2: You will receive this payload when contact information is added to a lead
Note: A lead will be converted as a contact when information such as email or phone is provided for the first time.
Payload:
- {
- "id": "30000000095001",
- "type": "contact",
- "first_name": "Scott",
- "last_name": "Smith",
- "email_id": "scottsmith@zylker.com",
- "phone": "9123459876",
- "lead": {
- "id": "30000000090034"
- },
- "modifier": {
- "type": "operator",
- "email_id": "patricia@zylker.com",
- "name": "patricia@zylker.com",
- "id": "30000000099007"
- }
- }
Case 3: You will receive this payload when a contact's information is updated.
Payload:
How can I set up Webhooks?
To setup webhooks,
Inside the SalesIQ dashboard, navigate to Settings > Developers > Webhooks .
- Here, you can add portal-based and embed-based events through webhooks in the Administration and Data modules respectively. You will be notified to the specified URL when an event occurs.
How to add a portal-based webhook in the Administration module?
Inside the Administration module, you can create webhooks based on portal operations. On subscription, you will be notified every time a portal event occurs. To add a new webhook,
- Click Add .
- Enter the URL that has to be invoked.
- Choose the events that you want to associate with the webhook.
- Finally, click Create Webhook and your webhook will be created.
- You will also be able to see the Webhook instructions here.
How to delete a portal-based webhook in the Administration Module?
To delete a webhook,
- In the dashboard, hover over the webhook that you want to delete and then click on the delete icon on the far right.
- A confirmation pop-up appears. Click Delete and the webhook will be deleted.
How to enable/disable a webhook in the Administration module?
How to add an embed-based webhook in the Data module?
Inside the Data module, you can create webhooks based on embed operations. On subscription, you will be notified every time an embed event occurs. To add a new webhook,
- Click Add .
- Choose the SalesIQ app(s) that you want to create a webhook for.
- Enter the URL that has to be invoked.
- Choose the events that you want to associate with the webhook.
- Finally, click Create Webhook and your webhook will be created.
- You will also be able to see the Webhook instructions here.
How to delete an embed-based webhook in the Data Module?
To delete a webhook,
- In the dashboard, hover over the webhook that you want to delete and then click on the delete icon on the far right.
- A confirmation pop-up appears. Click Delete and the webhook will be deleted.
How to enable/disable a webhook in the Data module?
To enable/disable a webhook,
- Click the toggle button that appears on the right end of each webhook.
Dashboard:
Inside the webhook dashboard, you will be able to view the following details:
- Failures: The number of times the webhook has failed
- Last Triggered: When the webhook was last triggered
- App: A list of the apps the webhook is associated with