Allow Replay of Usage Creation (Transaction)
We would like is a way to tolerate failure and the subsequent replay of the usage data when it is being created.
I would be for you to allow the passing of a unique id within each usage objects (SOAP API). If you have already processed the provided id you can ignore the most recent usage object and report that in the response object.
With this approach we can replay the submission of the same usage object when we are unsure of its success. We can do this without worrying about it being duplicated. This adheres to a stateless RESTful design as each request from any client contains all the information required to service the request and the client holds the session state.
Our Use Case:
Currently we process and group large amounts of usage data that can come in at different points in a month. We require a guarantee that each usage
object we create in Zuora is unique (Don't want to double bill). That it has only been uploaded once and only once even if upload the same usage object multiple times.
On Jan 3rd I may submit a usage object:
Start Date: Jan 2nd
Submit Date: Jan 3rd
On Jan 30th I may submit a usage object:
Start Date: Jan 2nd
Submit Date: Jan 30th
I need to guarantee that the Usage bucket 'Local' gets two usage objects regardless of how many times I upload these two usage objects. I need that
guaranteed even if I have to submit these two usage objects multiple times. One reason I may have to submit these usage objects many times is the
failure to get the resulting response object in a reasonable amount of time. Additionally the sudden shutdown of the code which submits the data
would also leave me in a state in which I would need to resubmit the same usage data in order to ensure it has been received.
Currenlty I use the Description field to hold a unique id. Before I uplaod a batch of record I query the Usage Object for descriptions that match the unique ids which I am about to upload. If I find them then I know the usage has already been processed and I can ignore it. This workaround does the trick but it has its limitations.
1) If I upload in parallel I can still have duplicates as one thread could have uploaded since I last checked (No transacitonal guarantee)
2) I am use up my Read/Query quoat against zuora. (You are getting hit with way more requests then is really needed to solve this issue)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.