Debugging your integration

To check what your configuration returns, you can add debugging data in the configuration to be shown in Communication Panel's extension area as conversation attached data (CAD) .

To test integrations that use a webhook, you can use, for example, the webhook.site testing service. Remember to be careful with the data you send.

Terminology

Several terms are used to refer to the data added to a conversation: CAD, contact/call attached data, attached data, and extra data. Communication Panel uses Attached Data. In System Configurator, the settings to configure attached data in the channel settings is Extra Data whereas IVR, reporting, and Visitor Intermediate Client API use Call Attached Data and CAD. Sinch Conversation API uses metadata.

Debugging data

Name Description Example values in CAD
{config_id} Unique identifier (UUID) of the event-driven integration configuration. You can use this for searching the related configuration from System Configurator.
7AE0F4C3-6B26-4DEF-83DD-17D98C7050C3
{method}, {request.method} Request method POST, GET, PUT, DELETE, PATCH
{url}, {request.url} Request URL, without query parameters
https://external.rest.api/data
{query_params}, {request.query_params} Query parameters of the request as object
{"key1": "value1"}
{status}, {response.status} Response status code
200
{duration}, {response.duration} Response duration
2.3970600999999998
*, {debug}, {response.debug} Includes all of the following:
  • Unique identifier of the configuration
  • Request data (method, URL, query parameters)
  • Response data (status code, headers, duration, and body/text)

    If the body of the response is in JSON format, it's included in the body property, otherwise in the text property.

Response body data in JSON format:

{
  "config_id": "DC81974F-8CDD-47F8-9D46-317D254FC714",
  "method": "GET",
  "url": "https://external.rest.api/data",
  "query_params": {
    "key": "D4CA988E0CB743C1A5601C05CD9E2D7E"
  },
  "status": 200,
  "duration": 0.8277760999990278,
  "headers": {
    "content-type": "application/json; charset=utf-8",
    "vary": "Accept-Encoding",
    "x-powered-by": "Express",
    "access-control-allow-origin": "*",
    "etag": "W/\"85-j7dJHV5O0eLMg8ehtuAzqwV8a8A\"",
    "content-encoding": "gzip",
    "x-cloud-trace-context": "94b61fe1655cd257fe4ee05fe42b6ef2",
    "date": "Fri, 16 Feb 2024 11:53:52 GMT",
    "server": "Google Frontend",
    "cache-control": "private",
    "alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
    "transfer-encoding": "chunked"
  },
  "body": {
    "records": [
      {
        "id": 279,
        "firstname": "John",
        "lastname": "Smith",
        "company": "Acme",
        "jobtitle": "Marketing Director"
      }
    ]
  }
}

Response body data not in JSON format:

{
  "config_id": "DC81974F-8CDD-47F8-9D46-317D254FC714",
  "method": "GET",
  "url": "",
  "query_params": {
    "key": "D4CA988E0CB743C1A5601C05CD9E2D7E"
  },
  "status": 404,
  "duration": 0.4138880499995139,
  "headers": {
    "access-control-allow-origin": "*",
    "alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
    "cache-control": "private",
    "content-encoding": "gzip",
    "content-length": 146,
    "content-security-policy": "default-src 'none'",
    "content-type": "text/html; charset=utf-8",
    "date": "Fri, 09 Aug 2024 10:18:06 GMT",
    "server": "Google Frontend",
    "vary": "Accept-Encoding",
    "x-cloud-trace-context": "6a34ff09160f94d6eb913f8c2f8eb581",
    "x-content-type-options": "nosniff",
    "x-powered-by": "Express"
  },
  "text": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Error</title>\n</head>\n<body>\n
            <pre>Cannot GET /non-existing</pre>\n</body>\n</html>\n"
}

Example CAD configuration for debugging

{
  "request": {
    "method": "GET",
    "headers": {
      "Accept": "application/json"
    }
  },
  "response": {
    "save": {
      "config_id": "{config_id}",
      "url": "{url}",
      "query_params": "{query_params}",
      "method": "{method}",
      "status": "{response.status}",
      "duration": "{response.duration}"
    }
  }
}