Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Catalog

Describes Catalog pipelines in Optimizely Configured Commerce.

AddToRecentlyViewedProducts

OrderPipeDescription
100AddToRecentlyViewedProductsAdds to user recently viewed products. If RecentlyViewedEnabledsetting is set to false then bypasses pipe. Stores information about recently viewed products in cookies and also stores this information in database if user is logged in.

CanConfigure

OrderPipeDescription
100CanConfigureSetsresult.CanConfigureto true if product setting CanAddToCartis set to true and product property ConfigurationObjectIdis not null.

CanShowPrice

OrderPipeDescription
100CanShowPriceSetsresult.CanShowPriceto true if product setting CanSeePricesis set to true and product can not be configure.

CheckForReplacement

100CheckForReplacementChecks for replacement product for specifiedSearchCriteriaparameter. If parameterSeachCriteriais blank or product for that text is not found then bypasses pipe. If replacement product is found and it is not the initial product then sets its ErpNumbertoresult.SearchCriteria.

CreateProductDto

OrderPipeDescription
100CreateProductDtoCreatesProductDtoor find him in SearchResultProductDtosparameter ifFoundWithSearchparameter is true.
200CopyProductToProductDtoMapsProductparameter toresult.ProductDto.
300PopulateProductDto

Populates remaining fields for result.ProductDto namely:

  • ProductDetailUrl
  • IsActive
  • IsStyleProductParent
  • QuoteRequired
  • AllowedAddToCart
  • CanBackOrder
  • CanShowUnitOfMeasure
  • CurrencySymbol
  • ProductImages
  • OrderLineId
400PopulateQtyOnHandRetrieves remaining quantity for specified product and sets it toresult.ProductDto.QtyOnHand.
500PopulateCanConfigureAndCanShowPriceCalls CanConfigureand CanShowPricepipelines and populates corresponded fields inProductDto.
600PopulateCanAddToCart

Populates CanAddToCart property. It sets to false in cases:

  • product is not active
  • product setting CanAddToCart is false
  • product is style product parentproduct can be configure
  • product inventory does not allow to add
  • this is configurable product and it uses not a fixed configuration

Also populates CanEnterQuantity with same as CanAddToCart value, and populate CanViewDetails with negated CanAddToCart value.

650PunchoutPopulateCanAddToCartIf the current session is a punchout session andIPunchOutSessionUtilities.CanModifyOrder is false, sets resultCanAddToCart to false.
700PopulateCanAddToWishList

Populates CanAddToWishList property. It sets to false in cases:

  • product setting CanAddToCart is false
  • this is configurable product
  • product is style product parent
750PunchoutPopulateCanAddToWishlistIf the current session is a punchout session, sets resultCanAddToWishlist to false.
800PopulateImagesPopulates small, medium and large images paths, also sets alt text for images.
900PopulateConfigurationDtoCreatesConfigurationDtofor product. If parameterSkipLoadingConfigurationsis true or product is not configurable or has no kit sections then bypasses pipe.
1000PopulateSubscriptionCreates and fillsProductSubscriptionDtoand sets him to ProductDto.ProductSubscription.
1100PopulateCustomerProductFoundsCustomerProductfor current billto and specified product. If user not logged in or CustomerProductnot found then bypasses pipe. Otherwise populates ProductDto.CustomerNameand ProductDto.CustomerUnitOfMeasurewith correspondedCustomerProductfields.
1200PopulateProductDtoProductUnitOfMeasuresIf Product.UnitOfMeasureis blank then bypasses pipe. Otherwise adds it to ProductUnitOfMeasurescollection and populates availability for each ProductUnitOfMeasurein that collection.
1300PopulateProductDtoUnitOfMeasurePopulatesProductDto.UnitOfMeasure, ProductDto.SelectedUnitOfMeasureand ProductDto.Availability. If there is no unit of measure for the product then clears all related to unit of measure fields.
1400PopulatePricing

Populates pricing for ProductDto. Bypasses pipe in next cases:

  • parameter GetPrices is false
  • ProductDto.CanShowPrice is false and pipeline called not for order line
  • product is quote required and pipeline called not for order line
  • product is quote required and user is not saleperson and order status is not QuoteProposed or JobAccepted
1500PopulateCostsPopulatesUnitCostinProductDto.Pricing. If user is not salesperson or pipeline called not for order line then bypasses pipe.
1600PopulateProductStylesPopulatesProductDto.StyledProducts. If product is not a style parent then bypasses pipe.
1700PopulateAttributeValuesPopulates attribute types and values forProductDto. If parameter GetAttributeValuesis false or product has no attribute values then bypasses pipe.
1800PopulateDocumentsPopulates ProductDto.Documents. If parameter GetDocumentsis false then bypasses pipe.
1900PopulateSpecificationsPopulates ProductDto.Specifications. If parameter GetSpecifications is false then bypasses pipe.
2000PopulateCrossSellsPopulates ProductDto.CrossSells. If parameterGetCrossSellsis false then bypasses pipe.
2100PopulateAccessoriesPopulates ProductDto.Accessories. If parameterGetAccessoriesis false then bypasses pipe.
2150PopulateRelatedProductsPopulates ProductDto.RelatedProducts. If parameterGetRelatedProductsis false then bypasses pipe.
2200PopulateWarehousesPopulates ProductDto.Warehousesand warehouses for each styled products. If parameterGetWarehousesis false then bypasses pipe.
2300CopyCustomPropertiesToResultCopies custom properties from parameterProducttoresult.ProductDto.

CreateProductDtos

OrderPipeDescription
100ValidateContextIf parameterProductsis empty then bypasses all pipeline. If parameter FoundWithSearchis true then fillsresult.ProductIdsInOrderwith ids from SearchResultProductDtosparameter, otherwise from Products parameter.
200ProcessReplacementProductsIf parameter ReplaceProductsis false then bypasses pipe. Otherwise tries to find replacement product for each product in parameter.Productscollection.
300ProcessProductRestrictionsIf parameter FoundWithSearchis true or parameter EnforceRestrictions is false then bypasses the pipe. Exclude restricted products fromresult.Productscollection. If products count was decreased then setsresult.NotAllProductsAllowedto true. If there is no products after processing and it is not crosssels or configuration request then returns error.
350CacheIsStyleParentDetermine if each product is a styleparent and cache them in one database call if they are not already in the cache.
400CallProductBatchLoaderCalls BatchLoadmethod in IProductBatchLoaderwith ids of result.Products as parameter.
500GetCategoryIf parameter CategoryIdis not specified then bypasses pipe. Retrieves category for specified CategoryIdparameter and sets it toresult.Category. If category is not found then returns error.
600CreateProductDtosIterates through result.ProductIdsInOrder, for each productid founds product and calls CreateProductDto pipeline.

GetAvailability

OrderPipeDescription
100GetAvailabilityPopulatesresult.AvailabilityDto. If inventory not showed on site or product is not active or product can be configure then returns NoMessage type. If CustomAvailabilityMessageis not blank then returns Availabletype. Ifproduct.TackInventoryis false and product is not discontinued then returns NoMessage type. IfAvailableQtymore than low stock level then returns Availabletype. If AvailableQtyless than low stock level but greater than 0 then returns LowStocktype. Otherwise returnsOutOfStocktype.

GetAlsoPurchasedProducts

OrderPipeDescription
100GetAlsoPurchasedProductsIf parameter ProductIds is null or empty, then bypasses the pipe. If parameter MaxRows is 0, then set MaxRows to value of StorefrontApiSettings.DefaultPageSize. If parameter MaxRows is more than 25, then set MaxRows to 25. Then returns the top MaxRows products from the ProductAlsoPurchasedWith table, using a select on ProductId IN ProductIds ordered by WeightedScore descending in a collection named AlsoPurchasedProducts.

GetFrequentlyPurchasedProducts

OrderPipeDescription
100GetFrequentlyPurchasedProductsGets 5 most purchased products and sets theirErpNumbersto theresult.ProductErpNumbers. If user is not logged in then bypasses pipe.

GetRecentlyViewedProducts

OrderPipeDescription
100GetRecentlyViewedProductsGets recently viewed products and sets pairs of their ErpNumberand view date to the result.Products. If RecentlyViewedEnabled setting is set to false then bypasses pipe.

PerformProductSearch

OrderPipeDescription
100CheckForReplacementChecks for replacement product by calling CheckForReplacementpipeline.
200GetSearchResultsGets search results by calling GetSearchResultsmethod fromIProductSearchProviderand sets them to result.ProductSearchResult.
300GetAutoCorrectedSearchResultsGets autocorrected search results. If ProductSearchResult.AutoCorrectSuggestion is null then bypasses pipe. Otherwise re-get product search results for autocorrected query and if results contains products then update result.ProductSearchResultwith autocorrected results.
400TranslateAttributesFor each attribute type inProductSearchResult.AttributeTypeDtosfills NameDisplayand ValueDisplayfields with translatedNameandValuefields.
500SetSelectedPriceRangesFor each price facet sets Selectedproperty to true ifProductSearchParameter.PriceFilterscontains value of hisMinimumPrice property. Bypasses pipe when parameter CanShowPriceFiltersis false or current currency is not default.

ValidateAndReplaceProduct

OrderPipeDescription
100ValidateAndReplaceProductFinds replacement product and check if he can be showed to user. If product is found then sets him toresult.Product, otherwise setsnull.