Skip to main content

Notifications

SyncHive notifications are critical alerts designed specifically to inform your Connector when it sends data that SyncHive cannot process. This situation typically occurs when there is a discrepancy, such as a Connector sending a SalesOrder message that references a Product not recognized by SyncHive. The purpose of these notifications is to alert your Connector to such discrepancies, prompting immediate corrective action.

Endpoint Configuration

Begin by establishing an endpoint within your Connector. This endpoint acts as the receiver for SyncHive's notifications, ensuring your Connector can acknowledge and address these alerts efficiently.

Configure your endpoint as follows:

PUThttps://{my_api}/v1/notification

Understanding Notification Payloads

Upon receiving a notification, the provided payload will offer comprehensive details about the encountered discrepancy. It will include the error type, which is currently only REFERENCE_WONT_RESOLVE, the originalDocument containing the problematic data sent by your Connector, and references pinpointing the exact issues within that data. An example payload is as follows:

Body
{
"integrationKey": "shopify",
"integrationVersion": "1.0.0",
"integrationBuildNumber": 1,
"event": {
"type": "REFERENCE_WONT_RESOLVE",
"id": 620605279,
"integration": "shopify"
},
"retries": 1,
"originalDocument": { ... },
"references": [
{ ... }
]
}

Responding to Notifications

After receiving a notification, your Connector needs to communicate back to SyncHive with instructions on how to handle the problematic data. There are two response options available:

  • CONTINUE: Directs SyncHive to attempt saving the data again.
  • CANCEL_PUBLISH: Instructs SyncHive to cease any further saving attempts for the problematic data.

Here's how you can format your response to SyncHive:

Headers
Content-Type: "application/json"
Body
{
"notificationType": "CONTINUE"
}