Conversation reply not refreshing ui

Hi,

We made an app that needs to post some data into tickets replies on behalf the agent or the customer, thru the Freshdesk API.
The API calls work well but when the agent is in front of his Freshdesk ticket UI, he does not see the ticket reply coming in until he refresh the page. So when he is waiting for the app info, the agent needs to refresh the page continuously until he can see the message posted from the API.
Is there any trick (like changing ticket status or anything else) to make the ticket page auto-refresh for the agent once a new reply is added to the ticket?

Thanks for reading

Hello @JBA ,
If I am understanding you correctly, You are using an app to trigger a ticket reply on behalf of the agent. If this reply is related to the currently open ticket by the agent. You can make use of Interface Methods to send a reply to the Customer instead of using the Rest API for your use case. It will reflect without any page refresh. Here is a snippet example

client.interface.trigger("click", {id: "reply", text: "Text to be inserted"})
.then(function(data) {
// data - success message
}).catch(function(error) {
// error - error object
});

Hope this helps :slight_smile:

(post deleted by author)

Hi @Kunal_Singh thanks a lot for this input.

I went to the Interface Methods doc but there is no method to post directly something into the conversation, is there?
So do I understand correctly if I say that your workaround is like hitting programatically the send button in the UI in order to make it post something for us? If so, do you confirm it can be done from the app iframe?

That could do the job for one way from Agent to end-user, but for the other way: end-users posting something from our app to the Agent, we will still need to post it thru the API, and do you confirm that the agent’s Freshdesk UI won’t reflect the new posting until the user refreshes the page?


I have another question not much related to this: in new tickets or new email pages, is there any way to get the app informed when the agent enters a recipient email into the “to” field? Our app needs to get the customer’s email before beeing able to be usable for the agent, and so for we miss that information when our app is loaded in the ticket or email creation pages…

Thanks for your support !

Hi @JBA
Shouldn’t you be able to use “Insert Text in Editor window”?

“The method inserts text and attachments in an already open conversation editor window. It works for notes, replies, and forwards. The method should be used for apps in the “ticket_conversation_editor” location as it requires the editor window to be already open.”

Hi @Flow sure, thanks for that tip. Indeed that is useful when dealing with agent side, but when we need to post something from the customer side we have no other choice than posting it into the conversation via the Rest API, and the agent does not see this message coming in - unless he refresh the browser tab, see what I mean?

Hell @JBA,

So do I understand correctly if I say that your workaround is like hitting programatically the send button in the UI in order to make it post something for us? If so, do you confirm it can be done from the app iframe?

There is no Interface Method to post a reply directly as of now. What is possible currently is to insert the reply text and the agent has to manually send the reply. So it can not be done using the app ie the iframe as per what I could find.

That could do the job for one way from Agent to end-user, but for the other way: end-users posting something from our app to the Agent, we will still need to post it thru the API, and do you confirm that the agent’s Freshdesk UI won’t reflect the new posting until the user refreshes the page?

I think for the other way round(user to agent), APIS would be the only option. Regarding page refresh, Yes it is necessary to refresh the page to see the replies in the ticket thread from either side via API.

I have another question not much related to this: in new tickets or new email pages, is there any way to get the app informed when the agent enters a recipient email into the “to” field? Our app needs to get the customer’s email before beeing able to be usable for the agent, and so for we miss that information when our app is loaded in the ticket or email creation pages…

I could not find any such option in Event Methods for New Ticket Page, the availabe options are as follows.

EVENT TRIGGER
ticket.priorityChanged When a user changes the priority of a ticket.
ticket.statusChanged When a user changes the status of a ticket.
ticket.groupChanged When a user changes the group to which a ticket is assigned.
ticket.agentChanged When a user changes the agent to whom a ticket is assigned.
ticket.typeChanged When a user changes the type of a ticket.

Hope this answers your question.

Thank you @Kunal_Singh and @Flow for your replies.
Now I know I don’t miss any obvious feature, so we will work with this and do our best to make it work. Thanks a lot for your help!
JB

2 Likes

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