CN-122022948-A - Multi-platform order delivery state synchronization method and system
Abstract
The invention relates to a method and a system for synchronizing delivery states of orders on multiple platforms, and relates to the technical field of data synchronization. The method comprises the steps of generating tasks based on an invoice, automatically judging and screening tasks allowing dispatch by sequentially checking multidimensional policy rules such as sales accounts, logistics channels and order attributes, writing the tasks in a task pool after marking the states of the tasks, reliably acquiring task identifications to be processed from the task pool by timing tasks and adopting a batch query mechanism based on automatic-increasing main key descending order and cursor anchor points, writing the task identifications into a message queue to avoid omission in dynamic data processing, consuming the tasks from the message queue, and calling corresponding asynchronous mark-dispatching, incremental mark-dispatching or combined mark-dispatching policy executors according to an E-commerce platform to which the tasks belong so as to adapt interface differences and business logics of different platforms and finish synchronization of the shipment states to a target platform. The invention realizes the automatic synchronization of the delivery states of the multi-platform orders with high efficiency, accuracy and reliability.
Inventors
- LIN RUN
Assignees
- 扬腾创新(福建)信息科技股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260126
Claims (10)
- 1. A method for synchronizing shipping status of a multi-platform order, the method comprising: generating a delivery task based on a sales order, judging whether the delivery task is allowed to be automatically delivered according to a delivery strategy comprising a plurality of quantifiable rules which are sequentially executed, wherein when all the rules are judged to be allowed, marking the delivery task state as undelivered and writing the delivery task into a task pool, otherwise marking the delivery task state as strategy limiting as undelivered and writing the delivery task into the task pool; Inquiring the shipping tasks which are not dispatched or can be retried in the task pool through timing tasks, and writing the identifiers of the inquired shipping tasks into a message queue by adopting inquiry operation which is combined with cursor batch acquisition through automatic increasing and descending order based on a task table; Consuming a delivery task from the message queue, calling a corresponding standard delivery strategy to execute delivery action according to an e-commerce platform to which the delivery task belongs, and driving a target platform to sell order state and deliver synchronously; when the execution fails, analyzing error information, if the error reason belongs to a preset white list, updating the task state to be failed without retry, otherwise, retrying according to a retry strategy.
- 2. The method for synchronizing shipping status of multiple platform orders according to claim 1, wherein the shipping policy includes a sales account policy, a logistics channel policy, and an order attribute policy, wherein the condition for allowing automatic shipping is determined to be that the sales account policy determines that the corresponding sales account has enabled an automatic labeling function on a designated platform, the logistics channel policy determines that a logistics channel used by a current sales order is allowed to be automatically labeled, and the order attribute policy of the sales order determines that the sales order status is not cancelled and is not an FBA order.
- 3. The method for synchronizing shipping states of multiple platform orders according to claim 1, wherein the query operation of combining cursor batch acquisition by adopting automatic increasing and decreasing primary key descending order based on the task list is specifically as follows: Determining a fixed screening condition for inquiring a task pool according to the triggering of a timing task and the state of a delivery task to be processed, executing first inquiry, acquiring the largest main key value record in the task records currently meeting the fixed screening condition as an initial anchor point, performing iterative inquiry in an anchor point decreasing mode, taking the smallest main key value in the inquiry result of the previous batch as an updating anchor point of the next inquiry when inquiring each time, constructing iterative inquiry sentences based on the updating anchor point, limiting the main key value smaller than the updating anchor point when inquiring each time, and acquiring the records of a preset quantity as current batch data according to the descending order of the main key.
- 4. The method for synchronizing shipping status of a multi-platform order according to claim 1, wherein invoking the corresponding shipping strategy according to the e-commerce platform to which the shipping task pertains comprises: If the affiliated platform is an Amazon platform, the task is returned immediately after the standard sending interface is called and marked as the standard sending, and the final processing result of the call is inquired asynchronously through an independent timing task; If the affiliated platform is an independent station platform, calculating the total marked quantity of the SKU by inquiring the historical successful marked record of the sales order item SKU corresponding to the shipping task, and taking the minimum value in the difference value of the current shipping quantity and the total order quantity minus the marked quantity as the current actual marked commodity quantity; if the affiliated platform is an eBay platform, inquiring the tracking numbers of all undeployed invoices under the same sales order, and submitting a full-quantity tracking number list in a single API call to cover the historical tracking number record of the sales order of the platform.
- 5. The method for synchronizing shipping states of multiple platforms for orders according to claim 1, further comprising comparing the shipping states of the electronic commerce platforms with the shipping states of the system in batches through independent timing data comparison tasks, and adopting a back-off strategy and a fusing mechanism to process interface call exceptions, wherein the timing data comparison tasks set different execution frequencies according to the platform types, the back-off strategy is an exponential back-off strategy, and the fusing mechanism is triggered when the interface call failure rate in the single comparison task exceeds a preset threshold.
- 6. The method for synchronizing shipping states of multiple platform orders according to claim 1, wherein the whitelist is configured by using a platform identifier as a key and an error keyword list without retry as a value, and wherein when the matching is performed, whether any keyword in the keyword list is included in error information returned from the platform is judged, and if the matching is successful, it is judged that the retry is not required permanent failure.
- 7. The method of claim 1 or 6, wherein the retry strategy comprises retrying with an exponential backoff for network timeouts or platform throttling errors, and otherwise retrying with a fixed interval until a maximum number of retries is reached.
- 8. The method according to claim 4, wherein in the shipping status synchronization for the platform of the independent station, if the calculated number of actual shipping items is 0, the operation of synchronizing the shipping tracking number information only to the platform is performed.
- 9. The method of claim 1, wherein after writing the task identifier into the message queue, the corresponding message consumer loads the corresponding policy class according to the platform type information carried in the message to execute the specific marking action.
- 10. A multi-platform order shipping status synchronization system, the system comprising: The task generation and strategy judgment module is used for generating a delivery task based on a sales order, judging whether the delivery task is allowed to be automatically delivered according to a delivery strategy comprising a plurality of quantifiable rules which are sequentially executed, wherein when all the rules are judged to be allowed, the delivery task state is marked as undelivered and written into a task pool, and otherwise, the delivery task state is marked as strategy limitation and is not delivered and written into the task pool; The task inquiring and batch delivering module is used for inquiring the delivery tasks which are not dispatched or can be retried in the task pool through timing tasks, and writing the identifiers of the inquired delivery tasks into the message queue by adopting inquiring operation based on the descending order of the self-increasing main key of the task table and combining with batched cursor acquisition; The task execution and error processing module is used for consuming the delivery task from the message queue, executing delivery action according to the corresponding delivery strategy called by the E-commerce platform to which the delivery task belongs, driving the sales order state of the target platform to be synchronous with the delivered goods, analyzing error information when the execution fails, updating the task state to be failed without retry if the error cause belongs to a preset white list, and otherwise, retrying according to the retry strategy.
Description
Multi-platform order delivery state synchronization method and system Technical Field The invention relates to a method and a system for synchronizing delivery states of orders on multiple platforms, and belongs to the technical field of data synchronization. Background With the rapid development of cross-border e-commerce business, enterprises generally process orders from multiple sales platforms such as Amazon, eBay, independent stations, etc. in a unified manner through an Order Management System (OMS). Full-flow automation from order receiving, warehouse delivery to state synchronization is a key for improving operation efficiency and guaranteeing customer experience. The logistics state after delivery is accurately and timely synchronized back to each sales platform, which is a core step of forming a closed performance loop, completing platform settlement and maintaining store performance, and the technical challenges are particularly outstanding. In the prior art, there has been intensive research into automated processing of e-commerce orders. For example, the chinese patent application publication No. CN116823380a provides an automatic processing method for e-commerce orders. According to the technical scheme, orders from all platforms can be efficiently received, non-standard orders (such as remark orders and abnormal orders) are screened through intelligence, order information is analyzed, a receiving address and a local address library are matched and checked, inventory is finally locked, and an internal shipping instruction is generated. The technical scheme effectively solves the problem of first-half automation in the order performance process, namely how to accurately and reliably convert multi-channel heterogeneous order data into executable delivery tasks of an internal warehouse, and the technical focus is on inward aggregation, cleaning and conversion of the data. However, after the real order is delivered, the second half of the execution process, i.e. how to reversely and synchronously return the shipped state and the logistics tracking information to each e-commerce platform of the order source, faces a series of technical challenges with different properties, and the above order processing method is not related to nor cannot be solved. First, state synchronization is not an indifferent operation on each invoice, which requires a set of multi-dimensional strategic task generation and dispatch engines based on sales account rights, logistics channel configuration, order attributes (e.g., whether FBA orders are available) to achieve intelligent trigger judgment. Secondly, fundamental differences exist in interface specifications, data models and business logic of state synchronization of all e-commerce platforms (such as Amazon, eBay and independent stations), for example, amazon adopts an asynchronous callback mechanism, the independent stations need to support incremental update of SKU level, eBay requires full coverage of tracking numbers, and the execution framework must have high platform heterogeneous adaptation capability. Finally, when large-scale and high-frequency interaction is performed with an external platform API, the system needs to have industrial-level robustness, including anti-omission batch scheduling of a dynamic task pool, and fine intelligent fault tolerance, retry and fusing treatment of network anomalies, interface current limiting and various platform business errors. In summary, the prior art focuses mainly on optimizing the internal implementation flow, but for how to realize the delivery state synchronization with high reliability, self-adaption and complex business logic to multiple platforms, no systematic solution is provided yet, which makes the link still rely on manual operations in actual operation or face the bottlenecks of efficiency, accuracy and stability, and an automatic order delivery state synchronization method capable of specially coping with the above challenges, realizing high efficiency and accuracy, and self-adaption to multiple platform differences is needed. Disclosure of Invention In order to solve the problems in the prior art, the invention provides a method and a system for synchronizing the shipping states of multiple platforms of orders. The technical scheme of the invention is as follows: In one aspect, the present invention provides a method for synchronizing shipping status of a multi-platform order, comprising the steps of: generating a delivery task based on a sales order, judging whether the delivery task is allowed to be automatically delivered according to a delivery strategy comprising a plurality of quantifiable rules which are sequentially executed, wherein when all the rules are judged to be allowed, marking the delivery task state as undelivered and writing the delivery task into a task pool, otherwise marking the delivery task state as strategy limiting as undelivered and writing the delivery task into the task poo