Query Implementation: Products and Orders
The query implementation is responsible for retrieving products and orders from the legacy ERP, database, or other source application, transforming the results into the Talk2Sync data structure, and sending them to Talk2Sync.
The implementation uses pagination so that the connector can process records in batches according to the performance requirements of the source system.
Query Implementation Products
The product query process consists of:
- Extracting or querying products from the source application.
- Transforming the results into an array of products using the Talk2Sync structure.
- Sending the resulting product page to Talk2Sync.
- Determining whether additional products remain to be processed.
You should define a page size that is appropriate for the performance characteristics of your source system.
The implementation must also determine whether the current result set contains additional products. This has more state is required to determine when the connector should stop pushing product pages to Talk2Sync.
Query Implementation Orders
The order query process follows the same pagination model:
- Extracting or querying orders from the source application.
- Transforming the results into an array of orders using the Talk2Sync structure.
- Sending the resulting order page to Talk2Sync.
- Determining whether additional orders remain to be processed.
As with products, you should define a page size that fits the performance requirements of your source system.
The implementation must determine whether the current result set contains additional orders. The has more state indicates when the connector should continue pushing order pages or stop the process.
Products and Orders Are Optional
It is not mandatory to synchronize both products and orders.
You can implement synchronization for:
- Products only.
- Orders only.
- Both products and orders.
Regardless of which entities are implemented, all transaction steps between the connection states must be performed in the correct order.
Query Flow
Next Steps
- Review Products & Orders Store Implementation for processing products and orders updates received from Talk2Sync.
- Review the Reverse Connector Protocol for the complete transaction flow.