# Incorrect user\_id in contact\_center.engagement\_user\_ended event

**URL:** <https://devforum.zoom.us/t/incorrect-user-id-in-contact-center-engagement-user-ended-event/103105>\
**Category:** API and Webhooks\
**Tags:** api, contact\_center\
**Created:** [February 2, 2024, 8:37pm UTC](https://devforum.zoom.us/t/incorrect-user-id-in-contact-center-engagement-user-ended-event/103105 "2024-02-02T20:37:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alejandro.flores](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@alejandro.flores](https://devforum.zoom.us/u/alejandro.flores)\
**Post date:** [February 2, 2024, 8:37pm UTC](https://devforum.zoom.us/t/incorrect-user-id-in-contact-center-engagement-user-ended-event/103105/1 "2024-02-02T20:37:43Z")

</div>

_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”}}

---

<div class="post-metadata">

**Author:** ![alejandro.flores](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@alejandro.flores](https://devforum.zoom.us/u/alejandro.flores)\
**Post date:** [February 15, 2024, 6:36pm UTC](https://devforum.zoom.us/t/incorrect-user-id-in-contact-center-engagement-user-ended-event/103105/2 "2024-02-15T18:36:43Z")

</div>

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”  
> }  
> }

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [February 18, 2025, 10:13am UTC](https://devforum.zoom.us/t/incorrect-user-id-in-contact-center-engagement-user-ended-event/103105/3 "2025-02-18T10:13:33Z")

</div>

Closed on February 18, 2025, 10:13am UTC

This topic was automatically closed 368 days after the last reply. New replies are no longer allowed.
