{"timestamp":"2026-03-04 21:22:05","traceId":"20260304212205-6754","step":"01.request.received","data":{"timestamp":"2026-03-04 21:22:05","method":"POST","uri":"/WS_CHATBOT/api/rodticket/webhook/cobranca","query":[],"headers":{"Content-Type":"application/json","host":"200.150.122.150","content-length":"380","Connection":"keep-alive"},"raw":"{\"type\":\"message_delivered\",\"timestamp\":\"2026-03-04T20:22:06.667Z\",\"data\":{\"messageId\":\"3EB00C29FA48AC1C1220AB\",\"key\":{\"remoteJid\":\"554497586617:92@s.whatsapp.net\",\"id\":\"3EB00C29FA48AC1C1220AB\",\"fromMe\":true},\"update\":{\"status\":3},\"ack\":3,\"companyId\":38,\"ticketId\":20918,\"contact\":{\"id\":34884,\"name\":\"554497586617\",\"number\":\"554497586617\"},\"timestamp\":\"2026-03-04T20:22:06.654Z\"}}","json":{"type":"message_delivered","timestamp":"2026-03-04T20:22:06.667Z","data":{"messageId":"3EB00C29FA48AC1C1220AB","key":{"remoteJid":"554497586617:92@s.whatsapp.net","id":"3EB00C29FA48AC1C1220AB","fromMe":true},"update":{"status":3},"ack":3,"companyId":38,"ticketId":20918,"contact":{"id":34884,"name":"554497586617","number":"554497586617"},"timestamp":"2026-03-04T20:22:06.654Z"}},"server":{"remote_addr":"31.97.83.230","user_agent":""}}}
{"timestamp":"2026-03-04 21:22:05","traceId":"20260304212205-6754","step":"02.payload.normalized","data":{"is_array_json":true,"payload_keys":["type","timestamp","data"],"data_keys":["messageId","key","update","ack","companyId","ticketId","contact","timestamp"]}}
{"timestamp":"2026-03-04 21:22:05","traceId":"20260304212205-6754","step":"03.event.mapped","data":{"rawType":"message_delivered","eventType":"message.delivered"}}
{"timestamp":"2026-03-04 21:22:05","traceId":"20260304212205-6754","step":"04.message.extracted","data":{"messageId":"3EB00C29FA48AC1C1220AB","ack":3,"direction":"outbound","remoteJid":"554497586617:92@s.whatsapp.net","phone":"55449758661792","companyId":38,"ticketId":20918}}
{"timestamp":"2026-03-04 21:22:05","traceId":"20260304212205-6754","step":"05.parsed.ready","data":{"eventType":"message.delivered","rawType":"message_delivered","direction":"outbound","phone":"55449758661792","name":"","messageId":"3EB00C29FA48AC1C1220AB","text":"","timestamp":"2026-03-04T20:22:06.667Z"}}
{"timestamp":"2026-03-04 21:22:05","traceId":"20260304212205-6754","step":"05.1.response.ack_immediate","data":{"success":true}}
{"timestamp":"2026-03-04 21:22:05","traceId":"20260304212205-6754","step":"06.model.loaded","data":{"model":"Webhook_model"}}
{"timestamp":"2026-03-04 21:22:05","traceId":"20260304212205-6754","step":"06.1.db.messageid.lookup","data":{"attempt":1,"maxAttempts":3,"waitSeconds":10,"result":{"success":true,"exists":false,"qtdPend":0,"qtdNota":0,"messageId":"3EB00C29FA48AC1C1220AB"}}}
{"timestamp":"2026-03-04 21:22:15","traceId":"20260304212205-6754","step":"06.1.db.messageid.lookup","data":{"attempt":2,"maxAttempts":3,"waitSeconds":10,"result":{"success":true,"exists":true,"qtdPend":1,"qtdNota":0,"messageId":"3EB00C29FA48AC1C1220AB"}}}
{"timestamp":"2026-03-04 21:22:15","traceId":"20260304212205-6754","step":"07.branch.message.delivered","data":{"messageId":"3EB00C29FA48AC1C1220AB","ack":3}}
{"timestamp":"2026-03-04 21:22:15","traceId":"20260304212205-6754","step":"08.db.marcarRecebidoPorMessageId","data":{"success":true,"affected":1,"messageId":"3EB00C29FA48AC1C1220AB","sqlUpdatePend":"\r\n            UPDATE dbo.PEND_NOTIFICACAO\r\n            SET RECEBIDO = 'S'\r\n            WHERE MESSAGEID = '3EB00C29FA48AC1C1220AB'\r\n        ","sqlUpdateNota":"\r\n            UPDATE dbo.NOTA_NOTIFICACAO\r\n            SET RECEBIDO = 'S'\r\n            WHERE MESSAGEID = '3EB00C29FA48AC1C1220AB'\r\n        ","details":{"pend_notificacao":{"success":true,"affected":1},"nota_notificacao":{"success":true,"affected":0}}}}
{"timestamp":"2026-03-04 21:22:15","traceId":"20260304212205-6754","step":"09.db.marcarLidoPorMessageId","data":{"success":true,"affected":1,"messageId":"3EB00C29FA48AC1C1220AB","details":{"pend_notificacao":{"success":true,"affected":1},"nota_notificacao":{"success":true,"affected":0}}}}
{"timestamp":"2026-03-04 21:22:15","traceId":"20260304212205-6754","step":"10.response.sent","data":{"success":true}}
