Method and system for converting e-commerce temporary order into formal order
By adopting an integrated closed-loop approach encompassing supply chain, promotion, logistics, and finance, the problems of disordered status and financial inconsistencies during the conversion of temporary e-commerce orders into formal orders have been resolved, achieving integrated management of order status and finances.
Patent Information
- Application Number
- CN202511836522.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies lack an integrated method to simultaneously achieve multi-dimensional order splitting, activity/coupon allocation, expense sub-orders, differential fee rate accounting, and inventory linkage within the same closed loop, resulting in disordered status and financial inconsistencies when e-commerce temporary orders are converted into formal orders.
By adopting an integrated closed-loop approach encompassing supply chain, promotion, logistics, and finance, orders are split using aggregation keys to generate multi-dimensional order breakdowns and expense sub-orders. Idempotency checks are performed, net revenue is calculated, and inventory updates are triggered to achieve stable order status transitions.
It achieves an integrated closed loop of supply chain, promotion, logistics and finance, ensuring consistency of order status and accuracy of finance, and solving the problem of status disorder during the order conversion process.
Smart Images

Figure CN121660768A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method and system for converting temporary e-commerce orders into formal orders. Background Technology
[0002] When multiple suppliers, cross-regional operations, cloud warehousing, and wholesale coexist, a single temporary order needs to be broken down into multiple sub-orders for separate fulfillment and billing; the mixed use of promotions and coupons leads to cost allocation and legality verification; payment channels and regional rates are inconsistent; callback retries are common, easily resulting in duplicate entries and status disorder; inventory and finance must be synchronized after payment. Existing solutions often remain at the state switching level, lacking an integrated method that can stably achieve multi-dimensional order splitting, promotion / coupon allocation, cost sub-orders, differential rate accounting, inventory linkage, and idempotency within the same closed loop.
[0003] Therefore, a method and system for converting temporary e-commerce orders into formal orders is provided. Summary of the Invention
[0004] To address the aforementioned problems in the existing technology, this invention provides a method and system for converting temporary e-commerce orders into formal orders, achieving an integrated closed loop of supply chain, promotion, logistics, and finance.
[0005] The technical solution to achieve the above objectives is: A method for converting temporary e-commerce orders into formal orders includes: Step S1: Receive and verify the status, validity period, and address of the temporary order; Step S2: Based on the supplier identifier, region identifier, warehouse type and whether it is wholesale, form an aggregation key, perform multi-dimensional splitting of the product set to obtain at least one sales sub-order, and generate a cost sub-order for freight. Step S3: Generate a transaction numbering system associated with payment. When there are multiple sales sub-orders or expense sub-orders, generate a top-level transaction number and multiple sub-transaction numbers and store their association. Step S4: Distribute the promotional activities and coupons proportionally or according to the applicable scope within the target sub-order or target product, and verify the legality of the amount. Step S5: Initiate payment through at least one payment channel, and encapsulate the temporary single identifier, top-level transaction record, sub-transaction identifier, and channel information in the callback additional data; Step S6: In the callback process, locate the top-level transaction flow and its sub-transaction set based on the external transaction number, perform idempotency verification, write back the payment status of the sales sub-order and the expense sub-order, and set the sub-transaction to complete. Step S7: Calculate the net receipt based on the channel fee rate or fixed handling fee, update the bank account balance and generate a receipt voucher; Step S8: Update the temporary order to a formal order, triggering inventory deduction and inventory change log recording.
[0006] Preferably, in step S2, the aggregation key is "supplier identifier". +Regional identifier +Cloud Warehouse Logo Wholesale? The combination of ""; the fee sub-invoice is a freight sub-invoice, and is charged according to the tiered rules of initial weight and subsequent weight; The formula for calculating the amount of unallocated sub-sales is as follows: ; In the formula, For the amount of the unallocated sub-invoice, For product indexing, , is a sub-monopolymer bond, Price per unit. For quantity; The formula for calculating the service fee amortization is as follows: ; ; In the formula, To break down service fees into smaller units, for, Basic number of pieces, This is the average amount of the service fee.
[0007] Preferably, in step S3, a transaction is generated when there are two or more sales sub-orders or when there are expense sub-orders. and establish A one-to-many relationship, in which, For the top-level water flow, For you, the water flows.
[0008] Preferably, in step S4, allocating the promotional activity proportionally or according to rules within the target sub-order or target product based on the applicable scope includes: like: ; but: ; Allocate according to the mapping ratio; ; In the formula, For the event, for, For the threshold, To reduce the amount for the event, For products during the event The actual amount of contribution, To reach the minimum discount amount, This is the final price of the discounted item. The original price of the goods; Coupons are divided into two categories: "by supplier" and "by product". The former is allocated according to the proportion of the target sub-order amount, and the latter is allocated according to the proportion of the target product amount. The last item carries the remaining difference. Based on supplier coupons: ; In the formula, For suppliers The amount of coupons allocated to a specific product. The calculation result is rounded to two decimal places. For the face value of the coupon, For suppliers The discounted amount for a certain product. To be based on the supplier range, This represents the total discounted amount for all target products from this supplier. The last item carries over the remaining difference: ; In the formula, The amount allocated to the last item. It is the smallest positive amount; Coupons for specific products: ; In the formula, For goods The amount of the coupons allocated For goods The original amount, By product range, The total original amount of all goods within the product range; And add it to the corresponding sub-segment.
[0009] Preferably, in step S6, idempotent control is achieved through joint verification of the Redis key and the temporary single state during the callback phase; after the transaction status is written back, the handling fee is calculated according to the regional difference rate of the payment channel, the net amount is written into the bank general ledger, and a receipt detail is generated and associated with the order.
[0010] Preferably, in step S7, the net revenue is calculated based on the channel fee rate or fixed handling fee, wherein... If the percentage fee is: ; In the formula, This represents the net inflow from the percentage fee channel. For the total amount paid, This represents the net revenue percentage from channel fees. If fixed fee: ; In the formula, For net income from fixed-fee channels, Fixed commission; First, water flows from the top floor. Add net income to bank balance Then follow the sub-flow The amount is deducted sequentially and the balance is recorded as a consistent chain of evidence.
[0011] Preferably, in step S8, the inventory deduction only applies to non-customized and non-pre-ordered products, and the values before and after the change and the reason for the change are recorded; in, The formula for calculating inventory changes is as follows: ; In the formula, This represents the change in inventory. This refers to the quantity of this item purchased in the order.
[0012] A second aspect of the present invention provides a system for converting temporary e-commerce orders into formal orders, comprising: The temporary order management module receives and verifies the status, validity period, and address of temporary orders. It forms an aggregation key based on supplier identifier, region identifier, warehouse type, and whether it is wholesale, and performs multi-dimensional splitting of the product set to obtain at least one sales sub-order. It also generates a cost sub-order for freight. The order splitting and transaction management module generates a transaction numbering system associated with payment. When there are multiple sales sub-orders or expense sub-orders, it generates a top-level transaction number and multiple sub-transaction numbers and stores their association. The activity / coupon allocation module allocates promotional activities and coupons proportionally or according to rules within the target sub-order or target product based on their applicable scope, and verifies the legality of the amount. The payment channel adaptation module initiates payment through at least one payment channel, encapsulating the temporary single identifier, top-level transaction record, sub-transaction identifier, and channel information in the callback append data; The callback processing and idempotency control module locates the top-level transaction flow and its sub-transaction set based on the external transaction number during callback processing. After performing idempotency verification, it writes back the payment status of the sales sub-order and the expense sub-order and sets the sub-transaction to complete. The financial accounting module calculates net receipts based on channel fees or fixed handling fees, updates bank account balances, and generates receipt vouchers. The inventory linkage module updates temporary orders to formal orders, triggering inventory deductions and inventory change log records.
[0013] Compared with the prior art, the beneficial effects of the present invention are: the present invention splits orders in a fine-grained manner according to "supplier + region + warehouse type + whether it is wholesale + logistics cost", with dual-path allocation (by supplier / by product), an idempotent strategy of "top-level flow + sub-flow" and Redis / database collaboration, regionalized fee rates and bank balance replay consistency evidence, and pluggable rules and channel configuration, thus realizing an integrated closed loop of supply chain, promotion, logistics and finance. Attached Figure Description
[0014] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a method for converting temporary e-commerce orders into formal orders according to the present invention; Figure 2 This is a module diagram of a system according to the present invention for converting temporary e-commerce orders into formal orders. Detailed Implementation
[0015] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0016] like Figure 1 As shown, a method for converting temporary e-commerce orders into formal orders includes: Step S1: Receive and verify the status, validity period, and address of the temporary order.
[0017] Step S2: Based on the supplier identifier, region identifier, warehouse type and whether it is wholesale, form an aggregation key to perform multi-dimensional splitting of the product set to obtain at least one sales sub-order, and generate a cost sub-order for freight.
[0018] In this embodiment, the aggregation key is "supplier identifier". +Regional identifier +Cloud Warehouse Logo Wholesale? The combination of ""; the fee sub-invoice is a freight sub-invoice, and is charged according to the tiered rules of initial weight and subsequent weight; The formula for calculating the amount of unallocated sub-sales is as follows: ; In the formula, For the amount of the unallocated sub-invoice, For product indexing, , is a sub-monopolymer bond, Price per unit. For quantity; The formula for calculating the service fee amortization is as follows: ; ; In the formula, To break down service fees into smaller units, for, Basic number of pieces, This is the average amount of the service fee.
[0019] Step S3: Generate a transaction numbering system associated with payment. When there are multiple sales sub-orders or expense sub-orders, generate a top-level transaction number and multiple sub-transaction numbers and store their association.
[0020] In this embodiment, an order is generated when there are two or more sales sub-orders or when there are expense sub-orders. and establish A one-to-many relationship, in which, For the top-level water flow, For you, the water flows.
[0021] In the embodiment, for each calculate Generate a freight sub-transaction with relationType=cost and manage it alongside the sales sub-transaction; in, The formula for calculating freight charges in the sub-transaction log is as follows: ; In the formula, The most important price, For weight, The primary threshold, To maintain the step length, Price per additional weight.
[0022] Step S4: Distribute the promotional activities and coupons proportionally or according to rules within the target sub-order or target product based on their applicable scope, and verify the legality of the amounts.
[0023] In this embodiment, the promotional activity is allocated proportionally or according to rules within the target sub-order or target product based on the applicable scope, including: like: ; but: ; Allocate according to the mapping ratio; ; In the formula, For the event, for, For the threshold, To reduce the amount for the event, For products during the event The actual amount of contribution, To reach the minimum discount amount, This is the final price of the discounted item. The original price of the goods; Coupons are divided into two categories: "by supplier" and "by product". The former is allocated according to the proportion of the target sub-order amount, and the latter is allocated according to the proportion of the target product amount. The last item carries the remaining difference. Based on supplier coupons: ; In the formula, For suppliers The amount of coupons allocated to a specific product. The calculation result is rounded to two decimal places. For the face value of the coupon, For suppliers The discounted amount for a certain product. To be based on the supplier range, This represents the total discounted amount for all target products from this supplier. The last item carries over the remaining difference: ; In the formula, The amount allocated to the last item. It is the smallest positive amount; Coupons for specific products: ; In the formula, For goods The amount of the coupons allocated For goods The original amount, By product range, The total original amount of all goods within the product range; And add it to the corresponding sub-segment.
[0024] Step S5: Initiate payment through at least one payment channel, and encapsulate the temporary single identifier, top-level transaction record, sub-transaction identifier, and channel information in the callback additional data.
[0025] Step S6: In the callback process, locate the top-level transaction flow and its sub-transaction set based on the external transaction number, perform idempotency verification, write back the payment status of the sales sub-order and the expense sub-order, and set the sub-transaction to complete.
[0026] In the embodiment, idempotent control is achieved through joint verification of Redis keys and temporary single states during the callback phase; after the transaction status is written back, the handling fee is calculated according to the regional difference rate of the payment channel, the net amount is written to the bank general ledger, and a receipt detail is generated and associated with the order.
[0027] Step S7: Calculate the net receipt based on the channel fee rate or fixed handling fee, update the bank account balance, and generate a receipt voucher.
[0028] In this example, net revenue is calculated based on either the channel fee rate or a fixed commission, wherein... If the percentage fee is: ; In the formula, This represents the net inflow from the percentage fee channel. For the total amount paid, This represents the net revenue percentage from channel fees. If fixed fee: ; In the formula, For net income from fixed-fee channels, Fixed commission; First, water flows from the top floor. Add net income to bank balance Then follow the sub-flow The amount is deducted sequentially and the balance is recorded as a consistent chain of evidence.
[0029] Step S8: Update the temporary order to a formal order, triggering inventory deduction and inventory change log recording.
[0030] In this embodiment, inventory deduction only applies to non-customized and non-pre-ordered products, and records the values before and after the change and the reason for the change; in, The formula for calculating inventory changes is as follows: ; In the formula, This represents the change in inventory. This refers to the quantity of this item purchased in the order.
[0031] like Figure 2 As shown, a system for converting temporary e-commerce orders into formal orders includes: a temporary order management module 1, an order splitting and transaction management module 2, an activity / coupon allocation module 3, a payment channel adaptation module 4, a callback processing and idempotent control module 5, a financial accounting module 6, and an inventory linkage module 7.
[0032] Temporary Order Management Module 1 receives and verifies the status, validity period, and address of temporary orders. It forms an aggregation key based on supplier identifier, region identifier, warehouse type, and whether it is a wholesale order. It then performs multi-dimensional splitting of the product set to obtain at least one sales sub-order and generates a cost sub-order for freight.
[0033] The order splitting and transaction management module 2 generates a transaction numbering system associated with payment. When there are multiple sales sub-orders or expense sub-orders, it generates a top-level transaction number and multiple sub-transaction numbers and stores their association.
[0034] Activity / Coupon Allocation Module 3 allocates promotional activities and coupons proportionally or according to rules within the target sub-order or target product based on their applicable scope, and verifies the legality of the amount.
[0035] Payment channel adaptation module 4 initiates payment through at least one payment channel, encapsulating the temporary single identifier, top-level transaction record, sub-transaction identifier, and channel information in callback append data.
[0036] The callback processing and idempotency control module 5 locates the top-level transaction flow and its sub-transaction set based on the external transaction number during callback processing. After performing idempotency verification, it writes back the payment status of the sales sub-order and the expense sub-order and sets the sub-transaction to complete.
[0037] The financial accounting module 6 calculates net receipts based on channel fees or fixed handling fees, updates bank account balances, and generates receipt vouchers.
[0038] Inventory linkage module 7 updates temporary orders to formal orders, triggering inventory deduction and inventory change log recording.
[0039] Finally, it should be noted that the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for converting temporary e-commerce orders into formal orders, characterized in that, include: Step S1: Receive and verify the status, validity period, and address of the temporary order; Step S2: Based on the supplier identifier, region identifier, warehouse type and whether it is wholesale, form an aggregation key, perform multi-dimensional splitting of the product set to obtain at least one sales sub-order, and generate a cost sub-order for freight. Step S3: Generate a transaction numbering system associated with payment. When there are multiple sales sub-orders or expense sub-orders, generate a top-level transaction number and multiple sub-transaction numbers and store their association. Step S4: Distribute the promotional activities and coupons proportionally or according to the applicable scope within the target sub-order or target product, and verify the legality of the amount. Step S5: Initiate payment through at least one payment channel, and encapsulate the temporary single identifier, top-level transaction record, sub-transaction identifier, and channel information in the callback additional data; Step S6: In the callback process, locate the top-level transaction flow and its sub-transaction set based on the external transaction number, perform idempotency verification, write back the payment status of the sales sub-order and the expense sub-order, and set the sub-transaction to complete. Step S7: Calculate the net receipt based on the channel fee rate or fixed handling fee, update the bank account balance and generate a receipt voucher; Step S8: Update the temporary order to a formal order, triggering inventory deduction and inventory change log recording.
2. The method for converting temporary e-commerce orders into formal orders according to claim 1, characterized in that, In step S2, the aggregation key is "supplier identifier". +Regional identifier +Cloud Warehouse Logo Wholesale? The combination of ""; the fee sub-invoice is a freight sub-invoice, and is charged according to the tiered rules of initial weight and subsequent weight; The formula for calculating the amount of unallocated sub-sales is as follows: ; In the formula, For the amount of the unallocated sub-slip, For product indexing, , is a sub-monopolymer bond, Price per unit. For quantity; The formula for calculating the service fee amortization is as follows: ; ; In the formula, To break down service fees into smaller units, for, Basic number of pieces, This is the average amount of the service fee.
3. The method for converting temporary e-commerce orders into formal orders according to claim 1, characterized in that, In step S3, a transaction is generated when there are two or more sales sub-orders or when there are expense sub-orders. and establish A one-to-many relationship, in which, For the top-level water flow, For you, the water flows.
4. The method for converting temporary e-commerce orders into formal orders according to claim 1, characterized in that, In step S4, the promotional activity is allocated proportionally or according to rules within the target sub-order or target product based on its applicable scope, including: like: ; but: ; Allocate according to the mapping ratio; ; In the formula, For the event, for, For the threshold, To reduce the amount for the event, For products during the event The actual amount of contribution, For the minimum discount amount, This is the final price of the discounted item. The original price of the goods; Coupons are divided into two categories: "by supplier" and "by product". The former is allocated according to the proportion of the target sub-order amount, and the latter is allocated according to the proportion of the target product amount. The last item carries the remaining difference. Based on supplier coupons: ; In the formula, For suppliers The amount of coupons allocated to a specific product. The calculation result is rounded to two decimal places. For the face value of the coupon, For suppliers The discounted amount for a certain product. To be based on the supplier range, This represents the total discounted amount for all target products from this supplier. The last item carries over the remaining difference: ; In the formula, The amount allocated to the last item. It is the smallest positive amount; Coupons for specific products: ; In the formula, For goods The amount of the coupons allocated. For goods The original amount, By product range, The total original amount of all goods within the product range; And add it to the corresponding sub-segment.
5. The method for converting temporary e-commerce orders into formal orders according to claim 1, characterized in that, In step S6, idempotent control is achieved through joint verification of Redis keys and temporary single status during the callback phase; after the transaction status is written back, the handling fee is calculated according to the regional difference rate of the payment channel, the net amount is written to the bank general ledger, and a receipt detail is generated and associated with the order.
6. The method for converting temporary e-commerce orders into formal orders according to claim 1, characterized in that, In step S7, the net income is calculated based on the channel fee rate or fixed handling fee, wherein... If the percentage fee is: ; In the formula, This represents the net inflow from the percentage fee channel. For the total amount paid, This represents the net revenue percentage from channel fees. If fixed fee: ; In the formula, For net income from fixed-fee channels, Fixed commission; First, water flows from the top floor. Add net income to bank balance Then follow the sub-flow The amount is deducted sequentially and the balance is recorded as a consistent chain of evidence.
7. The method for converting temporary e-commerce orders into formal orders according to claim 1, characterized in that, In step S8, the inventory deduction only applies to non-customized and non-pre-ordered products, and the values before and after the change and the reason for the change are recorded. in, The formula for calculating inventory changes is as follows: ; In the formula, This represents the change in inventory. This refers to the quantity of this item purchased in the order.
8. A system for converting temporary e-commerce orders into formal orders, characterized in that, include: The temporary order management module receives and verifies the status, validity period, and address of temporary orders. It forms an aggregation key based on supplier identifier, region identifier, warehouse type, and whether it is wholesale, and performs multi-dimensional splitting of the product set to obtain at least one sales sub-order. It also generates a cost sub-order for freight. The order splitting and transaction management module generates a transaction numbering system associated with payment. When there are multiple sales sub-orders or expense sub-orders, it generates a top-level transaction number and multiple sub-transaction numbers and stores their association. The activity / coupon allocation module allocates promotional activities and coupons proportionally or according to rules within the target sub-order or target product based on their applicable scope, and verifies the legality of the amount. The payment channel adaptation module initiates payment through at least one payment channel, encapsulating the temporary single identifier, top-level transaction record, sub-transaction identifier, and channel information in the callback append data; The callback processing and idempotency control module locates the top-level transaction flow and its sub-transaction set based on the external transaction number during callback processing. After performing idempotency verification, it writes back the payment status of the sales sub-order and the expense sub-order and sets the sub-transaction to complete. The financial accounting module calculates net receipts based on channel fees or fixed handling fees, updates bank account balances, and generates receipt vouchers. The inventory linkage module updates temporary orders to formal orders, triggering inventory deductions and inventory change log records.