Synchronising database from Rest API to Local DB best practice

Hi all,

I’m been building a database for our company that helps manage our subscriptions and talks to some remote hardware. I’m deploying via a XojoCloud app but I don’t think that matters for this question.

As part of the work, I need to synchronise several thousand contacts with one our other systems (Zendesk).
Currently I’m connecting to Zendesk via their REST API and reading all the contacts, comparing them against what I have in my local (xojocloud) database and if something is new, adding it. I do have to think about removing contacts too, so maybe I’ll just replace my local database…

The issue I have is that it can take around a minute or so to synchronise all contacts and sometimes this needs to happen a dozen times a day or so. I’m wondering what best practice is for this? Should I have another web service running to do this every 15mins or so or is there a better way?

Thanks all!

Does Zendesk have a date added for the contacts? Then you could only check for the newest contacts.

Another option would be to use webhooks. Then you could get the new contacts automatically.

1 Like

Great point. I’ll have a look at webhooks. I’ve not used them before.

This might be a good place to start.