Integrate Zuora Callouts for failed callouts
Feature Proposal
Problem to solve
Our current process relies on Zuora callouts to facilitate the exchange of information between Zuora and CustomersDot.
Zuora makes in total 3, maximum 5, source retries for a callback and then gives it up.
In the event that a callout is issued from Zuora, CustomersDot will synchronize with Zuora and save the data locally within its database (local caching). This cached data is subsequently utilized for further processing. However, if the callout is missed due to reasons such as CustomersDot not being present, server issues, or Zuora being unable to make HTTPS calls, the system will not be able to capture what occurred during that phase. This can potentially lead to gaps in data synchronization and impact subsequent processes reliant on this information.
Proposal
The proposal is to integrate a cron service running every 1 hour to check for subscription update/create callbacks only that happened in the last 1 hour with the failedOnly
set as true.
https://developer.zuora.com/api-references/api/operation/GET_CalloutHistory/
The same GET API is used by the ZSim application. When a callout that is missed is encountered, the service to fetch the data would be called.
There would be no simulation of calling the callout again as ZSim application is doing.
In the first phase, the idea is to make the local data consistent with the Zuora database. We are trying to add reliability as part of this issue. In the future, we can work on making callouts happen in case they fail, and then we can get away with the ZSim application and use it for local development.
Further details
- We would be using a feature flag
listen_to_zuora_callouts
. If errors are encountered we can turn off the flag. - We would also add logs to make aware on how many of the failed callouts we have.