How to send and display progress information from server side process in SMI application?

We have a Freshservice SMI application, the intent of which is an agent clicks a button that instigates a serverless routine that churns through a lot of processes and eventually assigns the agent to a ticket.

The processes on the server side can take some time (minutes…).

Are there any ways in which the server-side code can cause visual updates to the front end to indicate progress?

Perhaps either the UI of the SMI application receiving information to display on its interface

  • E.g. “Step 1 now in progress…”, “Step 1 completed. Starting step 2…”, “Process completed. You have been assigned ticket XYZ”

Or maybe using some other aspect of Freshservice like notifications?

The approach we’ve taken is to have the front end concoct a sufficiently unique ID (a fixed-length string of some random letters/numbers), pass that ID along with other information to the server-side code as part of the action of pressing the button.

The server-side code then uses this front-end ID as a key in $db storage to set/update progress message information as and when it’s appropriate (“Step 1 in progress…”, etc.).

The front-end code periodically calls the server-side code, passing its front-end ID, effectively asking “What’s the latest message for me?”. The server-side returns what’s available in $db.get(id) and the front-end displays appropriate message to the user.

Information stored in $db also includes a flag saying whether further messages may be expected or if this message is the final one. This information is used by the front-end to decide whether to continue calling the server-side code for updated messages.

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