Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
{
    "ChatEvent": {
        "Id": 608,
        "Type": "message_created",
        "ChatId": 21,
        "MessageId": 300,
        "Actor": "user",
        "ClientId": null,
        "UserId": 1,
        "CreatedAt": 1542902705511,
        "Transitive": false
    },
    "Rels": {
        "Channels": [
            {
                "Id": 1,
                "ProjectId": 1,
                "Type": "iqchat",
                "Name": "support",
                "Title": "Внутренний чат",
                "Description": "Виджет и мобильные приложения.",
                "Deleted": false,
                "TotalClients": 0,
                "TotalTickets": 51,
                "TotalOpenTickets": 2,
                "CreatedAt": 1508308179222,
                "UpdatedAt": 1539160130126,
                "IQChat": {
                    "ChannelId": 1,
                    "Deleted": false,
                    "CreatedAt": 1508308179225,
                    "UpdatedAt": 1523604582471,
                    "DeletedAt": null,
                    "RestoredAt": null,
                    "APNS": null
                }
            }
        ],
        "Chats": [
            {
                "Id": 21,
                "ProjectId": 1,
                "ClientId": 21,
                "ChannelId": 1,
                "TicketId": 84,
                "EventId": null,
                "ClientUnread": 1,
                "CreatedAt": 1523012241583,
                "ChangedAt": 1542902705514
            }
        ],
        "ChatMessages": [
            {
                "Id": 300,
                "ChatId": 21,
                "LocalId": 1542902705465,
                "EventId": null,
                "TicketMessageId": 973,
                "Author": "user",
                "ClientId": null,
                "UserId": 1,
                "Payload": "file",
                "Text": "",
                "FileId": "6054cfb4-ee70-11e8-8b35-3fa764e1543e.json",
                "Received": false,
                "Read": false,
                "Pushed": false,
                "CreatedAt": 1542902705504,
                "ReceivedAt": null,
                "ReadAt": null,
                "My": false
            }
        ],
        "Files": [
            {
                "Id": "6054cfb4-ee70-11e8-8b35-3fa764e1543e.json",
                "Type": "file",
                "Owner": "client",
                "OwnerClientId": 21,
                "ClientId": null,
                "UserId": 1,
                "Name": "example-request.json",
                "Path": "clients/21/21/6054cfb4-ee70-11e8-8b35-3fa764e1543e.json",
                "Size": 2493,
                "ImageWidth": null,
                "ImageHeight": null,
                "ContentType": "application/json",
                "CreatedAt": 1542902705480
            }
        ],
        "Projects": [
            {
                "Id": 1,
                "Name": "Физические лица",
                "Slug": "",
                "Description": "Техническая поддержка",
                "State": "active",
                "TotalTickets": 85,
                "TotalOpenTickets": 5,
                "CreatedAt": 1508308155539,
                "UpdatedAt": 1539181095764,
                "ArchivedAt": null,
                "DeletedAt": null,
                "RestoredAt": null,
                "Permissions": null
            }
        ],
        "Users": [
            {
                "Id": 1,
                "Name": "Иван Коробков",
                "Email": "i.korobkov@iqstore.ru",
                "Position": "Технический директор",
                "RoleId": 1,
                "AvatarId": "baac46c4-c475-11e7-999e-fb4e907475d9.jpg",
                "Online": true,
                "Active": true,
                "Deleted": false,
                "TotalAssignedTickets": 5,
                "CreatedAt": 1508308102244,
                "UpdatedAt": 1542902699384,
                "LastSeenAt": 1542902699384,
                "AssignedAt": 1542901263283,
                "DisplayName": "Иван Коробков"
            }
        ]
    }
}


Оператор закрыл обращение

Code Block
{
    "ChatEvent": {
        "Id": 4622,
        "Type": "chat_closed",
        "ChatId": 13,
        "MessageId": null,
        "Actor": "user",
        "ClientId": 13,
        "UserId": 1,
        "CreatedAt": 1632751088427,
        "Transitive": false
    },
    "Rels": {
        "Channels": [
            {
                "Id": 1,
                "ProjectId": 1,
                "Type": "iqchat",
                "Name": "support",
                "Title": "Внутренний чат",
                "Description": "Виджет и мобильные приложения.",
                "Deleted": false,
                "TotalClients": 0,
                "TotalTickets": 292,
                "TotalOpenTickets": 6,
                "CreatedAt": 1508308179222,
                "UpdatedAt": 1632751088429,
                "IQChat": {
                    "ChannelId": 1,
                    "Deleted": false,
                    "CreatedAt": 1508308179225,
                    "UpdatedAt": 1523604582471,
                    "DeletedAt": null,
                    "RestoredAt": null,
                    "APNS": null
                }
            }
        ],
        "Chats": [
            {
                "Id": 13,
                "ProjectId": 1,
                "ClientId": 13,
                "ChannelId": 1,
                "TicketId": 403,
                "EventId": null,
                "ClientUnread": 2,
                "CreatedAt": 1517261861843,
                "ChangedAt": 1632751088394
            }
        ],
        "Clients": [
            {
                "Id": 13,
                "ProjectId": 1,
                "ParentId": null,
                "Type": "crm",
                "Name": "Альфред Хичкок",
                "ShortName": "",
                "Online": false,
                "CRMId": 1,
                "CRMClientId": "4",
                "ChannelId": null,
                "TelegramId": null,
                "FacebookId": null,
                "InfobipId": null,
                "VKId": null,
                "TotalTickets": 21,
                "TotalOpenTickets": 0,
                "CreatedAt": 1517261861752,
                "UpdatedAt": 1632751088426,
                "SeenAt": 1632321444520,
                "MessagedAt": null,
                "Details": {
                    "ClientId": 13,
                    "CRMURL": "http://ya.ru/",
                    "FirstName": "Альфред",
                    "MiddleName": "",
                    "LastName": "Хичкок",
                    "Sex": "мужской",
                    "Birthday": "13.08.1899",
                    "Cellphone": "+7 999 123-456",
                    "Email": "alfred@example.com",
                    "INN": "",
                    "ExtRef": "",
                    "CardRef": "",
                    "BranchId": "",
                    "BranchName": "",
                    "BranchExtRef": "",
                    "BranchBik": "",
                    "CreatedAt": 1517261861751,
                    "UpdatedAt": 1519115991831,
                    "Fields": []
                }
            }
        ],
        "Projects": [
            {
                "Id": 1,
                "Name": "Физические лица",
                "Slug": "asdf",
                "Description": "Техническая поддержка",
                "State": "active",
                "TotalTickets": 359,
                "TotalOpenTickets": 6,
                "TotalAssignedTickets": 6,
                "CreatedAt": 1508308155539,
                "UpdatedAt": 1632751088425,
                "ArchivedAt": null,
                "DeletedAt": null,
                "RestoredAt": null,
                "Options": null,
                "Permissions": null
            }
        ],
        "Users": [
            {
                "Id": 1,
                "Type": "user",
                "Name": "Администратор",
                "Email": "i.korobkov@iqstore.ru",
                "Login": null,
                "Position": "Технический директор",
                "Department": "",
                "RoleId": 1,
                "AvatarId": null,
                "Online": true,
                "Active": true,
                "Deleted": false,
                "TotalAssignedTickets": 6,
                "CreatedAt": 1508308102244,
                "UpdatedAt": 1632751088427,
                "LastSeenAt": 1632751081961,
                "LastActiveAt": 1632751088422,
                "LastMessageAt": 1632751088422,
                "AssignedAt": 1632750983591,
                "DisplayName": "Администратор",
                "Permissions": null
            }
        ]
    }
}