Native support of expired products
The planner has two native behaviors when encountering expired products:
- expired products are never displayed in the catalog, so it is not possible to add an already expired product to a project.
- when opening a project containing expired products, the project price displays "price unavailable" (this message can be configured through translations) instead of the real project price.
Some applications add a user-friendly workflow to better handle expired products by implementing an applicative rule. You can find more details in the associated application documentation.
Templates with expired product(s) are still visible in the planner, and they display "price unavailable" instead of the real price. Once validated, such templates behave as if the user had loaded a project with expired products.
It is the range maintainer's responsibility to remove/modify templates that contain expired products.
Here are some general guidelines about range maintainance when you have to set an expiration date on a product.
If your expired product is a generic product, there is no particular requirement about its mapping products. Indeed, the planner only works with generic products so there won't be any issue to detect the unavailability.
However, to keep a clean and logical range, we recommend to also set all the mapping products as expired, unless they are reused by another generic product.
If your expired product is a mapping product (article), then we strongly recommend you follow these steps:
- add the end-date on the article product
- increase the priority of this mapping to a higher value
- before we get to the expiry date, add a replacement article in the mapping that uses the same condition, and a lower priority
- so until we reach the expiry date, the planner still uses the initial product, but as soon as it gets expired, it uses the new one
- if you don't want to offer a substitute product it is possible to ignore this step, but be aware that the planner will pick the expired mapping if there is no other choice (leading to un unavailable project price)
- after the expiration date, you can remove the former mapping if you want to clean up, but it is not mandatory
Lastly, if you have to expire all of the mapping products at once, we recommend you also set the generic as expired and recreate a new generic + new mappings.
After we reach the expiration date of a product, you might be tempted to clean your range by getting rid of the mentions to this product. Though you can clean some of it up, there are some strict rules to follow in order to ensure error-free project re-openings:
- Delete the product: NO. You have to keep it in your range.
- Remove it from its catalog if it was in one: YES, but it is not mandatory as expired product will never show up in the planner catalogs.
- Remove it from the default value of other products parameters: YES, and it is recommended to do so.
- Remove it from the possible value of other products parameters: NO. User projects can be modified at re-opening if you do so.
- Remove it from the product mappings: ON SOME CONDITIONS, see the section above.
- Remove it from product-rules: NO. User projects can be modified at re-opening if you do so.
- Remove it from applicative-rules overloads: NO, generally speaking. Of course the ExpiredProductRule is an exception.
- Remove it from the application default style : YES.