Reverse Connections
Reverse Connections allow Talk2sync to coordinate product and order synchronization with an external system through a defined protocol and a set of REST calls.
This section describes the reverse connection protocol, the REST calls used during synchronization, and the implementation states required to integrate an external system with Talk2sync.
Protocol
The protocol defines the communication model used to synchronize products and orders between Talk2sync and the external system.
- Overview — General overview of the reverse connection protocol.
- Product upload — Protocol for uploading products.
- Order upload — Protocol for uploading orders.
- Product download — Protocol for downloading products.
- Order download — Protocol for downloading orders.
REST Calls
REST calls define the operations used by Talk2sync to coordinate data retrieval, submission, and synchronization progress.
Fetching Changes
These calls are used when Talk2sync requests changes from the external system.
- Ask if fetching — Checks whether there are changes available to fetch.
- Push products page — Processes a page of products to be pushed.
- Set finish products push — Marks the product push operation as finished.
- Push orders page — Processes a page of orders to be pushed.
- Set finish orders push — Marks the order push operation as finished.
- Set finish all pushes — Marks all push operations as finished.
Pulling Changes
These calls are used when Talk2sync retrieves changes from the external system.
- Ask if pulling — Checks whether there are changes available to pull.
- Pull products page — Retrieves a page of products to be pulled.
- Get next product to pull — Retrieves the next product pending synchronization.
- Notify product success — Notifies Talk2sync that a product was processed successfully.
- Notify product failure — Notifies Talk2sync that product processing failed.
- Set finish product pulls — Marks product pulling as finished.
- Pull orders page — Retrieves a page of orders to be pulled.
- Get next orders to pull — Retrieves the next orders pending synchronization.
- Notify orders success — Notifies Talk2sync that orders were processed successfully.
- Notify orders failure — Notifies Talk2sync that order processing failed.
- Set finish order pulls — Marks order pulling as finished.
- Transact finish pull — Completes the pull transaction.
Implementation
The implementation section describes the states that an external system can use while processing reverse connection operations.
- Read — Defines the read state used during synchronization.
- Write — Defines the write state used to process synchronization operations.
- Sleep — Defines the sleep state used when no active processing is required.
Next Steps
Start with the Protocol Overview to understand the reverse connection workflow before implementing the REST calls.
Then review the REST Calls and the corresponding pulling and fetching operations to implement the required synchronization flow.