Spike - Hybris investigation on status for products that are OOS vs Unapproved
Current status (stakeholder meetings summary) & Goal
- For Digital Merch, products are unapproved in Hybris in cases where we do not want to show them on the website and we do not want them to be indexed. Currently when products are unapproved, the assets are not moved or deleted.
- There are (roughly) three reasons/scenarios that Digital Merch might unapprove a product
- It is out of stock.
- We are awaiting stock for a new product that hasn't launched yet
- The product is no longer for sale. Sometimes products are only unapproved for a few days, e.g. whilst waiting for end of season sale to start.
- If we want to delete unapproved assets or move them to cold storage, we may need 2 statuses in Hybris - one for when a product is no longer being sold and therefore is actually unapproved, and another for when a product might be only temporarily unapproved or on hold i.e. out of stock or awaiting stock. In the case where a product is no longer being sold and it is not going to be displayed on the site anymore, we can move that asset to cold storage.
- Before sending an asset to cold storage we could implement a process such as the user unapproves the product in Hybris, then a notification is sent to Merch to say which assets associated with that product are going to be removed from Cloudinary and then we could say we will automatically delete them in 5 days or it could be a manual action to approve the removal
Goal: In order to not delete and move images for products that are simply OOS we should create a new status that is before unapproved. Unapproved should only be used in the instances where products are actually discontinued.
Questions
Does this have any impact on our current catalog?
Can we bring this in without effecting what is synced on SOLR or anyother aspect in hybris or other current hybris integrations with third parties?
Options
1 - Use Check status
Out Of The Box Check status is status that the products use when the are created in hybris from NAV, but currently we have more than 400 base products in production (some of them very old) that use these status, so it is used for other purposes. So, in this case, this status can be perfeclty used for not showing a product in the PDP and PLP views without impacting the current mainline behaviour.
So, for the previous described scenarios:
- If the product is out of stock, we should update the product with check status
- If we are awaiting stock for a new product that hasn't launched yet, we should use the Check status too, this is something that we currently must be doing in Mainline, the products are created with this status when they are imported from NAV
- If The product is no longer for sale, it must be unapproved. Sometimes products are only unapproved for a few days, e.g. whilst waiting for end of season sale to start. in this case we can use Check status instead of unapproved.
We could also send a notification to merch when the status change to check before execute the cold storage.
PROS
- Use OOTB status, not need of unnecessary changes.
- Doesn't generate any error, not interfere with current mainline processes because is a OOTB status.
- Not requires implementation (Only the one related with the cold storage process).
- Not requires deployment(Only the one related with the cold storage process).
- Not requires DB Update.
CONS
- N/A at the moment
2 - Use unapproved status in combination with other attribute
With this option the status management is the same, but we can look into other attributes to decide to move a assets to a cold storage. Possible options:
Based on Email Me When Available Flag
We can deduce that if this flag is activated in hybris is because a product has no stock, but we are expecting to receive more, so, we give the customer the posibility of receinving an email when the stock is restored.
The cold storage option could be triggered if a product is unapproved and this flag is false (or the corresponding notification to Merch). In that case we could assume that the product has been finally unapproved.
We could also have a cronjob that check what products are candidate for asset cold storage, we could check products unapproved and with a false value in the flag that have not been modified in a long period of time (for example 1 year).
Based on Stock Levels
Using a cronjob we could move to cold storage unapproved products with 0 stock level in all their warehouses (DC-UK, DC-HK, DC-US), that have not been modified their stock in a long period of time (for example 1 year).
Add a new flag "mark as..."
Add a new flag to the product that marks a product to cold storage their assets if it is unapproved. Then, a cronjob executed periodically could check what products must be the ones proccessed.
For all the options, we could also send a notification to merch when the status change to check before execute the cold storage.
PROS
- In the most of the options not require add new attributes to the product, not DB update.
- Doesn't generate any error, not interfere with current mainline processes.
- Not requires implementation (Only the one related with the cold storage process).
- Not requires deployment (Only the one related with the cold storage process).
- Not requires DB Update for the most of the options.
CONS
- If we add a specific flag "mark as..." it will require a DB update.
3 - New intermediate status
New status for temporary unapproved products. Instead of calling it Out of Stock, we should call it something like "Temporarily Unapproved" or similar. The reason is that if we call it "Out of stock" it could be confusing for the HMC users since the concept of "out of stock" in hybris is very specific to the stock levels associated with size variants, and, at a given moment on time, the stock status of a base product or its style variants is calculated based on the stock levels of the sizes and other additional flags.
This status will keep the behaviour of unapproved, so we should add the logic to trigger the cold storage only when the product is really unapproved.
PROS
- Valid for PDP
CONS
- Possible impact in Hybris logic:
- After some smoke tests, some kind of failure in the SOLR indexation process was found, more investigation and debugged is needed.
- Requires more exhaustive tests & search of possible failures in all the functionality implemented in hybris related with products, basic catalog functionality, historic orders, reports, old carts.
- Requires more exhaustive tests of the third party integrations that expose hybris catalog, exponea/newstore.
- Requires deployment
- Requires DB Update
CONCLUSIONS & DOUBTS
Instead of adding a new approval status to the product, which would only be used to delete assets, it may be convenient to treat this using OOTB Check status, or one of the product's existing attributes or an ad-hoc specific one. It would be easier and requires much less testing time.
If a product is set as unapproved and their assets are finally moved to a cold storage, Does it make any sense to implement a way to revert/move assets from cold storage in case this product changes state again?