Recent searches


No recent searches

Getting current user/agent ID



Posted Jan 24, 2022

Hello, I'm quite new to Zendesk and trying to create an CTI app using ZAF.

My scenario is : Agent logs in to system and receives an incoming call from existing customer. My app will create a ticket with some information like below

let ticketData = {
"ticket": {
"via_id": via_id,
"subject": "New Ticket",
"requester_id": customer.id,
"description": description,
"assignee_id": 361330614516,
}
}

With requester_id I can easily find out by searching the phone number. But I'm struggling to get the get the id of current logged in user/agent so I can fulfill the assignee_id field in here.

Thanks 


0

3

3 comments

image avatar

Eric Nelson

Zendesk Developer Advocacy

Hey Thang,

You can use the requests method to call the show self endpoint which will provide you with the necessary info. 

Hope this helps!

1


Thank you Eric, that's what I am looking for.

0


Hello All,

We accidently deleted a team member when it was supposed to be a requester. Which I do not understand how come there is no difference in the API call if it is an end user or agent?

A team member should not be called as a requester. And not having an option to restore the Soft delete is another big disadvantage. It was a human error updating the ticket fields with the assignee ID in the place of requester ID, but API deleting an Agent (Assignee ID) without having a check is so bad. Deleting an user with the email address is the easiest way, because it can be done only with the requester ID we had to add it as a custom attribute in the ticket fields, and use the CURL to manually call the API.

And not providing a check box to delete the Deleted users permanently under the People section, is so not right from the Privacy point. Without any reason the data is retained for longer period.

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post