Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Returns the survey results of the chats based on the date and/or calldata variables specified.

HTTP POST /livechat/:domain/getSurveyResultsByDateCalldata

Path Variables:

Name

Mandatory

Type

Description

domain

NO

STRING

Unique domain identifier

Authorization: see Authentication mechanisms

Request Body:

Type: JSON

Name

Mandatory

Type

Description

lt

NO

NUMBER

Epoch Unix Timestamp before (read <) which chats are searched for (based on the beginTime field)

gt

NO

NUMBER

Epoch Unix Timestamp after (read >) which chats are searched for (based on the beginTime field)

calldata

NO

OBJECT

calldata variable with which chats are searched for

Response:

Type: JSON

Name

Type

Description

result

BOOLEAN

If true, the service response was performed correctly

error

NULL / STRING

Contains the error description if an error has occurred in the request

surveyResults

ARRAY

Array of objects containing the survey results requested

Example:

Request

http://<hostname>:<port>/livechat/default/getSurveyResultsByDateCalldata

Request body

  • search by date

  {
    "lt": 1714119031667
  }
  {
    "gt": 1709039127067
  }
  {
    "lt": 1714119031667,
    "gt": 1709039127067
  }
  • search by calldata

  {
    "calldata": {
      "EC_MACROACTIVITY" : "DEFAULT_CHAT",
      "EC_CAMPAIGN" : "DEFAULT_CHAT_MKT"
    }
  }
  • search by date and calldata

  {
    "lt": 1714119031667,
    "calldata": {
      "EC_MACROACTIVITY" : "DEFAULT_CHAT",
      "EC_CAMPAIGN" : "DEFAULT_CHAT_MKT"
    }
  }
  {
    "gt": 1709039127067,
    "calldata": {
      "EC_MACROACTIVITY" : "DEFAULT_CHAT",
      "EC_CAMPAIGN" : "DEFAULT_CHAT_MKT"
    }
  }
  {
    "lt": 1714119031667,
    "gt": 1709039127067,
    "calldata": {
      "EC_MACROACTIVITY" : "DEFAULT_CHAT",
      "EC_CAMPAIGN" : "DEFAULT_CHAT_MKT"
    }
  }

Response

{
    "result": true,
    "surveyResults": [
        {
            "id": "survey-web-star",
            "title": {
                "it-it": "Survey",
                "en-gb": "Survey"
            },
            "dc_mode": "survey_chat",
            "datacollection": [
                {
                    "dc_type": "rating_star",
                    "label": "Dai un voto alla conversazione avvenuta!",
                    "isMandatory": false,
                    "isVisibleAgent": false,
                    "isVisibleCustomer": true,
                    "isEditable": true,
                    "custom_regexp": "",
                    "customMandatoryErrorMessage": "",
                    "customValidationErrorMessage": "",
                    "value": "3",
                    "name": "survey_chat",
                    "mode": "manual",
                    "min": 0,
                    "max": 5,
                    "step": 1
                }
            ],
            "contactInfo": {
                "chatID": "CHAT_DEFAULT_510fd551-94ee-49fb-93f9-20ce013003b0",
                "servid": "LiveChat_Popup",
                "widgetid": "classic_popup",
                "beginTime": 1714118317897,
                "endTime": 1714118338964
            }
        },
        {
            "id": "survey-web-star",
            "title": {
                "it-it": "Survey",
                "en-gb": "Survey"
            },
            "dc_mode": "survey_chat",
            "datacollection": [
                {
                    "dc_type": "rating_star",
                    "label": "Dai un voto alla conversazione avvenuta!",
                    "isMandatory": false,
                    "isVisibleAgent": false,
                    "isVisibleCustomer": true,
                    "isEditable": true,
                    "custom_regexp": "",
                    "customMandatoryErrorMessage": "",
                    "customValidationErrorMessage": "",
                    "value": "4",
                    "name": "survey_chat",
                    "mode": "manual",
                    "min": 0,
                    "max": 5,
                    "step": 1
                }
            ],
            "contactInfo": {
                "chatID": "CHAT_DEFAULT_fc8a0cde-2155-4a8e-8ef4-8e71ca76c43e",
                "servid": "LiveChat_Popup",
                "widgetid": "classic_popup",
                "beginTime": 1712149307715,
                "endTime": 1712149338859
            }
        }
    ],
    "error": null
}

Aggiungi etichetta

  • No labels