Incorrect user_id in contact_center.engagement_user_ended event

Tried to open a ticket for this, but it was closed and asked to post here.

  • Event: contact_center.engagement_user_ended
  • Call flow:
    -Call into queue
    -User ID X_0QldcGQ3m3Jd-gNuJryQ answers the call.
    -After some time this agent direct conferences in another user with ID p82BQ7rfQfaVfe5kTb29dw
    -After some time the first user (X_0QldcGQ3m3Jd-gNuJryQ) leaves the call and assigns the engagement to user p82BQ7rfQfaVfe5kTb29dw (which is the only option for the first user to leave the call).
  • Issue: The problem is that the contact_center.user_engagement_ended event comes with the user id for the second user event though it was the first user that initiated the “leave the call” action. This is causing issues in our application we’re building since the call for user p82BQ7rfQfaVfe5kTb29dw is ended as we process the user ended event for that agent.
  • Expectation: The contact_center.engagement_user_ended’s user_id should be the user that dropped off the call, not the assigned user.
  • Full event for reference (Replaced some values with dummy data):

    {“module”:“message”,“content”:“{"event":"contact_center.engagement_user_ended","payload":{"account_id":"Zs106GT5QmOt-cOYbbBhhQ","object":{"engagement_id":"0J6NynGXTlONN1QepQtrdA","engagement_direction":"inbound","flow_id":"yygZW1FERm2LCUVgyPYulw","flow_name":"DEV Alejandro INB-OUTB","flow_number":"+18602541020","queue_id":"ZWQ8FC8CB99DAC21267D560C8FB790393ED","queue_name":"DEV Alejandro","channel_id":"7330484030014737044","channel":"voice","user_id":"p82BQ7rfQfaVfe5kTb29dw","user_display_name":"Client","consumer_number":"+18605431691","date_time":"2024-02-01T04:23:40Z","channel_type":"voice"}},"event_ts":1706761420713}”,“header”:{“Authorization”:“TJNtrFMiSKSgia-K-I6cXg”,“clientId”:“eHqSJGyySEdMk3Zjdhg”,“x-zm-trackingid”:“7330484030014737044”,“x-zm-signature”:“v0\u003d9c3f427d79511d204945a3fbba5da48833e974cf596ee6069254fad2eca118e1”,“x-zm-request-timestamp”:“1706761420”}}

I made some tests today and I don’t see the issue happening with the user_ended event anymore, but instead it’s now happening with the user_answered when user B answers the conference call started by user A.

{
“module”: “message”,
“content”: “{"event":"contact_center.task_reservation_created","payload":{"account_id":"Zs106GT5QmOt-cOYbbBhhQ","object":{"task_id":"ZWTF501C6EC774045D383536D50C79AE3B3","flow_id":"yygZW1FERm2LCUVgyPYulw","flow_name":"DEV Alejandro INB-OUTB","channel_id":"ZTC0ACCF514A95CC6E3093CA0836093E069","channel_name":"voice","queue_id":"ZWQ505C9065B45D927745AE107C805642B1","queue_name":"DEV Alejandro","created_time":"2024-02-15T18:45:18Z","last_modified_time":"2024-02-15T18:45:18Z","engagement_id":"yC_scdxdTGCe_okqV_jqWw","auto_assign":true,"task_timeout":86400,"caller_number":"+18602541020","callee_number":"+18602541020","task_reservation_id":"ZWR48F1A81A764D2B289F282D881258A22D","assigned_user_id":"p82BQ7rfQfaVfe5kTb29dw","channel":"voice"}},"event_ts":1708022719010}”,
“header”: {
“Authorization”: “TJNtrFMiSKSgia-K-I6cXg”,
“clientId”: “eHqSJGyySEdMk3Zjdhg”,
“x-zm-trackingid”: “ccizp_oni4D-ZjRdS9wsC1ZBASSw”,
“x-zm-signature”: “v0\u003d403815e99f5879f6da8499fe392ab04d0fbf34b756a07384102657a143831f32”,
“x-zm-request-timestamp”: “1708022719”
}
}

The second user has been added to a blind conference and he answered, why is the user_answered_event coming with the first user’s user_id and not the new one (p82BQ7rfQfaVfe5kTb29dw)?

{
“module”: “message”,
“content”: “{"event":"contact_center.engagement_user_answered","payload":{"account_id":"Zs106GT5QmOt-cOYbbBhhQ","object":{"engagement_id":"yC_scdxdTGCe_okqV_jqWw","engagement_direction":"inbound","flow_id":"yygZW1FERm2LCUVgyPYulw","flow_name":"DEV Alejandro INB-OUTB","flow_number":"+18602541020","queue_id":"ZWQ8FC8CB99DAC21267D560C8FB790393ED","queue_name":"DEV Alejandro","channel_id":"7335901585798903648","channel":"voice","user_id":"X_0QldcGQ3m3Jd-gNuJryQ","user_display_name":"Client","consumer_number":"+18605431691","date_time":"2024-02-15T18:45:30Z","channel_type":"voice"}},"event_ts":1708022730144}”,
“header”: {
“Authorization”: “TJNtrFMiSKSgia-K-I6cXg”,
“clientId”: “eHqSJGyySEdMk3Zjdhg”,
“x-zm-trackingid”: “ccizp_YApjkVgDSKasumTgb8B2bw”,
“x-zm-signature”: “v0\u003dde3139d0e233e294fc64d1ebe805c23397fc549181c9adad5b4e9f361a130c5d”,
“x-zm-request-timestamp”: “1708022730”
}
}