Can custom app script stop executing intermittently

Hello all,
We have developed an app which was used to review the agents reply to the customers by the higher level of agents. A certain role of agent can only add the private note and this note will be reviewed by the QC agent. There will be three buttons in the app ticket sidebar. They are

  1. Approve
  2. Modify and Approve
  3. Reject
    If the QC agent approve or modify & approve that conversation, the note will be sent to the customer(requester) on behalf of the agent who sent the note for approval and ticket will be reassigned to him(who sent for approval) and ticket status will be set as resolved

But certain times after approval of the note in ticket sidebar, reply went but ticket not got updated. We have done unit testing and if any error is occurred between posting reply and updating the ticket, it shows the error using interface api. Even if the ticket calls fail, we will notify the error. But the customers were reporting like they don’t see any errors. We had a help from Freshworks team who were checking api logs at that time, they said that they don’t find any log at that time.

Our question is the app can stop executing the script in any cases for ticket sidebar location? Because the modal script can be stopped while executing when the modal closes.

Note: issue is occurring randomly in a week. This app is used by them 24/7

1 Like

@Sheik, Thank for eloborating the problem you are facing well.

  1. Did you find any way to reproduce this issue? Just hoping although you mentioned it’s random.
  2. Were you able to find any browser logs, those are associated with Interface API ?

I am in process of seeking clarification regarding the script execution. I shall keep you posted on top of it.

Here’s an Update that I have,

The Ticket sidebar app’s execution stops as soon as users moves out of Ticket Page. But script will be kept running even if the app is minified in the sidebar.

cc: @Sheik

@Saif, Yes we have noticed that whenever the user moved out of Ticket page or reloading the page making the script to stop the execution. So to prevent this issue, we decided to post the data to the webhook and handle all the ticket sidebar logic inside the external event handler.

  1. Is there any limit for the webhook payload? (Sometimes payload size can be 20MB)
    2)Is there any other workaround for this issue?

As I see the documentation, the webhook should not exceed the webhook payload more than 128 KB. Let me keep you posted, if I find any workaround for this ask.

Hi @Saif,
I have two questions regarding this.

  1. I could see sometimes product events like onConversationCreate event is not getting triggered. If the webhook payload is less than 128kb, we will post the data to the webhook. Is there any possible for external event not getting triggered like product events if the agents were continuously using that portal for everyday?
  1. I will be posting the ticket conversation body to the webhook.Can ticket conversation of body size be more than 128kb? Because when I calculated the size of the large conversation body in terms of bytes, it shows me like 10 or 12 kb approx

Hi @Sheik,

  1. I will try to confirm the possibility and get back to you. But in the recent times, we haven’t see such delay with respect to the external events.
  2. If the conversations are very very long, then it happens to be more than 128 kb. It can be very rare.

Relating to this, just wanted to remind some of the points that can help you think of solution carefully,

  1. Incoming content type should be of JSON or XML type.
  2. The rate limit for receiving external events is 250 per minute.
  3. The timeout period for the app execution is 20 seconds.

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