Product order split design technical ideas for e-commerce system development

Nowadays, the e-commerce industry is developing rapidly, and users can conduct shopping transactions on e-commerce platforms. For the convenience of users, users can select products from multiple stores at the same time for unified payment, and these orders will be split in the background; the author of this article shared about the order system Let's take a look at the detailed explanation of order splitting rules and procedures in .

When a user makes a purchase on an e-commerce platform, he usually submits multiple products from multiple merchants as one order, and also uses various coupons and full discounts; after the payment is completed, how does the background split the order Yes, after the split, how will the system deal with funds, suppliers, shipping costs, and preferential discounts? Please read below.

Order splitting is the process of splitting a large order into two or more sub-orders according to certain rules. The original order is the parent order.

For example, you bought two items on an e-commerce platform, one is a toy and the other is a mobile phone. Toys and mobile phones are likely to come from different merchants, so the system will split your order into two sub-orders, and each sub-order will be delivered by the corresponding merchant; because the goods of different merchants are stored in their own warehouses, this is Why do you need to split orders according to different merchants in the shopping cart.

What is order splitting

The order submitted by the user is not physically an inseparable unit, that is, it is not an entity with the smallest granularity and can be decomposed in various forms. How to decompose it can be divided into different forms according to different business scenarios. split.

Why order splitting

There are generally several reasons for order splitting:

1. Warehouse reasons

Some large e-commerce companies (JD.com, Kaola, etc.) have self-built warehouses, and the products will be stocked in different warehouses according to the past shipment data. If the user's order contains products from multiple warehouses, then it must be Different warehouse commodities are split.

2. The reason for the store

Some e-commerce platforms (Tmall, Taobao, Pinduoduo, etc.) have many merchants settled in, and it is very common for users to settle orders across stores, so it is also necessary to split orders at this time. There are similarities, each settled business can be regarded as a warehouse.

3. Reasons for cross-border commodities

For cross-border goods, since the order and payment single-core waybill need to be collided, and each order cannot exceed 2,000 yuan, and the annual amount cannot exceed 20,000 yuan, if the user's single order value exceeds 2,000 yuan, the order must be split , each split sub-order cannot exceed 2,000 yuan, and each sub-order has an independent order number and logistics tracking number to ensure normal customs clearance.

4. Logistics reasons

Different logistics companies have special requirements for the weight or volume of a single package. For example, some logistics companies (postal parcels) stipulate that a single package cannot exceed 20kg, and there is also a situation: a 10kg package may charge more than two 5kg packages Higher, based on logistics cost considerations, an order is generally split into two. For example, Shentong: 10 cans of beer sent to Liaoning cost 24 yuan, and the price of 5 bottles at the same location is 6 yuan (the contract price with Shentong is not the market price. ).

5. Commodity category

Certain product categories require special handling, for example: fragile items need to be shipped separately; oversized items (child seats, refrigerators, washing machines, TVs, etc.) The order is split.

when to split an order

Timing of order splitting: after placing an order, before payment and after payment

The difference between the two: If the order is split after the order is placed and before the payment is made, after the user submits the order, if the user does not pay immediately but returns to the order list, you can see that the order is split into several sub-orders, each containing different commodities . At this time, each sub-order will have an independent logistics query entry. If the parent order includes shipping costs and discount amounts, the discount and shipping costs need to be allocated to each sub-order (preferably need to be allocated to each regular-priced item, Facilitate subsequent after-sales refund processing, depending on whether the after-sales is a refund of the entire order or a single item);

Splitting the order after payment is generally for the convenience of financial settlement. For example, the Taobao platform collects the parent order amount in advance. After the user confirms the receipt of the goods from a store, the platform will transfer the corresponding store payment to the store. At this time, the platform needs to be in the user's After payment, the order is split according to the stores that the order spans, and the amount paid by the user is allocated to each store. The user end generally does not perceive that the order is split, and the order seen is still an order (parent order).

1. Split multiple sub-orders after placing an order but before payment

Common in the following situations:

Cross-border goods (the third case above): Since cross-border goods need three invoices (order, payment note and waybill) to be cleared, if the order is split after payment, there is only one payment order number. If If the order must be split for some reason (refer to the above five situations), then this order will have multiple waybill numbers, resulting in the inability to match the three orders and complete customs clearance. Therefore, for this reason, for cross-border goods, it is generally used to split the order after placing the order and before paying.

2. Split multiple sub-orders after payment

Cross-warehouse products (the first case above): Since multiple warehouses are involved, different packages need to be shipped. In order to facilitate users to query the logistics status of each package separately, it is generally necessary to disassemble according to different warehouses after the order payment is completed. Divided into different orders, here the order needs to be split according to the package unit. Each order corresponds to a logistics order number. As for the order splitting according to the rules of description, the rules related to the dispatching system generally select the nearest warehouse according to the user's delivery address, and split the order dynamically.

3. Split multiple sub-orders after payment

Cross-warehouse products (the first case above): Since multiple warehouses are involved, different packages need to be shipped. In order to facilitate users to query the logistics status of each package separately, it is generally necessary to disassemble according to different warehouses after the order payment is completed. Divided into different orders, here the order needs to be split according to the package unit. Each order corresponds to a logistics order number. As for the order splitting according to the rules of description, the rules related to the dispatching system generally select the nearest warehouse according to the user's delivery address, and split the order dynamically.

How to split an order

After we know why we need to split, we can split the order in a targeted design

insert image description here
Order splitting process

For example: SKU A and SKU B belong to the same warehouse, SKUB is a special category product, and the weight of 2 SKU C exceeds the logistics limit, and they are not in the same warehouse as SKU A and SKU B

Then if an order buys 1 SKU A, SKU B and 2 SKU C at the same time, follow the above process to split the order as follows:

insert image description here
Order Split Results

*Note: There is no specific split logic explained here. For example: the following only talks about the need to split the order due to logistics restrictions, but it does not explain how to split the order: whether to split the order if it exceeds 20kg, or use the weight/volume of all SKUs in the order to set the courier fee formula, and combine the same SKU in one package, guarantee The post-split courier fee should be lower than the cost of combined delivery and other factors to split an optimal ratio. These need to be comprehensively considered according to the specific business needs and the logistics calculation formula of the courier company, and the boss will not be happy when we talk about it. up.

Order Amount Split

If the parent order is split, not only the product and the quantity of the product will change with the order, but the amount of the order will also change accordingly. At the same time, in order to facilitate the solution of subsequent after-sales problems, the split order amount must be reasonably split. Let's first look at the composition of the order amount:
insert image description here
the composition of the order amount

This figure shows the amount composition of an order, which consists of two parts: positive value and negative value

Positive value: item amount, shipping cost

Negative value: promotional discount amount, point deduction, coupon discount, background price change, etc.

The discount amount here involves: changing the price of SKU, full discount, full discount, coupons, discount codes, etc. The background needs to mark the corresponding fields when each amount is deducted, so as to facilitate statistical queries.

Order amount calculation process:

  1. First calculate the product amount (ie: change the product price)

  2. Subtotal amount of products after promotion (i.e. full discount, full discount, full gift, coupons)

  3. Order amount after promotion (i.e. full discount, full discount, full gift)

  4. Subsequent coupons and discount codes for orders

  5. After the amount is accumulated and superimposed, then judge whether it is free shipping or not, and calculate the shipping cost

  6. Points deducted from the order amount

  7. Other amount deduction, such as: manually modifying the price in the background (need to use a separate field to record, and cannot directly modify the original order amount)

Amount distribution after order splitting:

If the order involves cross-store splitting, it is generally recommended to put the product on the shelf with free shipping to avoid calculating the shipping fee separately after the order is split. This is unacceptable to users (one order needs to pay multiple shipping fees). Question about postage

As an example:

  1. For the full discount of designated products, the amount after the promotion needs to be apportioned

For example, an order is as follows

SKUA 2 pieces in total 25 yuan single product to participate in the 20 minus 5 promotion

SKUB 2 pieces total 60 yuan without promotion

SKUC 1 piece total 20 yuan without promotion

Site-wide promotion: 10% off when you spend over 100

Use a coupon: spend 80 off 10

After the promotion of this order
, the actual payment (actual payment) that the user needs to pay is: 105-5-10-10=80 yuan

If we split it into three sub-orders, 1, 2, and 3 respectively correspond to three SKUs, how should the amount of each sub-order be distributed? This involves the issue of apportionment of the discount amount.

For sub-order 1 (SKU A)

Total price of goods: 25 yuan

Promotional offer: 5 yuan

Promotion sharing discount: (25-5)/(20+60+20)*10=2 yuan

Coupon sharing discount: (25-5)/(20+60+20)*10=2 yuan

Actual payment for the order: 25-5-2-2=16 yuan

For sub-order 2 (SKU B)

Total price of goods: 60 yuan

Promotion sharing discount: 60/(20+60+20)*10=6 yuan

Coupon sharing discount: 60/(20+60+20)*10=6 yuan

Actual payment for the order: 60-6-6=48 yuan

For sub-order 3 (SKU C)

Total price of goods: 20 yuan

Promotion sharing discount: 20/(20+60+20)*10=2 yuan

Coupon sharing discount: 20/(20+60+20)*10=2 yuan

Actual payment for the order: 20-2-2=16 yuan

How to deal with after-sales orders after splitting

If a partial order refund is performed, the refund must be made based on the actual payment of each sub-order.

If the after-sales return refund is executed, the refund must also be processed according to the actual payment of the sub-order.

If points deduction is involved, the amount of points deduction is also apportioned to each sub-order according to the above formula, but when the refund is executed, the proportional points of the corresponding amount need to be returned to the user

Perform a partial refund, because there is generally no coupon with a specified amount (coupons generally do not support partial refunds), so when a partial refund is performed, the coupon will not be refunded

Consider returning coupons if refunded in full, depending on business needs

*Note: The above apportionment rules are only a compromise solution. When it comes to cross-store situations, since the gross profit margin of each product is different, the apportionment is made in proportion to the amount of the product, which may lead to losses for some stores

For example: the gross profit rate of soap is 10%, and the gross profit rate of cups is 50%. Since the discount is apportioned according to the proportion of the product amount, the soap may actually be lost. There is currently no particularly good solution to this problem.

Guess you like

Origin blog.csdn.net/venus150/article/details/124499056