Skip to main content

Voyado Engage

API retry policy

As a user of the Voyado Engage API, you must always ensure that, after sending a request, your solution waits for the response to arrive. If a response is delayed, you should not perform a retry before you know the reason for the delay.

Note

Always wait for a response from the Engage API before trying again.

If your response is late, it is more probable that Engage is under an unusually high load and responding slowly than your message was lost along the way. Messages can be lost, of course, but it is not the most likely scenario.

According to the Voyado Engage integration principles, a contact should always be able to perform their entire purchase in the POS or ECOM, regardless of problems such as the Engage API not responding. The internet is complex and many things can go wrong or be delayed. So if your flow is time-critical, you should be prepared to handle all likely interruptions on your end, and not be entirely dependent on ideal-case response times from Engage.

Retrying

If a retry is unavoidable, here are a few things to keep in mind:

In general, a retry should be made as late as possible based on your particular scenario. Shorter retry intervals can make the problem worse, increasing the possibility of writing incorrect data, as well as the load on the system.

But it also depends on what you're doing. For example, a job started by a server or process on another system can wait increasingly long intervals between retries (10s, 30s, 60s, 300s, etc.) whereas an action invoked by a user (such as a call from POS, ECOM or the web) can get away with a shorter wait before a retry is made. But, again, wait as long as possible before retrying.

POST requests change the state of the system every time they are called. So retrying a POST request without knowing if the first one went through can be very dangerous. It's always wise, when retrying a POST, to:

  • Wait as long as your particular scenario allows

  • Check using a GET if your previous request went through or not

  • Try another POST, at increasing intervals

The basic advice is to be ready for this when it happens, and to follow the integration principles.