Skip to main content

Using Algolia Extension

Introduction

Algolia extension significantly enhances selected Sales Channels by optimizing Product Listing Pages (PLPs), refining search word predictions, and improving filters. The data flow involves transferring information from the platform to Algolia, where it is stored and powers storefront listing pages. While the data can be obtained through a catalog data loader, the Algolia extension elevates accuracy in results and search predictions, optimizing search-to-result time.

Key functionalities include indexing, sorting, and mapping for effective data organization. The Auto Complete Menu provides quick, intuitive suggestions, and Search Analytics offers insights into user behaviour. The Data Loader ensures seamless data transfer, while the File Uploader simplifies file uploads. In summary, the Algolia extension comprehensively enhance the search experience, optimizing the functionality and efficiency of Sales Channels in e-commerce.


Steps to Use Algolia Extension

  1. Log in to the Fynd Platform.
  2. Go to the desired sales channel on the Fynd Platform. Here, we have selected the GoFynd sales channel.
  3. Click Extensions.

QG1

Figure 1: Extensions Section - Fynd Platform

  1. Open Algolia extension. Algolia extension dashboard will appear.
note

The users will be able to access the credentials page only when they install the extension for their selected sales channel. Once the mandatory fields are entered in credentials, you will be able to access all the other nine features of Algolia on the dashboard.

QG1

Figure 2: Algolia Extension


Credentials

Setup

  1. Open Credentials.

QG1

Figure 3: Credentials

  1. Enter the Algolia's API Keys in this section to complete the setup for the Algolia extension.

QG1

Figure 4: Setup

  1. Go to algolia.com.
  2. Select Dashboard > Overview.

QG1

Figure 5: Overview

  1. Select the company from the drop-down. Here, we have selected Fynd company.

QG1

Figure 6: Fynd Application

  1. Go to API Keys.

    QG1

    Figure 7: API Keys

    1. Copy the Application ID and paste it into the Application ID field on the Fynd Platform.

    QG1

    Figure 8: Application ID

    1. Copy the Search API Key and paste it into the Search-Only API Key field on the Fynd Platform.

    QG1

    Figure 9: Search API Key

    1. Copy the Write API Key and paste it into the Admin API Key (or Write Key) field on the Fynd Platform.

    QG1

    Figure 10: Write API Key

  2. Select the Search module from the left side panel and go to Index under Configure.

QG1

Figure 11: Index

  1. Go to the Index drop-down in the header and select the relevant index from the drop-down menu, and copy the Index Name.

QG1

Figure 12: Index Name

note

After entering the details in the aforementioned fields, other modules of the Algolia extension will be enabled for you to configure.

note

After setting credentials for an extension, only the index_name can be modified.

  1. Add Global Context. This refers to universal settings that impact the overall behaviour of search functionalities across the entire application. This field is non-mandatory.

  2. Add Target Mart. It is specific to Jio. Target Mart can be either Jio or Smart. This field is non-mandatory.

Price Internationalization

Open Exchange is an external partner that facilitates checking exchange rates for various currencies. Enter the Open Exchange API Key to fetch data from the Exchange Partner. Inputting the Open Exchange API Key allows fetching data from this partner, enabling the adjustment of product prices according to user preferences or locations. This implementation ensures multi-currency support and facilitates currency conversions on the sales channel.

QG1

Figure 13: Price Internationalization


Indexing

This module streamlines the search experience by extracting data from the Fynd Platform and pushing it to Algolia. Its primary function involves synchronising essential elements such as collections, currencies, filters, sort and products, ensuring that Algolia consistently delivers rapid and precise search responses.

  1. Select Indexing.
  2. Click on the Sync button (it will sync all the data from the index name added on the credentials page).

QG1

Figure 14: Data Sync

  1. After sync a grid table with the status of the sync will be displayed.

QG1

Figure 15: Sync Status


Sort and Replica Mapping

Sort & Replica Mapping determines the order of products in Product Listing Pages (PLPs) and in search results, with a default sorting for consistent presentation. Multiple pre-sorted replicas on algolia.com enhance sorting efficiency, aligning with user preferences for responsive search experiences.

Sort - When users search for a product, Algolia's sort and replica mapping rules dictate the order of the products on the Product Listing Pages (PLPs) in the search results. The default sorting, established by a predefined rule set, ensures a consistent initial presentation. Users have the flexibility to customize their experience by adjusting sorting preferences to prioritize factors such as price, popularity, and more.

note

When configuring the Algolia extension for the first time, ensure to review and set the sort section before hitting the save button.

Replica - Algolia allows you to create replicas of an existing index. Replicas are copies of the original index, and they can have their different order for sorting. Replica indices are useful when you want to present the same set of data in different ways, perhaps with different sorting criteria.

tip

Refer here to create replicas in Algolia.

  1. Select Sort and Replica Mapping.

QG1

Figure 16: Sort and Replica Mapping

  1. To enable, disable, or change position of sort setting and to set one of the sorting options as default, select click over here.

QG1

Figure 17: Enable, Disable, or Change Position of Sorting

  1. Use the toggle button to enable/disable the relevant sorting options.

QG1

Figure 18: Enable or Disable Sorting Options

  1. Click the drop-down button next to the toggle, to access sorting option settings. Here, you can change the Display Label of the sorting option, the Position of the sorting option, set the sorting option as default and delete the sorting option.

QG1

Figure 19: Sorting Option Settings

  1. Enter the Index Name in the Settings section from which the data for sorting will be drawn for each of the sorting options.

QG1

Figure 20: Index Name

  1. Click Save.

QG1

Figure 21: Save the Settings

note

Options for index sorting are pre-determined.


Auto Complete Menu

It enhances the search experience by providing dynamic suggestions as users type in the search bar.

QG1

Figure 22: Auto Complete Menu

These suggestions are categorized into five types:

Product Suggestion: Provides specific product recommendations based on the user's search query. For instance, a search for 'red lipstick' might yield suggestions like 'Lakme Red Lipstick - Shade 47' or 'L'Oréal Red Lipstick - Rose.'

Brand Suggestion: Identifies the brand associated with the search term, offering users insights into available brands. For instance, if the user searches for 'lipsticks,' brand suggestions may include 'Lakme,' 'L'Oréal,' and more.

Category Suggestion: Indicates the product category related to the search term. For example, if the user searches for 'Lakme lipsticks,' the category suggestion would be 'lipsticks.'

Algolia Query Suggestion: A predefined set of words and products associated with a specific query. For instance, if the user searches for 'Lakme,' predefined products such as 'Lakme Lipstick - Red' or 'Lakme Eye Liner' are suggested. Select a pre-made query suggestion index from algolia.com and paste the name on Fynd Platform. To find the Index Name on Algolia, follow the steps.

Department Suggestion: Suggests the departments to which the search term belongs, offering users a broader context. For example, if the user searches for 'Dolo,' department suggestions may include 'Pharma,' 'Pain Relief,' and 'Supplements.'

note

The configured query suggestions will be associated with specific departments. For example, in the image below, "dolokind" is a query suggestion linked to the "pharma" department.

QG1

Figure 23: Query Suggestion Example

tip

You can use the toggle to disable suggestions as per convenience.

QG1

Figure 23: Enable/Disable Auto Complete Menu


Search Analytics

Search Analytics enables the tracking of clicks on specific queries, offering valuable insights into user engagement and preferences.

  1. Enable on Fynd Platform using the toggle button.

QG1

Figure 24: Enable Click Analytics

  1. Click Visit Algolia Dashboard, you will be redirected to algolia.com.

QG1

Figure 25: Visit Algolia Dashboard

  1. Find accessibility data on algolia.com.

QG1

Figure 26a: Accessibility Data

QG1

Figure 26b: Accessibility Data

tip

You can use the toggle to disable analytics as per convenience.


Data Loader

Data Loader allows you to customise Algolia access, offering flexibility in loading and managing data according to their specific preferences.

  1. Open Data Loader.

QG1

Figure 27: Data Loader

  1. Enable Product Listing. Once product listing is enabled you will be able to see product listing on the product listing page of the website.

QG1

Figure 28: Product Listing

note

When Product Listing is enabled, the responses will originate from the Algolia index.

  1. Enable Collection Listing. Once collection listing is enabled you will be able to see collections on the website.

QG1

Figure 29: Collection Listing

  1. Enable Auto Complete. Once auto complete is enabled, you can see search predictions in the search bar after a query is entered on the website.

QG1

Figure 30: Auto Complete

note
  1. You can use the toggle to disable suggestions as per convenience.
  2. If Algolia is disabled for any of the above, the page will draw data directly from Fynd Platform.
tip

Select click over here and on the Data Loaders page go to Catalog. Here, you can cross-check the APIs to verify whether the data is being retrieved from Algolia or the Fynd platform.

QG1

Figure 31: Catalog


File Uploader

Define rules for search queries and content types, such as prioritizing laptops in the Electronics category. Streamline the process by setting these rules for your pages in bulk using the File Uploader feature, ensuring efficient management and consistency across your platform.

  1. Download sample file.
  2. In the downloaded file, fill in relevant conditions, effects, option filters and values in the Excel sheet.
Sheet NameFieldsDefinitions
Conditionsrule_idA unique identifier for the rule.
rule_actionThe action associated with the rule (e.g., "create" or "update").
condition_typeThe type of condition (e.g., "query" or "filter").
query_typeThe type of query condition (e.g., "is" or "startsWith").
query_keywordThe keyword associated with the query condition.
context_nameThe name of the context (optional).
filter_nameThe name of the filter (optional).
filter_valueThe value of the filter (optional).
remove_querySpecifies whether to remove the query (optional).
from_dateThe start date for the rule's validity (optional).
to_dateThe end date for the rule's validity (optional).
object_idThe unique object identifier associated with the rule (optional).
Effectsrule_idA unique identifier for the rule.
consequence_typeThe type of consequence associated with the rule.
positionThe position of the consequence (optional).
redirect_urlThe URL for redirection (if applicable, optional).
product_idThe ID of the product (optional).
filter_nameThe name of the filter (optional).
filter_valueThe value of the filter (optional).
filter_operatorThe operator for the filter (e.g., "less than" or "greater than," optional).
query_typeThe type of query condition (e.g., "is" or "startsWith").
query_deleteIndicates whether certain elements should be deleted from the query.
query_insertSpecifies elements that should be inserted into the query.
OptionFiltersstore_code The unique store code associated with the rule (optional).
pinThe PIN code associated with the rule (optional).
cityThe city associated with the rule (optional).
alternate_product_codeThe alternate product code (optional).
mkuAdditional identifier or code relevant to the rule, such as a product SKU or any other unique identifier.
tag_nameTag name that can be associated with the rule for categorization or filtering purposes.
positionPosition relevant to the rule, which could represent a specific rank or order within a list of items.
product_codeProduct code associated with the rule, which could be used for product identification or categorization.
mart_typeType of market or mart associated with the rule; it can be Jio or Smart and are specifc to Jio.
object_idThe unique object identifier associated with the rule (optional).
stateThe state associated with the rule (optional).

Example of Adding Rules in Sample Sheet

my_rule_1

Conditions Sheet: Conditions are defined with condition_type set to “query” being juice, context_name as testing, and context_scope as all. The rule becomes active when the filter includes color:red within the specified timespan defined by from_date and to_date.

rule_idcondition_typequery_typequery_valuecontext_namecontext_scopefilter_namefilter_valuefrom_dateto_date
my_rule_1queryisjuice6/9/20236/15/2023
my_rule_1contexttestingall
my_rule_1filtercolorred

Effects sheet: In this sheet, we outline the impact of the rule. This includes pinning a product with the product ID 1231231 to position 1, hiding a product with the ID hide_product_1, redirecting to https://www.sample.com, applying the filter tags as famous with a specified filter operator, and executing query actions such as deleting under 1000, and replacing average queries with expensive.

rule_idconsequence_typepositionredirect_urlproduct_idfilter_namefilter_valuefilter_operatorquery_typequery_delete
my_rule_1pin11231231
my_rule_1hidehide_product_1
my_rule_1redirecthttps://www.sample.com
my_rule_1filtertagsfamous
my_rule_1querydeleteunder 1000
my_rule_1queryreplaceaverage

Option Filters Sheet: Values in fields like storecode, pin, city, etc., are saved as Custom JSON Data in OptionFilters. This allows for additional customization and storage of specific values associated with the rule.

rule_idstore_codepin cityalternate_product_codemkutag_namepositionproduct_codemart_typeobject_id
my_rule_110,12,131234Mumbai490000075490000075trending5490000075JIO

my_rule_2

Conditions Sheet: The rule becomes active in the example when conditions are defined, with the condition_type specified as query and set to mobile.

rule_idcondition_typequery_typequery_valuecontext_namecontext_scopefilter_namefilter_valuefrom_dateto_date
my_rule_2queryismobile

Effects Sheet: In this sheet, we outline the impact of the rule. This includes pinning a product with the product ID 123211 to position 1.

rule_idconsequence_typepositionredirect_urlproduct_idfilter_namefilter_valuefilter_operatorquery_typequery_delete
my_rule_2pin1123211

Option Filters Sheet: Values in fields like storecode, pin, city, etc., are saved as Custom JSON Data in OptionFilters. This allows for additional customization and storage of specific values associated with the rule.

rule_idstore_codepin cityalternate_product_codemkutag_namepositionproduct_codemart_typeobject_id
my_rule_210123Mumbai490000075490000075trending3121211212JIO

QG1

Figure 32: Example of Adding Rules in Sample Sheet

  1. Go to Fynd Platform > Sales Channel > Extensions> Algolia > File Uploader and click Upload.
  2. Click Refresh.
  3. Check the status in the grid displayed.

Once successful, in the Search module of algolia.com, go to Enhance > Rules and the main grid will display the rules uploaded on Fynd Platform.


Relevance

The Relevance setting shapes data structure, influencing how the engine queries indices, and determining the order of results visible to users as they type.

Searchable Attributes are the specific fields chosen for consideration during search queries, allowing users to find relevant results based on the designated attributes; for example, enabling ‘top wear’ as a searchable attribute will display t-shirts when users search a top wear.

  1. Click Set up in the Algolia dashboard.
  2. You will be redirected to Algolia.
  3. Click Add a Searchable Attributes.

Custom Ranking allows you to control the way results on the Product Listing Pages are sorted (by discount, availability etc).

  1. Click Set up in the Algolia dashboard.
  2. You will be redirected to Algolia.
  3. Add custom ranking attributes and sort by attributes.

Synonyms are alternative words with similar meanings, enhancing search accuracy by expanding queries to include equivalent terms.

  1. Click Set up in the Algolia dashboard.
  2. You will be redirected to Algolia.
  3. Click Add a Synonym.

In Algolia, all product attributes are synced for a particular product from the Fynd Platform. To limit the synced attributes and reduce payload during runtime, users can enable and select specific attributes according to their requirements from the Attributes section.

tip

If we want to sync nested attributes from incoming payloads, you can access them using dot notation. For example: attributes.popularity, brand.name, brand.uid, and attributes.Color.

  1. Enable Attributes.

QG1

Figure 33: Enable Attributes

  1. Add fields.

QG1

Figure 34: Add Fields

  1. Edit/delete field if required.

QG1

Figure 35: Delete Fields

  1. Click Save.

QG1

Figure 36: Save the Change

When there are existing attribute data in the Algolia index and only specific attributes are required from Algolia on the Product Listing Page (PLP), users should first clear the sync.

  1. Go to Search > Index under Configure.

QG1

Figure 37: Index

  1. Go to the Index drop-down in the header and select the relevant index from the drop-down.

QG1

Figure 38: Select the Index

  1. Under Manage Index, select Delete or Clear.
  2. Type ‘clear’ and click clear.

If the user wants all their data on Algolia, the user can disable attributes on Fynd Platform and then sync from Sync Catalog under Indexing.


Debugging

  1. Question - The brand is updated but not reflected in Algolia.

    Answer- Update the brand at the application level, and allow a minimum of two hours for the cache data to be updated at the catalog level.

  2. Question - The category is updated but not reflected in Algolia.

    Answer - Update at the global level for category changes and wait for a minimum of 2 hours for the updates to take effect.

  3. Question -Sync is not completing; it gets stuck midway.

    Answer: Check the full sync processor pod for potential failures in catalogue APIs, as this may be causing the issue.

  4. Question - The "discover more" API response is empty.

    Answer: Verify if query suggestions are configured. An absence of configuration may be causing the empty response.

  5. Question - Filters are not appearing.

    Answer: Check if a full sync was triggered around the reported time. If not, examine the database to ensure the filter data is not empty in the configuration. An empty configuration suggests a possible failure in the filter API.

  6. Question - Product updated but not reflected in Algolia.

    Answer - Check the last sync status for that product; if not updated, verify if the webhook is reaching Algolia. Check the partner panel for more insights.

  7. Question - Data not coming from Algolia.

    Answer: Ensure the data loader is configured for Algolia in your system.

  8. Question - Full sync completed successfully, but products are not updated in Algolia; last sync does not show updated timing.

    Answer - Check your Algolia plan and indexing capacity. Confirm if indexing is ongoing at the Algolia index during the reported time.

  9. Question -Sort options on storefront not working (e.g., price high to low).

    Answer - Verify that sorting is configured on the platform, ensure the sort index is specified in the extension, and check if relevant rules are properly set.

  10. Question - Error in Algolia API on the storefront, reading the value of null.

    Answer - Inspect the sort section in the extension to ensure the default sort is selected for that sales channel.

  11. Question - Product, brand, category, or query suggestions not appearing.

    Answer - Confirm in the autocomplete section that suggestions are enabled.

  12. Question - Internationalization not working.

    Answer - Check the Algolia extension credentials section for filled API keys. Also, ensure that the sales channel supports multiple currencies.