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
You can use the requests method to call the show self endpoint which will provide you with the necessary info.
Hope this helps!