Skip to main content

Price Indexing

Proposal

Below shows our proposal for the price service. The price service ingest from Nav is consistent for any third party consumer. All that changes is we introduce a price processing service in the Algolia layer.

Common Flow

  1. Gitlab triggers a pipeline via a scheduled event based on currency/timezone. This pipeline starts an instance of Platform - Get Current Prices (dockerized node app)
  2. Get Current Price app requests the current price via the Nav APIGW.
  3. The APIGW requests the current prices based on currency/timezone.
  4. Price data is returned from Nav. The XML data is transformed into the Price Interface at this stage.
  5. Prices are put into our Elasticache (redis) in bulk

Algolia

Price - Nav to Algolia

  1. When the pipeline is complete it will send a finished event back to Gitlab. This will then trigger a cross project pipeline.
  2. The pipeline will need to trigger an instance of the Algolia Price Process (dockerized node app) as well as triggering the respective Hybris and NewStore node applications.
  3. Prices are fetched from Elasticache based on currency and are transformed for Algolia.
  4. Prices are then ingested into Algolia. Depending on our index structure this will either be by updating a single price attribute or getting prices first and updating the price by currency key.
  5. The new prices are then indexed in Algolia.

Fields required in the NAV payload

Price data sent from Nav via the Nav API Gateway require the following fields for each price.

NameDescriptionExampleComments
SKUProduct IDWLO01XXNBPSML
StartDateStart date price2020-10-20T10:00:00ZCurrently not used in either hybris or newstore
EndDateEnd date price2035-10-20T10:00:00ZCurrently not used in either hybris or newstore
PricePrice95
WasPriceWasPrice110
CurrencyCurrency of the priceEUR
TypeCampaign (rccpricegroup, customerpricegroup, archivepricegroup…)customerpricegroup
SourceWEB/RETAILWEB

Resources