Custom Reporting

Custom report endpoints.

Delete Custom Chart

DELETE https://{{account_id}}.acquire.io/api/v1​/analytics/custom-reporting/delete-custom-chart

Delete a custom report. Warning: This action cannot be undone.

Query Parameters

NameTypeDescription

report_key

string

Id of chart to delete

Headers

NameTypeDescription

Authorization

string

Bearer ***YOUR_API_KEY***

{
  "data": {
    "success": true,
    "data": {
      "title": "test chart",
      "config": [
        {
          "key": "id",
          "filters": [
            {
              "key": "id",
              "conditions": [
                {
                  "key": "is",
                  "searchValue": [
                    "1"
                  ]
                }
              ]
            }
          ],
          "joinType": "AND",
          "availableAggregation": [
            "group_by",
            "count",
            "list"
          ],
          "label": "Id"
        }
      ],
      "chartKey": "test-chart",
      "chartType": "table",
      "tenantId": "4wic4e",
      "id": 50,
      "data": [
        {
          "main_case_id": 1,
          "main_contact_id": 1,
          "id": 1
        }
      ],
      "totalCount": 1
    }
  }
}

Create Custom Chart

POST https://{{account_id}}.acquire.io/api/v1/analytics/custom-reporting/generate-chart

Create a custom chart.

Headers

NameTypeDescription

Authorization

string

Bearer ***YOUR_API_KEY***

Request Body

NameTypeDescription

config

array

Array of objects. The configuration of your chart. See example below.

chartType

string

Specify the type of chart. Available charts: "table"

title

string

Chart title

{
  "data": {
    "success": true,
    "data": {
      "title": "test chart",
      "config": [
        {
          "key": "id",
          "filters": [
            {
              "key": "id",
              "conditions": [
                {
                  "key": "is",
                  "searchValue": [
                    "1"
                  ]
                }
              ]
            }
          ],
          "joinType": "AND",
          "availableAggregation": [
            "group_by",
            "count",
            "list"
          ],
          "label": "Id"
        }
      ],
      "chartKey": "test-chart",
      "chartType": "table",
      "tenantId": "5mkg3t",
      "id": 15,
      "data": [
        {
          "main_case_id": 1,
          "main_contact_id": 1,
          "id": 1
        }
      ],
      "totalCount": 1
    }
  }
}

Body(raw) for Create Custom Chart

{
  "title": "test chart",
  "config": [
    {
      "key": "id",
      "filters": [
        {
          "key": "id",
          "conditions": [
            {
              "key": "is",
              "searchValue": [
                "1"
              ]
            }
          ]
        }
      ]
    }
  ],
  "objectKey": "conversations",
  "chartType": "table"
}

Edit Custom Report

POST https://{{account_id}}.acquire.io/api/v1/analytics/custom-reporting/edit-custom-report

Edit a custom report.

Headers

NameTypeDescription

Authorization

string

Bearer ***YOUR_API_KEY***

Request Body

NameTypeDescription

reportKey

string

Key for report which you want to edit. This is the report's current name.

description

string

Add a description for the report

reportName

string

Name of the report

{
  "data": {
    "success": true,
    "url": "updating-the-custom-reports-name"
  }
}

Body(raw) for Edit Custom Report

{
  "reportKey": "testconversation",
  "reportName": "Updating the custom reports name"
}

Create Custom Report

POST https://{{account_id}}.acquire.io/api/v1/analytics/custom-reporting/generate-report

Create a custom report.

Headers

NameTypeDescription

Authorization

string

Bearer ***YOUR_API_KEY***

Request Body

NameTypeDescription

objectKey

string

Selected object type. You can get object keys by calling the Get Data Points endpoint mentioned below.

description

string

A short description of the chart

reportName

string

Name of report

{
  "data": {
    "success": true,
    "url": "testing-the-new-custom-report"
  }
}

Body(raw) for Create Custom Report

{
  "reportName": "testconversation",
  "description": "Testing purpose",
  "objectKey": "conversation"
}

Delete Custom Report details

DELETE https://{{account_id}}.acquire.io/api/v1/analytics/custom-reporting/delete-custom-report

Delete a custom report's details. Warning: This action cannot be undone.

Query Parameters

NameTypeDescription

report_key

string

The current name of the report which you want to delete.You can get report key by calling Get All Custom Reports.

Headers

NameTypeDescription

Authorization

string

Bearer ***YOUR_API_KEY***

{
  "data": {
    "success": true
  }
}

Get Custom Report details

GET https://{{account_id}}.acquire.io/api//v1/analytics/custom-reporting/get-custom-report

Retrieve all custom report details.

Query Parameters

NameTypeDescription

report_key

string

Key of report which you want to get data. You can get report key by calling Get All Custom Reports API.

offset

string

This parameter is used for the timezone value and the default timezone will be "GMT". e.g. +05:30 for particular timezone. Default is +00:00

Headers

NameTypeDescription

Authorization

string

Bearer ***YOUR_API_KEY***

{
  "data": {
    "success": true,
    "customReport": {
      "reportName": "test report",
      "description": "test",
      "objectKey": "operator",
      "id": 37,
      "reportKey": "testreport"
    },
    "reportData": [
      {
        "id": 33,
        "title": "first table report",
        "chartKey": "first-table-report",
        "chartType": "table",
        "config": [
          {
            "key": "id",
            "label": "Operator Id",
            "filters": [],
            "dataType": "number",
            "joinType": "AND",
            "aggregation": "group_by",
            "aggregationLabel": "Operator Id",
            "availableAggregation": [
              "group_by",
              "count",
              "list"
            ]
          },
          {
            "key": "average_response_time",
            "label": "Average Response Time",
            "filters": [
              {
                "key": "average_response_time",
                "conditions": [
                  {
                    "key": "between",
                    "searchValue": [
                      "0",
                      "10"
                    ]
                  }
                ]
              }
            ],
            "customUi": {
              "duration": true
            },
            "dataType": "object",
            "joinType": "AND",
            "aggregation": "avg",
            "aggregationLabel": "Response Time",
            "availableAggregation": [
              "sum",
              "avg",
              "list"
            ]
          }
        ],
        "reportId": 37,
        "tenantId": "4wic4e",
        "data": [
          {
            "id": 56,
            "average_response_time": 9
          }
        ],
        "totalCount": 1
      },
      {
        "id": 34,
        "title": "report without aggregation",
        "chartKey": "report-without-aggregation",
        "chartType": "table",
        "config": [
          {
            "key": "id",
            "label": "Operator Id",
            "filters": [],
            "dataType": "number",
            "joinType": "AND",
            "aggregationLabel": "Operator Id",
            "availableAggregation": [
              "group_by",
              "count",
              "list"
            ]
          },
          {
            "key": "average_response_time",
            "label": "Average Response Time",
            "filters": [
              {
                "key": "average_response_time",
                "conditions": [
                  {
                    "key": "between",
                    "searchValue": [
                      "0",
                      "10"
                    ]
                  }
                ]
              }
            ],
            "customUi": {
              "duration": true
            },
            "dataType": "object",
            "joinType": "AND",
            "aggregationLabel": "Response Time",
            "availableAggregation": [
              "sum",
              "avg",
              "list"
            ]
          }
        ],
        "reportId": 37,
        "tenantId": "4wic4e",
        "data": [
          {
            "id": 56,
            "operator_id": 56,
            "average_response_time": 9
          }
        ],
        "totalCount": 1
      }
    ]
  }
}

Get All custom reports

GET https://{{account_id}}.acquire.io/api/v1/analytics/custom-reporting/get-all-custom-report

Get list of all custom reports with name, description and report key. Report key will be used to get details of custom report.

Headers

NameTypeDescription

Authorization

string

Bearer ***YOUR_API_KEY***

{
  "data": {
    "success": true,
    "customReport": [
      {
        "id": 35,
        "reportName": "Test_Report",
        "description": "test",
        "reportKey": "testreport"
      }
    ]
  }
}

Get All Datapoints

GET https://{{account_id}}.acquire.io/api/v1/analytics/custom-reporting/get-data-points

Retrieve a list of all available data points for available objects.

Headers

NameTypeDescription

Authorization

string

Bearer ***YOUR_API_KEY***

{
  "data": {
    "objects": [
      {
        "objectName": "Conversations",
        "objectKey": "conversations",
        "dataSource": [
          {
            "label": "Id",
            "key": "id",
            "options": [],
            "filters": [
              {
                "label": "Id",
                "key": "id",
                "dataType": "number",
                "options": [],
                "conditions": [
                  {
                    "label": "Is",
                    "key": "is",
                    "supportMultiple": false
                  },
                  {
                    "label": "In",
                    "key": "in",
                    "supportMultiple": true
                  }
                ]
              }
            ],
            "dataType": "number",
            "availableAggregation": [
              "group_by",
              "count",
              "list"
            ]
          },
          {
            "label": "Title",
            "key": "title",
            "options": [],
            "filters": [
              {
                "label": "Title",
                "key": "title",
                "dataType": "text",
                "options": [],
                "conditions": [
                  {
                    "label": "Is",
                    "key": "is",
                    "supportMultiple": false
                  },
                  {
                    "label": "Contains",
                    "key": "like",
                    "supportMultiple": false
                  },
                  {
                    "label": "One of",
                    "key": "in",
                    "supportMultiple": true
                  }
                ]
              }
            ],
            "dataType": "text",
            "customUi": {
              "isEmojiSupported": true
            },
            "availableAggregation": [
              "list"
            ]
          },
          {
            "label": "Description",
            "key": "description",
            "options": [],
            "filters": [
              {
                "label": "Description",
                "key": "description",
                "dataType": "text",
                "options": [],
                "conditions": [
                  {
                    "label": "Is",
                    "key": "is",
                    "supportMultiple": false
                  },
                  {
                    "label": "Contains",
                    "key": "like",
                    "supportMultiple": false
                  },
                  {
                    "label": "One of",
                    "key": "in",
                    "supportMultiple": true
                  }
                ]
              }
            ],
            "dataType": "text",
            "customUi": {
              "isEmojiSupported": true
            },
            "availableAggregation": [
              "list"
            ]
          },
          {
            "label": "Contact Name",
            "key": "contact_name",
            "options": [],
            "filters": [
              {
                "label": "Contact Name",
                "key": "name",
                "dataType": "text",
                "options": [],
                "conditions": [
                  {
                    "label": "Is",
                    "key": "is",
                    "supportMultiple": false
                  },
                  {
                    "label": "Contains",
                    "key": "like",
                    "supportMultiple": false
                  },
                  {
                    "label": "One of",
                    "key": "in",
                    "supportMultiple": true
                  }
                ]
              }
            ],
            "dataType": "text",
            "availableAggregation": [
              "group_by",
              "count",
              "list"
            ]
          },
          {
            "label": "Contact Email",
            "key": "contact_email",
            "options": [],
            "filters": [
              {
                "label": "Contact Email",
                "key": "email",
                "dataType": "text",
                "options": [],
                "conditions": [
                  {
                    "label": "Is",
                    "key": "is",
                    "supportMultiple": false
                  },
                  {
                    "label": "Contains",
                    "key": "like",
                    "supportMultiple": false
                  },
                  {
                    "label": "One of",
                    "key": "in",
                    "supportMultiple": true
                  }
                ]
              }
            ],
            "dataType": "object",
            "availableAggregation": [
              "group_by",
              "count",
              "list"
            ]
          },
          {
            "label": "Visit Id",
            "key": "visit_visit_id",
            "filters": [
              {
                "label": "Visit Id",
                "key": "id",
                "dataType": "number",
                "options": [],
                "conditions": [
                  {
                    "label": "Is",
                    "key": "is",
                    "supportMultiple": false
                  },
                  {
                    "label": "In",
                    "key": "in",
                    "supportMultiple": true
                  }
                ]
              }
            ],
            "options": [],
            "dataType": "object",
            "availableAggregation": [
              "group_by",
              "list"
            ]
          },
          {
            "label": "Visit Date",
            "key": "visit_date",
            "filters": [
              {
                "label": "Visit Date",
                "key": "date_created",
                "dataType": "datetime",
                "options": [],
                "conditions": [
                  {
                    "label": "Equals",
                    "key": "between",
                    "supportMultiple": true
                  }
                ]
              }
            ],
            "options": [],
            "dataType": "object",
            "availableAggregation": [
              "group_by",
              "list"
            ]
          },
          {
            "label": "Visit Source URL",
            "key": "visit_source",
            "filters": [
              {
                "label": "Source URL",
                "key": "source",
                "dataType": "text",
                "options": [],
                "conditions": [
                  {
                    "label": "Is",
                    "key": "is",
                    "supportMultiple": false
                  },
                  {
                    "label": "Contains",
                    "key": "like",
                    "supportMultiple": false
                  },
                  {
                    "label": "One of",
                    "key": "in",
                    "supportMultiple": true
                  }
                ]
              }
            ],
            "options": [],
            "dataType": "object",
            "availableAggregation": [
              "group_by",
              "list"
            ]
          },
          {
            "label": "Site URL",
            "key": "site_url",
            "filters": [
              {
                "label": "Site URL",
                "key": "url",
                "dataType": "text",
                "options": [],
                "conditions": [
                  {
                    "label": "Is",
                    "key": "is",
                    "supportMultiple": false
                  },
                  {
                    "label": "Contains",
                    "key": "like",
                    "supportMultiple": false
                  },
                  {
                    "label": "One of",
                    "key": "in",
                    "supportMultiple": true
                  }
                ]
              }
            ],
            "options": [],
            "dataType": "object",
            "availableAggregation": [
              "group_by",
              "list"
            ]
          },
          {
            "label": "Channel",
            "key": "channel",
            "options": [
              {
                "label": "Chat",
                "value": "chat"
              },
              {
                "label": "VoIP",
                "value": "voip"
              },
              {
                "label": "SMS",
                "value": "sms"
              },
              {
                "label": "Mail",
                "value": "mail"
              },
              {
                "label": "Private Form",
                "value": "private-form"
              }
            ],
            "filters": [
              {
                "label": "Channel",
                "key": "channel",
                "dataType": "text",
                "options": [
                  {
                    "label": "Chat",
                    "value": "chat"
                  },
                  {
                    "label": "VoIP",
                    "value": "voip"
                  },
                  {
                    "label": "SMS",
                    "value": "sms"
                  },
                  {
                    "label": "Mail",
                    "value": "mail"
                  },
                  {
                    "label": "Private Form",
                    "value": "private-form"
                  }
                ],
                "conditions": [
                  {
                    "label": "One of",
                    "key": "in",
                    "supportMultiple": true
                  }
                ]
              }
            ],
            "dataType": "text",
            "availableAggregation": [
              "group_by",
              "list"
            ]
          },
          {
            "label": "Status",
            "key": "status",
            "options": [
              {
                "label": "Pending",
                "value": "pending"
              },
              {
                "label": "Active",
                "value": "active"
              },
              {
                "label": "Closed",
                "value": "closed"
              }
            ],
            "filters": [
              {
                "label": "Status",
                "key": "status",
                "dataType": "text",
                "options": [
                  {
                    "label": "Pending",
                    "value": "pending"
                  },
                  {
                    "label": "Active",
                    "value": "active"
                  },
                  {
                    "label": "Closed",
                    "value": "closed"
                  }
                ],
                "conditions": [
                  {
                    "label": "One of",
                    "key": "in",
                    "supportMultiple": true
                  }
                ]
              }
            ],
            "dataType": "text",
            "availableAggregation": [
              "group_by",
              "list"
            ]
          },
          {
            "label": "Reopened",
            "key": "parent_id",
            "options": [
              {
                "label": "Yes",
                "value": "is"
              },
              {
                "label": "No",
                "value": "no"
              }
            ],
            "filters": [
              {
                "label": "Reopened",
                "key": "parent_id",
                "dataType": "text",
                "options": [
                  {
                    "label": "Yes",
                    "value": "is"
                  },
                  {
                    "label": "No",
                    "value": "no"
                  }
                ],
                "conditions": [
                  {
                    "label": "Is",
                    "key": "is",
                    "supportMultiple": false
                  }
                ]
              }
            ],
            "dataType": "text",
            "availableAggregation": [
              "group_by",
              "list"
            ]
          },
          {
            "label": "Case Created Date and time",
            "key": "date_created",
            "options": [],
            "filters": [
              {
                "label": "Case Created Date and time",
                "key": "date_created",
                "dataType": "datetime",
                "options": [],
                "conditions": [
                  {
                    "label": "Equals",
                    "key": "between",
                    "supportMultiple": true
                  }
                ]
              }
            ],
            "dataType": "datetime",
            "availableAggregation": [
              "group_by",
              "list"
            ]
          },
          {
            "label": "Case Last Updated Date and time",
            "key": "date_updated",
            "options": [],
            "filters": [
              {
                "label": "Case Last Updated Date and time",
                "key": "date_updated",
                "dataType": "datetime",
                "options": [],
                "conditions": [
                  {
                    "label": "Equals",
                    "key": "between",
                    "supportMultiple": true
                  }
                ]
              }
            ],
            "dataType": "datetime",
            "availableAggregation": [
              "group_by",
              "list"
            ]
          },
          {
            "label": "Case Pending Date and time",
            "key": "date_pending",
            "options": [],
            "filters": [
              {
                "label": "Case Pending Date and time",
                "key": "date_pending",
                "dataType": "datetime",
                "options": [],
                "conditions": [
                  {
                    "label": "Equals",
                    "key": "between",
                    "supportMultiple": true
                  }
                ]
              }
            ],
            "dataType": "datetime",
            "availableAggregation": [
              "group_by",
              "list"
            ]
          },
          {
            "label": "Waiting time for case",
            "key": "wait_time",
            "options": [],
            "filters": [
              {
                "label": "Waiting time for case",
                "key": "wait_time",
                "dataType": "number",
                "options": [],
                "conditions": [
                  {
                    "label": "Between",
                    "key": "between",
                    "supportMultiple": true
                  },
                  {
                    "label": "More Than",
                    "key": "greater_than",
                    "supportMultiple": false
                  },
                  {
                    "label": "Less Than",
                    "key": "less_than",
                    "supportMultiple": false
                  }
                ]
              }
            ],
            "dataType": "number",
            "customUi": {
              "duration": true
            },
            "availableAggregation": [
              "sum",
              "list"
            ]
          },
          {
            "label": "Case Active Date and time",
            "key": "date_active",
            "options": [],
            "filters": [
              {
                "label": "Case Active Date and time",
                "key": "date_active",
                "dataType": "datetime",
                "options": [],
                "conditions": [
                  {
                    "label": "Equals",
                    "key": "between",
                    "supportMultiple": true
                  }
                ]
              }
            ],
            "dataType": "datetime",
            "availableAggregation": [
              "group_by",
              "list"
            ]
          },
          {
            "label": "Case Closed Date and time",
            "key": "date_closed",
            "options": [],
            "filters": [
              {
                "label": "Case Closed Date and time",
                "key": "date_closed",
                "dataType": "datetime",
                "options": [],
                "conditions": [
                  {
                    "label": "Equals",
                    "key": "between",
                    "supportMultiple": true
                  }
                ]
              }
            ],
            "dataType": "datetime",
            "availableAggregation": [
              "group_by",
              "list"
            ]
          },
          {
            "label": "Duration of Case",
            "key": "duration",
            "options": [],
            "filters": [
              {
                "label": "Duration of Case",
                "key": "duration",
                "dataType": "number",
                "options": [],
                "conditions": [
                  {
                    "label": "Between",
                    "key": "between",
                    "supportMultiple": true