# Kết quả chiến dịch

<figure><img src="https://2193274687-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fw9FEMPuWidjTVayVtnJj%2Fuploads%2FHHTQy1Uku2vKQVbOus0h%2FPOSTMAN_KetquaChiendich.png?alt=media&#x26;token=36a25ef0-439e-4ca6-8f5f-f491d9ba86b7" alt=""><figcaption></figcaption></figure>

## Kết quả chiến dịch

<mark style="color:blue;">`GET`</mark> `{{domain}}/api/v1/campaigns/results`

#### Query Parameters

| Name                                           | Type               | Description                                   |
| ---------------------------------------------- | ------------------ | --------------------------------------------- |
| start\_time                                    | DateTime (ISO8601) | Thời gian tạo từ ngày (yyyy-MM-ddTHH:mm:ssZ)  |
| end\_time                                      | DateTime (ISO8601) | Thời gian tạo tới ngày (yyyy-MM-ddTHH:mm:ssZ) |
| campaign\_id<mark style="color:red;">\*</mark> | Int                | ID chiến dịch                                 |
| manual\_message\_id                            | Int                | ID tin nhắn thủ công                          |
| auto\_message\_id                              | Int                | ID tin nhắn tự độngn                          |
| script\_id<mark style="color:red;">\*</mark>   | Int                | ID kịch bản                                   |

{% tabs %}
{% tab title="200: OK Kết quả thành công" %}
{% tabs %}
{% tab title="Kết quả tiêu biểu" %}

```json
{
    "code": "OK",
    "numFound": 2,
    "data": [
        {
            "ticket_id": 384879220,
            "ticket_no": 7299,
            "ticket_priority": "Normal",
            "ticket_source": "Api",
            "ticket_status": "pending",
            "ticket_subject": "Khách hủy đơn mua iphone #200939",
            "created_at": "2023-04-12 14:08:48",
            ....
            "custom_field": [               
              {
                    "id": 6783,
                    "lable": "Cuộc gọi nhỡ",
                    "type": "Text",
                    "value": null
                }
                ...
            ],
            "assignee": {
                "id": 124734559,
                "username": "Sale agent 1",
                "email": "nng****.com",
                "phone_no": "09875****",
                "agent_id": "50002",
                "role_id": 1,
                "group_id": 13067,
                "group_name": "test 123"
            },
            "requester": {
                "id": 164882867,
                "username": "Khach Hang Nguyen Van Nam",
                "email": null,
                "email2": null,
                "phone_no": "08122***",
                "phone_no2": null,
                "phone_no3": null,
                "organization_id": null,
                "custom_field": [
                    {
                        "id": 6840,
                        "lable": "Phân loại khách hàng",
                        "type": "Single drop-down list",
                        "value": null
                    }
                    ...                    
                ]
            },
            "campaign_result": [
                {
                    "id": 23452,
                    "lable": "Bạn có thực sự đặt hàng",
                    "type": "Single drop-down list",
                    "value": "52336"
                },
                {
                    "id": 23453,
                    "lable": "Tại sao bạn hủy đơn",
                    "type": "Text",
                    "value": "Do dat loi"
                },
                {
                    "id": 23454,
                    "lable": "Cảm ơn bạn nhiều",
                    "type": "Text",
                    "value": "Vang"
                }
            ]
        },
       ...   
           
    ]
}

```

{% endtab %}

{% tab title="Mô tả kết quả" %}
**Chi tiết phiếu ghi chiến dịch trong mảng dữ liệu kết quả.**

*Do kết quả 1 chiến dịch thường kèm theo việc nhập liệu phân loại dữ liệu  với các trường động phiếu ghi hoặc người dùng nên Object tickets trong kết quả chiến dịch sẽ đi kèm thông tin trường động của khách hàng, phiếu ghi và các thông tin cơ bản của phiếu ghi, vui lòng xem các thông tin từ các object liên quan*&#x20;
{% endtab %}
{% endtabs %}

{% endtab %}
{% endtabs %}
