Catalog service methods
Version:
Service providers are wrapper objects designed to make it easier to interact with Connect pipelines. The providers implement no logic other than calling Connect pipelines. All of the business logic is implemented in the pipeline processors.
The Catalog service provider contains the following methods for interacting with catalog search data.
ProductSorting method
ProductSorting method
| Name: | ProductSorting |
|---|---|
| Description: | A method to let Commerce Connect know when a user has performed a page sort, so that the event can be tracked in xDB. Calls the productSorting pipeline. |
| Usage: | Called from Sitecore when a user performs a sort. |
| Signature: | CatalogResult ProductSorting(ProductSortingRequest request) |
| Input: | |
| ShopName – string. Mandatory The name of the shop. | |
| SortKey **–**string . Mandatory The field that was sorted on in the search. | |
| SortDirection –SortDirection . Mandatory The direction in which the search was sorted, that is, Asc or Desc. | |
| Output: |
Usage example:
FacetApplied method
FacetApplied method
| Name: | FacetApplied |
|---|---|
| Description: | A method to let Commerce Connect know when a user has tried to facet some search information, so that the event can be tracked in xDB. Calls the facetApplied pipeline. |
| Usage: | Called from Sitecore when a user facets on search results. |
| Signature: | CatalogResult FacetApplied(FacetAppliedRequest request) |
| Input: | |
| ShopName – String. Mandatory The name of the shop. | |
| Facet **-**String . Mandatory The facet field that the search was performed on. | |
| IsApplied **–**bool . Optional Used to indicate whether or not the facet was applied. | |
| Output: |
Usage example:
VisitedCategoryPage method
VisitedCategoryPage method
| Name: | VisitedCategoryPage |
|---|---|
| Description: | A method to let Commerce Connect know when a user visits a category page, so that the event can be tracked in xDB. Calls the visitedCategoryPage pipeline. |
| Usage: | Called from Sitecore when a user visits a category page. |
| Signature: | CatalogResult VisitedCategoryPage(VisitedCategoryPageRequest request) |
| Input: | |
| ShopName – String. Mandatory The name of the shop. | |
| CategoryId **-**string . Mandatory The ID of the category the user visited. | |
| CategoryName **– string.**Mandatory The name of the category the user visited. | |
| Output: |
Usage example:
VisitedProductDetailsPage method
VisitedProductDetailsPage method
| Name: | VisitedProductStockStatus |
|---|---|
| Description: | A method to let Commerce Connect know when a user visits a product details page, so that the event can be tracked in xDB. Calls the visitedProductDetailsPage pipeline. |
| Usage: | Called from Sitecore when a user visits a product details page. |
| Signature: | CatalogResult VisitedProductDetailsPage(VisitedProductDetailsPageRequest request) |
| Input: | |
| ShopName – string. Mandatory The name of the shop. | |
| ProductId **-**string . Mandatory The id of the visited product | |
| ProductName **– string.**Mandatory The name of the visited product. | |
| ParentCategoryId – string. Mandatory The category of the visited product. | |
| ParentCategoryName – string. Mandatory The name of the category of the visited product. | |
| Amount – decimal. Optional The price of the visited product. | |
| CurrencyCode – decimal. Optional The currency the user viewed the product in. | |
| Output: |
Usage example:
SearchInitiated method
SearchInitiated method
| Name: | SearchInitiated |
|---|---|
| Description: | A method to let Commerce Connect know when a user performs a keyword search, so that the event can be tracked in xDB. Calls the searchInitiated pipeline. |
| Usage: | Called from Sitecore when a user visits a keyword search. |
| Signature: | CatalogResult SearchInitiated(SearchInitiatedRequest request) |
| Input: | |
| Shop Name – string. Mandatory The name of the shop for which this relates. | |
| SearchTerm **–**string . Mandatory The keywords the user searched for. | |
| NumberOfHits **–**int **.**Optional The number of results found. | |
| Output: |
Usage example:
If you have suggestions for improving this article, let us know!