Retain Snapshots - Inventory


My current Inventory database is giving me the On Hand Qty, Value, etc… as of NOW (current date), but I am thinking of utilizing the Retain Snapshots to start gathering historical data. For example, if we currently have 50 on hand of Item A, I might want to know how many Item A we had on hand last week. We may also want to know how many we average on a monthly basis.

Anybody in the group utilize the Retain Snapshots for their Inventory databases? Is there any storage concerns or anything else to keep in mind?

My sql for my Inventory database is currently using GETDATE(), which creates my date_id and then my SYNC runs each morning at 05:00.



I don’t have a response for you, but I’m also interested in this topic and echo your question to the PUG community.


I use retained.
Storage, not so much of a concern.

Keep in mind, yup - The key thing is if you need to change the dataset after you initialize it. As you may loose your history, so I tread very carefully when making alterations. If you need to change the dataset I would recommend that you export the data out of Phocas and use all the history as part of your new upload as a one off. When you create a snapshot a new field is created for you, heres mine:

Youll notice the “historicStockSatusPrePhocas”, this was from our first attempt and the dataset changed. So I exported the data and uploaded as static feed.

I do map to the SyncMoment field after a calculation, but (not trying to boggle peoples brains here!) the date is always 5am on the 1st, which is actually reporting status of the end of the prior month, so I did this to align the stock dates:
I use the above as the date.

Hope that helps.


1 Like

@JonKemp excellent information and very helpful.

Thanks for the response!

1 Like