Memento DB to track multiple warehouse?

548 views
Skip to first unread message

Glen Lee

unread,
Feb 2, 2017, 12:45:48 AM2/2/17
to mementodatabase
Can memento database be used to track stock inventory on different warehouses?

Is it possible to have 3 libraries, 1 for each warehouse

For example
WAREHOUSE A (1st library)
stock 100

WAREHOUSE B (2nd library)
stock 0

WAREHOUSE C (3rd library)
stock 0

If I transfer 10 stocks from Warehouse A to B
WAREHOUSE A will be 90
WAREHOUSE B will be 10

Is this possible?

Bill Crews

unread,
Feb 2, 2017, 1:18:28 AM2/2/17
to mementodatabase
It is certainly possible. However, normally, you would have a library for each THING TYPE. So, a warehouse would make a library, say Warehouses, where each entry would be a warehouse. It would contain fields pertaining to each warehouse, like the address, phone, maybe type of items stored at that warehouse, etc.

The actual contents of the warehouse -- the warehouse items or stock -- would normally be stored in its own separate library, maybe called Stock, with fields describing the stock items themselves, like item number, quantity on hand, pallet or lot, bin or location, etc. Each entry would probably represent an item type (model, pet number), or if the stock is serialized, it might contain an entry for each individual item, or serial number. In fact, if the stock is serialized, you might make that three libraries: Warehouses, Products, and Items -- indexed by warehouse number, product (part, model) number, and serial number, respectively.

Memento allows an entry of a library to link to an entry of another library, so camera (item) EJ4682-3 might link to model number EOS-250, and one of those two entries would link to warehouse 5 -- if each warehouse holds all cameras of a given model, then EOS-250 might link to warehouse 5, but if any warehouse might hold any item, then you'd have each item (in this case EJ4682-3) link to warehouse 5.

Of course, a real implementation would probably deal with more detail, like, lots, bins, etc, and depending on how much you want to track on those, you might have more libraries, like Bins or Lots. It's up to you. Memento is very powerful, without being complex to use.

Glen Lee

unread,
Feb 3, 2017, 12:51:54 AM2/3/17
to mementodatabase
Thanks for the info.
Is there a sample database that demos the transfer of stock from 1 warehouse to another? Cant seem to figure that part out. Or does it only exist with the pro version?

Bill Crews

unread,
Feb 3, 2017, 1:59:01 AM2/3/17
to mementodatabase
I don't know your process -- if this is a manufacturing workflow, an order fulfillment process, or what, so I'll just pick a typical example -- order fulfillment.

The model typically has libraries for Customers, Products, Orders, and Order Items; in your case, you're tracking the warehousing of the product, so we'll add Warehouses, Warehouse Items (inventory), Warehouse Receipts, Deliveries, and Delivery Items.

Unfortunately, I don't (yet) have reference implementations to show you, but the data structure is pretty straightforward, with a quantity on hand in the warehouse, probably in library Warehouse Items, a quantity ordered in Order Items, and a quantity shipped/delivered in Delivery Items.

There are many variations on how to do it, but they are usually pretty similar. They all get to one point and have an issue to deal with. How and when do you adjust quantity on hand?

If the implementation is purely analytical, it is best to keep the data at its origin and not even store quantity on hand; rather, just compute it when you want to show it. That involves spinning through the Order Items and Delivery Items, getting a net change, and comparing that to Warehouse Receipts to get a final figure. In Memento, that's a trigger script written in JavaScript.

If your implementation is more operational or even transactional, you might maintain the quantity on hand within Warehouse Items and handle the incoming orders and outgoing shipments in a real-time fashion. Once again, in Memento, the solution for this is a trigger script written in JavaScript, but a shorter one that merely updates the quantity on hand each time a new entry comes into Order Items or Delivery Items -- no spinning through whole libraries to compute anything.

If you tell us a little about your business process and maybe also the way you might be thinking to implement the system, we can zoom in to more specific topics.

Andre Lam

unread,
Nov 14, 2017, 4:05:57 PM11/14/17
to mementodatabase
Hello!
I also need exactly that - control the stock, so when a product is sold, the Remaining quantity is updated.
I have Sales and Stock libraries. 
In Sales library I select what product is sold and how many of it. So, i want that amount be subtracted from that product's amount in Stock library.

Unfortunatel i dont have any knowledge of JS, so please help or share a script that does that.
Sorry for asking too much )!!!

Bill Crews

unread,
Nov 14, 2017, 4:57:55 PM11/14/17
to mementodatabase
Well, it turns out that Memento 4.4 is about to come out in the next couple of weeks, and it finally has features designed to enable solutions of this kind. First, I will help get the wiki pages added and updated. Then, I will implement some examples and make them available in the wiki.

The canonical example is inventory management. One could previously not do such a thing with Memento. So, I'll implement that, put it in the wiki, and post in the forum that it exists, so people will know about it. And who knows? Maybe I'll create a template and put it in the catalog, also.

Stay tuned. If you're a beta user, you can try it out now, I think, but I'll need some time to do my thing.

Laura Szczuczak

unread,
Nov 15, 2017, 4:35:37 AM11/15/17
to mementodatabase
Thank you for the update Bill, I am also interested to implement an inventory management and it will be great for us to have examples. 

And thank your amazing contributing to the wiki, Bill, it is so helpful for those like me who are struggling with JS sometimes..

Best,
Laura

Bill Crews

unread,
Nov 15, 2017, 11:14:19 AM11/15/17
to mementodatabase
This makes me happy. :-)

Agassi Charch

unread,
Nov 16, 2017, 5:00:04 PM11/16/17
to mementodatabase
Bill, you are very generous person,sharing your knowledge and experience in so many ways!
Thank you!

I will sign to beta testing to try it now,im very curious!

Agassi Charch

unread,
Mar 9, 2018, 5:39:24 PM3/9/18
to mementodatabase
Hello, Bill!
Did you have time to create an example for stock control?
Reply all
Reply to author
Forward
0 new messages