# Product status rules The purpose of the Product status in Norce Commerce is to represent the product life cycle. All products are “born”, they live for a (sometimes very long) while until they die. These statuses guide the commerce front ends on what products are ready to be sold, what should be accessible in searches or listings, and what should be hidden in certain situations etc. Many ERP systems have something similar to Norce Commerce's status that can be either more complex or simpler. If that is the case, the solution must provide some sort of mapping between the ERP and Norce. Additionally, Norce also has a built-in functionality that adds automatic status changes in certain scenarios for products. All Norce Commerce Services calls that fetch products allow the addition of one or multiple status Id's, enabling you to specify whether only active products or inactive products should also be included in the search. This means that even hidden products may be searchable in certain situations. > *statusSeed* is the input parameter in Norce Commerce Services on almost all calls that returns products. ## Norce Commerces built-in Statuses | Id | Status | Description | | --- | --- | --- | | 1 | `Active` | Open products that are currently available for sale. | | 2 | `Coming` | Products that are not yet available for sale but will be in within a foreseeable future. | | 3 | `Expiring` | Products that are currently available for sale but will be closed when they are out of stock. | | 4 | `Hidden` | Available for sale in special cases, but to not shown in product listings or search results. Sometimes used for temporary not sellable products. | | 5 | `Inactive` | Closed, not available for sale. | | 6 | `Not activated` | Supplier products that has not been created yet and has not yet received a part number. | Note In product listings, it is common to fetch products that are *Active* and *Expiring* (1,3), while leaving out *Coming* products (2) that are not yet ready for sale. For special cases, such as accessory products that should not appear in listings but may be included in specific searches, *Hidden* products (4) can be added to the listings. ## How products moves through statuses Norce Commerce provides multiple options to modify the product status. Besides manually changing the status, the platform also has built-in rules and configurable settings that automate some parts of the product lifecycle. > Optional rules can be set up under client settings in the **Admin UI > *“sku status automation”***. ### 1 Product creation ```mermaid %%{init: {'theme':'default'}}%% graph TB Manually([Manually created]) -- Excel or UI --> ProductCreation{{Product creation}} Source([From other systems]) -- Connect integration --> ProductCreation NotActive[Not activated] -- Creation rule --> ProductCreation ProductCreation --> Active[Active] ProductCreation -- Common practice --> Coming[Coming] ProductCreation --> Hidden[Hidden] ``` Product can be created in Norce in 3 different ways: - **Manually** in the Admin UI, where you can set the new product to any status you want. - From an **integration** or **import**, using Norce Commerce Connect. Here you can also set the product to any status you want. - From product **creation rules**. On every rule you can configure it to set any status you want. Note A common practice is to set the status to *Coming* if the products should be enriched with texts, images etc. before being sold. Otherwise, the products can be set to *Hidden* or *Active* directly. ### 2 Product activation ```mermaid graph LR Coming[Coming] -- Triggered by start date --> Active[Active] Any[Any status] -- Manually changed --> Active Any -- From integration --> Active Coming -- And has setting --> Setting([In-stock rule]) Setting -- Triggered when product gets in stock --> Active ``` When a product is created with the `Coming` status, there are a couple of ways to get them activated: - The **start date** has arrived. If a start date has been set for a product with the `Coming` status, Norce will automatically change the status to `Active` early in the morning on the activation day. - The status can be changed manually to `Active` in the Admin UI when the product is ready. - Update status from **another system** using Norce Commerce Connect or excel import. Optional rules Additionally, you can configure a setting that automatically activate coming products when they are in stock. (the rule: *“Set sku status coming to active when in stock”*) Read about [in-stock based rules below](#in-stock-based-rules). #### Revert status to “active” ```mermaid graph LR Any[Any status] -- Manually changed, excel or integration --> Active[Active] Old[Expiring or Inactive] -- when product gets suppliers --> Active Hidden[Hidden] -- And has setting --> Setting1([In-stock rule]) Hidden -- And has setting --> Setting2([Image rule]) Setting1 -- Triggered when product gets in stock --> Active Setting2 -- Triggered when product gets a main image --> Active ``` All statuses except for `Coming` can revert back to `Active`. - Change it **manually** in admin to `Active` when the product is ready. - Update status from **another system** using Norce Commerce Connect or **excel import**. - `Expiring` and `Inactive` products will **automatically revert** to `Active` if the product suddenly gets `Active` suppliers again. (*but only if they were set to expiring earlier by rules, not if they were set manually*) Optional rules *Hidden* products can automatically be set to *Active* by two configurable rules: - If *“Set sku status to hidden when out of stock”* is set, the product will be activated if the product is back in stock. - If *“Set sku status to hidden when no image”* is set, the product will be activated if an image has been added to the product. Read about [in-stock based rules below](#in-stock-based-rules). ### 3 Make products hidden ```mermaid graph LR Any[Any status] -- Manually changed, excel or integration --> Hidden[Hidden] Active[Active] -- And has setting --> Setting1([In-stock rule]) Active -- And has setting --> Setting2([Image rule]) Setting1 -- Triggered when product is out of stock --> Hidden Setting2 -- Triggered when product missing a main image --> Hidden ``` When a product is in the `Active` status, it can be set to `Hidden` using the following methods: - Change it **manually** in the Admin UI. - Update status from **another system** using Norce Commerce Connect or excel import. Optional rules There are two population rules that apply here: - The *“Set sku status to hidden when out of stock”* rule sets the product status to *Hidden* when it is out of stock. - The *“Set sku status to hidden when no image”* rule sets the product status to *Hidden* when there is no main image available. Read about [in-stock based rules below](#in-stock-based-rules). ### 4 Products are expiring ```mermaid graph LR Any[Any status] -- Manually changed, excel or integration --> Expiring[Expiring] Active[Active] -- Triggered by end date --> Expiring Active -- when product has no suppliers any longer --> Expiring Hidden[Hidden] -- And has setting --> Setting1([In-stock or image rule]) Setting1 -- Triggered when product has no suppliers anymore --> Expiring ``` For products that are set to `Active` there is a few ways to make them move to `Expiring`: - You can **manually** change their status to `Expiring` in the Admin UI, or through Norce Commerce Connect using either a **system integration** or an **Excel import**. - If the **end date** for the product has passed, Norce will automatically change its status to `Expiring` early in the morning. - If the product has **suppliers** connected to it, but all of them are marked as `Inactive`, Norce will interpret this as the suppliers no longer including the product in their catalog, and will automatically change its status to `Expiring`. Optional rules When it comes to *Hidden* products, two population rules apply in this case. The rules work similarly: if the hidden products only have suppliers with inactive connections, the products will be set to *Expiring*. The two rules are: *"Set sku status to hidden when out of stock"* and *"Set sku status to hidden when no image"*. Read about [in-stock based rules below](#in-stock-based-rules). ### 5 Expired products ```mermaid graph LR Any[Any status] -- Manually changed, excel or integration --> Inactive[Inactive] Expiring -- when product is out of stock --> Inactive Expiring -- And has setting --> Setting1([supplier stock]) Setting1 -- Triggered when product has neither supplier nor local stock --> Inactive ``` For products that are set to `Expiring` there are a few ways to make them move to `Inactive`: - You can **manually** change their status to `Inactive`, in the Admin UI, or through Norce Commerce Connect using either a **system integration** or an **Excel import**. - When the product is **out of stock** (*and the optional rule below is **not** set*). Optional rules The rule *“Set sku status expiring to inactive when out of supplier stock”* checks if the *Expiring* products are out of stock at the suppliers as well as in the local stock. Unless all are out, the product will not be set to *Inactive*. Read about [in-stock based rules below](#in-stock-based-rules). ## Exceptions to the status rules ### Locked status In the Admin UI, next to the product status, there is a lock symbol. If you click on it, you will "lock" the status on its current value. Once locked, no rules, imports, or system integrations can change the status. You must unlock it to be able to change the status again. ### Manual sku status changes Optional rule There is an optional rule called *“Manual sku status changes”*, which will tell Norce to **disable all automations** regarding product statuses. This rule can be used if you want to handle product statuses manually or from a source system such as the ERP (by using the Norce Commerce Connect). ### In-stock based rules For status rules based on inventory levels, Norce Commerce looks at all warehouses that are of the type *Warehouse*. Warehouses with the type *Store* or *Other* are ignored. For supplier On Hand, all warehouses are checked where *“included in stock calculations”* is set to true on the warehouse. Optional rule There is an optional invisible setting that can be used to change which warehouse types are checked in this rule. This setting allows you to use any other warehouse type or a set of types for the rule. ### IsDropShipOnly For products that are set to `IsDropShipOnly`, or if its primary category is set to it, the in-stock check will only be done on the *Suppliers* stock, never on the local stocks. > Products (or whole categories) can be marked as `IsDropShipOnly`, which means that they are always handled as dropshipping products, even if there are products in the local stock. ## Suggested further reading - Product lifecycle TODO