Hi! I’m trying to speed up response time in my apps. For instance, I use PayHere for payments… and a successful payment updates the row in GS that the user is in. However there is a latency of 15+ seconds for glide to update the device
I was wondering if there was experimental code that would process a webhook and deliver a value to the glide ux faster.
I’m happy for the full data to arrive late, but I could use this ‘visibility’ webhook to find out in seconds if an action has taken place, then use this on the device to change the screen.
No. The webhook from PH to the GS takes 2-3 seconds max. It is glide taking forever to recognize the change in a row in GS and pushing that change to the user’s device. That is 15 seconds, being generous, and can take 45 seconds.
why is that? i do change quantity… just don’ base it on logic columns… and if you have to … then use set columns to set stable values when going to checkout, create user attached non user specific column to write calculated values to, when calculating price… like simple trick … button to confirm price… or go to secure check out… with action to set columns… but when your main source is GS you dont need any of the tricks… just adjust values there… glide will show change immediately if is simple action like increment or add value… or if more complicated calculation have a recalculated button to write
I agree. This type of scenario remains a frustration.
In a totally different use case we use Glide to embed a Calendly link for bookings. When the booking is made, Calendly fires a webhook instantly which we catch in Integromat, again pretty much instantly. Then we use Integromat to update the Google Sheet which is where the delay kicks in. Often this can be 20 seconds which is sufficient for a user to become confused.
I believe that an integration between Glide and Integromat is underway and, if so, this may include the ability for Integromat to access a Glide Sheet for both reading and (important in this case) writing. That would mean Integromat acting as a “catcher” for 3rd party webhooks in order to “reflect” the details back into a Glide Sheet, hopefully with much faster update time.
We have discussed this feature/solution before, when API column was released we thought we had the final solution to retrieve data fired by a Webhook (via Integromat or IFTTT) but there are still details to fix like how to handle the received data if it has many parameters, how to put it into Glide columns and don’t suffer a headache everyday
Anyway, API column is in development and we can’t use it.
But I think Yes-Code column can be used and useful for you. Of course, you aren’t going to create a Webhook, you will need to make an API call that PayHere supports by using a cURL command
You can’t listen to a webhook in a Code column because it runs on the user’s device. What you can do, however is implement a backend somewhere that listens, and that you can call into to wait for the result of the webhook. The flow would more or less be:
You generate a UUID or something to identify the transaction and save it in column A.
Column B is a code column that takes A as its argument, and all it does is call into your backend, passing A to it.
The backend, when it gets a call from the Code column, initiates the transaction, using A as an ID for it, and listens for the webhook.
It only responds back to the Code column when the webhook with A as the ID has arrived.
It doesn’t actually matter whether the transaction is initiated by the app or the backend, as long as the ID is consistent. If the app initiates the transaction, then the backend might get the webhook before it has gotten with the call from the Code column with that ID, so it’ll have to save those results.
I haven’t tried any of this, of course. Good luck!