Dear Support Team,
I have custom app in freshdesk. I need to catch the phone number when click on contact phone in ticket. I attach image below.
Looking forward to your reply.
Thanks & Regards.
Dear Support Team,
I have custom app in freshdesk. I need to catch the phone number when click on contact phone in ticket. I attach image below.
Looking forward to your reply.
Thanks & Regards.
Hi @Quang_Son,
Welcome to Freshworks Developer Community
Have you tried this?
Make a GET request to /api/v2/tickets/[id]?include=requester
? As per docs, it will return the response with requester’s email, id, mobile, name, and phone.
Hi @Saif
I need to catch click event API on the contact phone, example: client.events.on(“ticket.replyClick”, eventCallback). Then in the function eventCallback, I will use GET request to /api/v2/tickets/[id]?include=requester
to get phone number
Looking forward to your reply.
Thanks & Regards.
You can can make a request under eventCallback
function eventCallback(){
// Request to the above end point.
// Parse the response JSON and capture the phone number.
// Do the business logic that'd be needed.
}
client.events.on("ticket.replyClick",eventCallback);
Hi @Saif,
But I need to trigger click contact phone not trigger replyClick. How can do that
Thanks & Regards.
Oh. Let me try to understand your question more clearly.
When ever user clicks on the phone number that is on the right handside inside the Freshdesk product, you want to make a phone call?
Please correct me if I am wrong.
HI @Quang_Son,
You can access the phone number in side the product using
client.events.on("cti.triggerDialer", callback);
function callback(event){
let data = event.helper.getData();
data.number; // will have number User has clicked on the page
}
We also have a sample app for you refer to. It demonstrates it via CTI app.
Let me know if that helps.
Hi @Saif,
After use triggerDialer, I get a phone number. But I don’t know where is the page I received the phone number? Contact detail or ticket detail? And if in ticket detail, could you give me the id of ticket?
Thanks & Regards.
There are couple of Data methods that you can use to get ticket details if you are Ticket Details page.
For example,
client.data.get("ticket", function ticketinfo(payload){
payload; // payload will have property name of "id"
})
Hi @Saif,
I doing like your snippet code but the response return error.
I attach image below:
Thanks & Regards.
Please allow me some time to find the alternative way to capture Ticket ID.
Hi @Quang_Son,
I found out that Freshdesk doesn’t provide the Ticket Details context to CTI app currently. I will consider this as a feature request and pass it on to Freshdesk team. Unfortunately, there are no workarounds for this as well.
This topic was automatically closed after 5 days. New replies are no longer allowed.