Knowledge Base > Comnica Contact Center > Developer and general information > Webhook
Support
contact
Content
Comnica Contact Center
Comnica SmartSMS
Mass SmartSMS
Webhook

Comnica Contact Center can react to certain events by calling a remote URL.

At that address, some HTTP server must listen and receive POST requests with a JSON body.

Comnica’s system only sends one request for each event and does not monitor the response received from the set endpoint, and accordingly does not retry the warning related to the given event.

Setup

1 single webhook URL can be ordered separately for each CC (telephone) and identification (video, NRTI) project, e.g. https://api.example.com:8080/comnica-webhook-receiver/

No other configuration options are available at this time.

Format

The body of the webhook call is a UTF-8 encoded JSON string. It has three keys.

  • event: the event that caused the call, such as cc.record.save, is always populated
  • event_reason: a kind of discriminator within that event, such as operator.termination, can be null
  • payload: object, with all the data that seems necessary and sufficient. The value is at least {}.
{
  "event""i12n.record.state.change",
  "event_reason"null,
  "payload": {
    "record_id": 42,
    "previous_state""active",
    "new_state""reviewing"
  }
}

Saving CC record

  • event: cc.record.save
  • event_reason:
    • site.edit — edited on the admin interface
    • operator.save — the record was saved in the Client
    • operator.termination — the record was saved and terminated using the Client
  • payload:
    • record_id — id of the record
    • termination_id — id of the termination null
    • terminating_code — terminating code or null