🖨️Webhook

Veja abaixo a estrutura das mensagens disparadas via webhook

Eventos de mensagens

{
    "eventType": "MESSAGE_SENT",
    "date": "2022-12-20T19:23:45.148848Z",
    "content": {
        "id": "fdf40c19-dba8-4048-a47b-f3cacd62810b",
        "senderId": "396c7f68-0299-43c4-aadc-b35cb9be575a",
        "createdAt": "2022-12-20T19:23:41.5780571Z",
        "updatedAt": "2022-12-20T19:23:41.5780576Z",
        "type": "TEXT",
        "active": true,
        "sessionId": "285bc0ce-aa6f-4a86-a2cb-a76a326b50a6",
        "templateId": null,
        "userId": "81bd412d-0a0d-4c2f-aaee-a635ca7907b9",
        "timestamp": "2022-12-20T19:23:41.5799641Z",
        "text": "ConteudoMensagem",
        "direction": "TO_HUB",
        "status": "QUEUED",
        "origin": "DEFAULT",
        "readContactAt": null,
        "fileId": null,
        "refId": null,
        "waitingOptIn": false,
        "details": {
             "file": { "id": "", "publicUrl": "" },
             "location": null,
             "contact": null,
             "errors": null,
         },

    }
}

Eventos de atendimento

{
    "eventType": "SESSION_UPDATE",
    "date": "2022-12-20T19:23:47.7502572Z",
    "content": {
        "id": "285bc0ce-aa6f-4a86-a2cb-a76a326b50a6",
        "createdAt": "2022-12-20T17:38:25.207023Z",
        "updatedAt": "2022-12-20T19:23:47.6729415Z",
        "active": true,
        "startAt": "2022-12-20T17:38:25.207023Z",
        "endAt": null,
        "firstUserInteractionAt": "2022-12-20T17:50:14.962658Z",
        "firstAgentMessageAt": "2022-12-20T17:50:19.214031Z",
        "status": "IN_PROGRESS",
        "contactId": "95028bce-cc14-43a3-b5b3-64647c9a2964",
        "contactDetails": {
            "id": "95028bce-cc14-43a3-b5b3-64647c9a2964",
            "name": "",
            "pictureUrl": null,
            "phonenumber": null,
            "instagram": null,
            "tagsId": []
        },
        "channelId": "6a8d3ca0-0492-419f-ba0e-fa1caf015878",
        "channelType": "DIALOG360_WHATSAPP",
        "companyId": "626fb5de-0cc2-4209-b456-47b454ee6e14",
        "departmentId": null,
        "departmentDetails": null,
        "userId": "81bd412d-0a0d-4c2f-aaee-a635ca7907b9",
        "botId": "f4344234-9020-4d13-9c84-0ae4ca5a211f",
        "agentDetails": {
            "id": "81bd412d-0a0d-4c2f-aaee-a635ca7907b9",
            "userId": "81bd412d-0a0d-4c2f-aaee-a635ca7907b9",
            "name": "Admin",
            "shortName": "Admin",
            "phoneNumber": "+55|1199999999999",
            "email": "****@helena.app",
            "pictureFileId": null,
            "pictureUrl": null
        },
        "previousSessionId": "6adf6ee0-9084-446f-8c81-48a58771a5b4",
        "readTimestamp": "2022-12-20T19:23:41.578057Z",
        "expired": false,
        "waitReply": false,
        "lastInteractionDate": "2022-12-20T19:23:41.578057Z",
        "lastMessageOut": "2022-12-20T19:23:41.578057Z",
        "lastMessageIn": "2022-12-20T18:38:49.189811Z",
        "lastMessageText": "conteudo mensagem",
        "unreadCount": 0,
        "previewUrl": "https://web.helena.run/redirect?type=SESSION&id=[0]"
    }
}

Eventos de contato

{
    "eventType": "CONTACT_UPDATE",
    "date": "2022-12-23T11:51:12.1292792Z",
    "content": {
        "id": "22220d2b-b04c-44be-bd84-2bb89a269efa",
        "createdAt": "2022-12-22T18:27:28.688865Z",
        "updatedAt": "2022-12-23T11:51:07.5570324Z",
        "companyId": "626fb5de-0cc2-4209-b456-47b454ee6e14",
        "name": "Teste 1",
        "nameWhatsapp": null,
        "nameInstagram": null,
        "nameMessenger": null,
        "phonenumber": "+55|1111111111",
        "phonenumberFormatted": "(11) 1111-1111",
        "email": null,
        "instagram": null,
        "messengerId": null,
        "pictureFileId": null,
        "pictureUrl": null,
        "active": true,
        "annotation": "",
        "tagsId": null,
        "status": "ARCHIVED",
        "origin": "CREATED_BY_USER",
        "customFieldValues": {
            "Idade": "12",
            "Animal": "Gato,Cão"
        }
    }
}

Last updated