Order Download
The order download flow defines the sequence used by the daemon to retrieve orders from Talk2Sync and insert or update them in the external system.
The process continues until there are no additional orders to insert or update. Each order is transformed and stored, and the result of the storage operation is reported back to Talk2Sync.
Once all orders have been processed, the daemon finalizes the pull operation.
Download Flow
Process
The daemon follows these steps:
- Start the order download process.
- Check whether more orders need to be inserted or updated.
- If orders remain, retrieve the next order from Talk2Sync.
- Transform and store the order in the external system.
- Check whether the storage operation succeeded.
- If successful, notify Talk2Sync of the successful order storage.
- If the operation fails, notify Talk2Sync of the storage failure.
- Return to the order availability check and continue processing.
- When no orders remain, finish the pull operation.
- End the order download process.
Handling Storage Results
Each order must be processed independently. After attempting to store an order, the daemon reports the result to Talk2Sync before requesting the next order.
A successful storage operation and a failed storage operation follow separate notification paths, but both return to the order processing loop.
Finishing the Pull Operation
When Talk2Sync indicates that there are no more orders to insert or update, the daemon calls the operation used to finish the pull.
This marks the end of the current pull transaction and allows the daemon to complete the order download flow.
Next Steps
- Review Pull Orders Page to retrieve orders pending synchronization.
- Review Notify Orders Success to report successful order storage.
- Review Notify Orders Failure to report storage failures.
- Review Transact Finish Pull to complete the pull transaction.
- Review Order Store Implementation for the transformation and storage implementation.