Additional Controls

IsActive, publish dates, inventory, and other product visibility controls

Beyond the main assortment mechanisms, Omnium provides several additional controls for fine-grained product visibility management.


IsActive Flag

The most fundamental visibility control is the isActive flag.

Product Property

{
  "id": "product-123",
  "isActive": true
}

Filtering Behavior

SettingBehavior
filterByActiveAsDefault: trueProduct search defaults to isActive = true
filterByActiveAsDefault: falseAll products shown unless filtered

API

PATCH /api/Products/{productId}
{
  "isActive": false
}

The isActive property is always indexed, meaning you can filter by isActive = false to find inactive products.


Publication Dates

Control when products become visible and when they should be hidden.

Date Properties

PropertyTypeDescription
publishedDateTime?When the product becomes visible
stopPublishedDateTime?When the product should be hidden
discontinuedDateTime?When the product was discontinued

Example

{
  "id": "product-123",
  "published": "2025-02-01T00:00:00Z",
  "stopPublished": "2025-03-31T23:59:59Z",
  "discontinued": null
}

Publication Logic

A product is considered "published" when:

  • isActive = true
  • published is null OR published <= now
  • stopPublished is null OR stopPublished >= now

Use Cases

Pre-Launch Products:

{
  "published": "2025-06-01T00:00:00Z",
  "isActive": true
}

Product exists but won't appear until June 1st.

Time-Limited Products:

{
  "published": "2025-01-15T00:00:00Z",
  "stopPublished": "2025-01-31T23:59:59Z"
}

Product visible only during promotional period.

Phasing Out:

{
  "discontinued": "2025-01-01T00:00:00Z",
  "stopPublished": "2025-03-01T00:00:00Z"
}

Product marked discontinued, will be hidden after March 1st.


Product Status

Beyond IsActive, products can have a status field for workflow management.

Status Property

{
  "status": "Published"
}

Common Status Values

StatusDescription
DraftWork in progress, not visible
ReviewPending approval
ApprovedApproved but not yet published
PublishedActive and visible
DeletedSoft-deleted

Search Filtering

POST /api/Products/Search
{
  "productStatus": ["Published", "Approved"]
}

Configuration

Define available statuses in tenant settings:

{
  "ProductSettings": {
    "ProductStatuses": [
      { "Name": "draft", "TranslationKey": "ProductStatus_Draft" },
      { "Name": "review", "TranslationKey": "ProductStatus_Review" },
      { "Name": "published", "TranslationKey": "ProductStatus_Published" }
    ]
  }
}

Inventory-Based Visibility

Control visibility based on stock levels.

Inventory Properties

PropertyTypeDescription
isInStockboolWhether product has available inventory
inventoryStatusstringStatus like "OutOfStock", "LowInStock", "HighInStock"

Search Parameters

POST /api/Products/Search
{
  "filterByInStock": true,
  "inStockWarehouseIds": ["warehouse-oslo", "warehouse-bergen"]
}

Inventory Status Values

StatusDescription
OutOfStockNo inventory available
LowInStockBelow threshold
HighInStockAbove threshold

Local Products

Products can be marked as "local" to specific stores.

Enabling Local Products

{
  "ProductSettings": {
    "IsLocalProductsEnabled": true
  }
}

Product Property

{
  "isLocalProduct": true,
  "storeIds": ["oslo-store"]
}

Access Control

When isLocalProductsEnabled is true:

  • Local products are only visible to users with access to the associated stores
  • Non-local products follow normal visibility rules

Tags and Exclusions

Products can have tags that affect visibility.

Tag-Based Filtering

POST /api/Products/Search
{
  "tags": ["new-arrival", "sale"],
  "excludedTags": ["discontinued", "hidden"]
}

Special Flags

PropertyTypeDescription
isNotRatableboolExclude from rating systems
excludeFromPromotionsboolExclude from promotional displays
isExcludedFromAnalyticsboolExclude from analytics (e.g., gift cards)

Tenant Settings Summary

All visibility-related settings in tenant configuration:

ProductSettings

{
  "ProductSettings": {
    "FilterByActiveAsDefault": true,
    "IsAssortmentStoreIdRequired": false,
    "IsAssortmentCodesRequired": false,
    "RequireProductMarket": false,
    "IsLocalProductsEnabled": false,
    "IsProductAssortmentUpdatedByPrices": false,
    "IsProductAssortmentUpdatedByStoreCategories": false
  }
}

Effect Matrix

SettingWhen Enabled
filterByActiveAsDefaultDefault search shows only active products
isAssortmentStoreIdRequiredProducts must have matching storeIds
isAssortmentCodesRequiredProducts must have matching assortment codes
requireProductMarketProducts must have marketIds to be searchable
isLocalProductsEnabledLocal products restricted by user store access

Search Request Parameters

Complete list of visibility-related search parameters:

ParameterTypeDescription
isActivebool?Filter by active status
storeIdstringFilter by store
marketIdstringFilter by market
customerIdstringApply customer restrictions
assortmentCodesList<string>Filter by assortment codes
filterByInStockboolOnly show in-stock products
productStatusList<string>Filter by status values
tagsList<string>Include products with these tags
excludedTagsList<string>Exclude products with these tags
ignoreCustomerAssortmentboolBypass customer restrictions
isAssortmentCodesRequiredbool?Override tenant setting

Filter Combination Logic

All visibility filters are combined with AND logic:

Final Result =
    StoreId Match
    AND MarketId Match
    AND AssortmentCode Match (if applicable)
    AND Customer Category Match (if applicable)
    AND IsActive = true (if filterByActiveAsDefault)
    AND Published Date Valid
    AND StopPublished Date Valid
    AND Inventory Available (if filterByInStock)
    AND Status Match (if specified)
    AND Tags Match (if specified)
    AND NOT ExcludedTags

Best Practices

Layered Visibility

Use multiple controls for different purposes:

  1. IsActive: Master on/off switch
  2. Published/StopPublished: Temporal control
  3. Status: Workflow management
  4. Assortment: Channel/customer control

Performance Considerations

  • Use filterByActiveAsDefault: true to avoid scanning inactive products
  • Index frequently-filtered fields as Keywords
  • Use date ranges sparingly in large catalogs

Audit Trail

Key fields for tracking visibility changes:

  • modified timestamp
  • modifiedBy user
  • Product event log (if enabled)

Troubleshooting

ProblemCauseSolution
Product not visible anywhereisActive = falseSet isActive = true
Product appeared then disappearedstopPublished date passedUpdate or remove stopPublished
Product not visible despite being activeMultiple filters not passingCheck all visibility properties
Can't find product in adminfilterByActiveAsDefault enabledSearch with isActive: null
Product visible when it shouldn't beDate filter not appliedVerify date formats and timezone