Integrating the Strands Recommender service into your store

To integrate the Strands Recommender service into your store in Kentico:

  1. Sign in to the Strands Recommender website.

  2. On the my account page, copy your API ID and Validation Token.

    Getting Strands API ID and Validation token from the Strands website

  3. In Kentico, open the Settingsapplication and navigate to the Integration -> Strands Recommendersettings.

  4. Paste your API ID and Validation Tokeninto the respective fields in the Generalcategory.

  5. (Optional) In the Catalog feedcategory, configure how Kentico generates the Strands catalog feed.

  6. In the Automatic catalog upload category, select the Enable automatic catalog upload check box.

  7. Set the frequency at which the system uploads the catalog feed to Strands.

    Scheduling automatic catalog upload frequency

  8. (Optional) In the Catalog access restriction category, insert a Username and Password for accessing the Strands catalog feed. This restricts the access to the Strands catalog feed, which can otherwise be viewed by anyone with access to the site.

    Using Windows Authentication?

    Note that Catalog access restriction doesn’t work if you are using Windows Authentication to access Kentico.

    Restricting access to the Strands catalog

  9. Save the settings.

    • Note that using the Save button automatically starts a Strands catalog feed upload to Strands.
  10. Open the Strands Recommendations page and set up your recommendation widgets.

  11. Place Strands recommendation widgets onto pagesby placing the Strands recommendations web part.
    – OR –
    Place Strands recommendations into marketing emails.

The Strands catalog transformation

The default Strands catalog transformation, StrandsRecommender.Transformations.CatalogFeedTransformation , handles which fields each of the items in the catalog contains.

The StrandsRecommender.Transformations.CatalogFeedTransformation transformation



<item>
  <id>{% ItemID %}</id> 
  {% foreach (document in LanguageVersions) { %}
     {% cultureCode = document.DocumentCulture.Replace("-", "").ToLower();; #%}
    <title_{% cultureCode %}><![CDATA[{% document.DocumentName #%}]]></title_{% cultureCode %}>
    <link_{% cultureCode %}><![CDATA[{% document.AbsoluteUrl + "?lang=" + document.DocumentCulture #%}]]></link_{% cultureCode %}>
    <description_{% cultureCode %}><![CDATA[{% document.DocumentSKUDescription %}]]></description_{% cultureCode %}>
  {% } #%}

  {% foreach (currency in Currencies) { %}
    {% currencyCode = currency.CurrencyCode.ToLower();; #%}
    <price_{% currencyCode %}>{% Math.Round(SKU.GetPrice(currency), currency.CurrencyRoundTo, "AwayFromZero") %}</price_{% currencyCode %}>
    <cur_{% currencyCode %}>{% currency.CurrencyCode %}</cur_{% currencyCode %}>
  {% } #%}

  <price>{% SKU.SKUPrice #%}</price>
  <image_link><![CDATA[{% GetAbsoluteUrl(SKU.SKUImagePath) #%}]]></image_link>
  <category>{% ItemCategory %}</category>
  <SKUDepartmentID>{% SKU.SKUDepartmentID #%}</SKUDepartmentID>
  <SKUProductType><![CDATA[{% SKU.SKUProductType #%}]]></SKUProductType>
  <SKUSupplierID>{% SKU.SKUSupplierID #%}</SKUSupplierID>
  <SKUManufacturerID>{% SKU.SKUManufacturerID #%}</SKUManufacturerID>
</item>



Note the following properties used in the transformation:

  • ItemID – an ID of each of the items in the content tree. Same for each language version of the item. Sent to Strands as a unique identifier of the item (ID field).
  • ItemCategory – a page type ID. Same for each language version. Sent to Strands as a category field. You can customize how products are categorized.
  • SKU – items of the COM_SKU table, such as SKU.SKUPrice, SKU.SKUDepartmentID, SKU.SKUProductType, and others.
  • LanguageVersions – a collection of every language version of a particular item. Each member of the collection is of TreeNode type and contains columns from the CMS_Document and CMS Tree tables. Such as DocumentSKUName, DocumentSKUDescription, DocumentPageTitle, NodeAlias, and others.
  • Currencies – a collection of the available currencies. Each member is of CurrencyInfo type and contains columns from the COM_Currency table, such as CurrencyCode and CurrencyName.

The <id> and <category> elements must always containthe ItemID and ItemCategory properties. You can customize all the other tags in the transformation.