电子商务库存管理的最佳方法

发布于 2024-10-06 17:05:50 字数 75 浏览 2 评论 0原文

协调实际库存数量与购物车中显示或出售的库存数量的最佳(或者可能是最常用)方法是什么?

提前致谢, 马特

What are the best (or perhaps most commonly used) approaches for coordinating actual stock quantities with that shown or offered for sale with a shopping cart?

Thanks in advance,
Matt

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

醉生梦死 2024-10-13 17:05:50

嗯,你有几个问题。

在基本层面上,它是“简单的”。只需使用经典的事务处理技术来维护库存编号和针对库存的订单输入行。如果您有 10 个可用商品,而某人订购了 1 个商品,则在增加库存商品的“已提交”数量的同时,提交数量为 1 的行商品。发货时,从库存中删除一件,从已提交中删除一件。库存 - 承诺 = 可用。

所以:

          In Stock   Committed    Available
 Before:     10          0           10
Ordered:     10          1            9
Shipped:      9          0            9

缺点是涉及大量锁定,这可能会影响并发性。根据您的流量,这可能是也可能不是问题。然后,您需要根据库存即时计算订购的商品,最终会出现竞争条件。但这确实是商业生活中的一个事实。

但是,无论哪种方式,无论您如何将条目提交到数据库中,并不意味着该商品将实际发货。

库存数量可能根本就是错误的。它可能被输入错误,库存可能被损坏,“员工缩减”等等。各种各样的事情都可能出错。因此,您向客户做出的任何承诺,即您将实际运送您所承诺的东西,都必须在其旁边有一个小*作为免责声明。

然后你就会遇到整个延期交货、取消和履行问题。

Well, you have several problems.

At a basic level, its "easy". Simply use classic transactional processing techniques to maintain the stock numbers and the order entry lines against the stock. If you have 10 available, and someone orders 1, then commit the line item with a qty of 1 at the same time you increment the "committed" qty on the inventory item. When you ship the item, remove one from In Stock, and one from Committed. In Stock - Committed = Available.

So:

          In Stock   Committed    Available
 Before:     10          0           10
Ordered:     10          1            9
Shipped:      9          0            9

The down side is that involves a bunch of locking, which can affect concurrency. Depending on your traffic this may or may not be an issue. Then you're work with on the fly counting of ordered items against stock, and you end up with race conditions. But it's really just a fact of life in business.

But, either way, regardless of how you commit the entry in to your database, it doesn't mean that the item will actually ship.

The In Stock number could simply be wrong. It could have been miskeyed, stock may be damaged, "employee shrinkage", etc. All sorts of things can go wrong. So, any commitment you make to a customer that you'll actually SHIP what you've promised has to have that little * next to it as a disclaimer.

Then you get in to the whole back ordering, cancellation and fulfillment issues.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文