Configure the Litium Nosto Connector add-on

How to install the Litium Nosto Connector and update templates to work with it.

Configuration

In file Litium.AddOns.Nosto.dll.config:

PageTypes:

  • "nostoPageType" is the type of the supported Nosto recommendations (Do Not Alter)
  • "recommendationsFieldId" is the Id of the created field on Litium Channel (Do Not Alter)
  • "litiumPageType" is the type of Litium page (the values on the config file are currently supported types of Litium pages)

 

Fields (Product & Variant)

  • "name" attribute is for system use on picking up the element and MUST be unique to be picked up otherwise only the first one will be picked by the system
  • "nodeId" attribute vill be shown as class id/name for nosto field elements
  • "litiumId" attribute is the Id of the field in Litium which will get value from

When choosing a multifield from Litium then the Nosto class name will be the Id of the Litium field and value will be the value from that field so "nostoId" will not get printed as a class name on those elements

If you need to override the values from system fields then you need to use the Litium Decorator approach on INostoProductService read more on how to decorate a service.

 

Products synchronization

Add the following ScheduledTask to the solution's web.config

<scheduledTask type="Litium.AddOns.Nosto.ProductSynchronizationScheduler, Litium.AddOns.Nosto"  startTime="00:00" interval="1h"/>

Sending updates to Nosto through REST API, approach: Recrawling and Discontinuing Products when:

  • BasProduct/Variant information updated
  • BasProduct/Variant Category relations changed
  • BasProduct/Variant ProductList relations changed
  • BasProduct/Variant Channel relations changed
  • Variant PriceListItemUpdated
  • Campaign Activated/Deactivated on Actions: ReducePriceByPercentageAction and ArticleCampaignPriceAction WHEN NO CONDITIONS INCLUDED 
  • Inventory quantity changed

 

Channel settings in Litium backoffice

nosto-channel-settings.PNG

Settings you need fill:

  • Enable/disable the Nosto addon
  • Nosto Account number, EmailTokena, and ProductToken you will find from your nosto backoffice.
  • NostoRecommendations: The Id of Nosto recommendation block you will find in Nosto backoffice on the Recommendations page. Note this is only needed for pages that have no landing page in Litium Websites module like Product-page, then some code needs to be added in the cshtml page to fill it with the Nosto recommendations block. On the pages with a landing page, you can use the Litium Recommendations Block created automatically on installation, you only need to fill it with the Id of Nosto Recommendations Placement. See image:
  • nosto-recommendations-block.PNG

 

Quick verification

On product/Category/Brand and Search pages click F12 and check the Nosto tags under div id="Globalnotification" / div class="nosto_product"

Nosto recommendations will appear on the end of the main body of the page above Footer also inside div id="Globalnotification". Styling of recommendations block should occur in Nosto backoffice. For more information on how to create recommendations refer to your Nosto accounts dashboard.

For quick verification of whether the Nosto connector works, just add the text ?nostodebug=true into the url:

http://yourdomain/?nostodebug=true

You can also expose your local environment to the outside by using Ngrok tool.

This also can help in future testing.