Algolia
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
- Log in to the Fynd Platform.
- Go to the desired sales channel on the Fynd Platform. Here, we have selected the GoFynd sales channel.
- Click Extensions.
- Open Algolia extension. Algolia extension dashboard will appear.
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.
Credentials
Setup
- Open Credentials.
- Enter the Algolia's API Keys in this section to complete the setup for the Algolia extension.
- Go to algolia.com.
- Select Dashboard > Overview.
- Select the company from the drop-down. Here, we have selected Fynd company.
-
Go to API Keys.
Figure 7: API Keys
- Copy the Application ID and paste it into the Application ID field on the Fynd Platform.
Figure 8: Application ID
- Copy the Search API Key and paste it into the Search-Only API Key field on the Fynd Platform.
Figure 9: Search API Key
- Copy the Write API Key and paste it into the Admin API Key (or Write Key) field on the Fynd Platform.
Figure 10: Write API Key
-
Select the Search module from the left side panel and go to Index under Configure.
- Go to the Index drop-down in the header and select the relevant index from the drop-down menu, and copy the Index Name.
After entering the details in the aforementioned fields, other modules of the Algolia extension will be enabled for you to configure.
After setting credentials for an extension, only the index_name can be modified.
-
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.
-
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.
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.
- Select Indexing.
- Click on the Sync button (it will sync all the data from the index name added on the credentials page).
- After sync a grid table with the status of the sync will be displayed.
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.
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.
Refer here to create replicas in Algolia.
- Select Sort and Replica Mapping.
- To enable, disable, or change position of sort setting and to set one of the sorting options as default, select click over here.
- Use the toggle button to enable/disable the relevant sorting options.
- 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.
- Enter the Index Name in the Settings section from which the data for sorting will be drawn for each of the sorting options.
- Click Save.
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.
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.'
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.
You can use the toggle to disable suggestions as per convenience.
Search Analytics
Search Analytics enables the tracking of clicks on specific queries, offering valuable insights into user engagement and preferences.
- Enable on Fynd Platform using the toggle button.
- Click Visit Algolia Dashboard, you will be redirected to algolia.com.
- Find accessibility data on algolia.com.
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.
- Open Data Loader.
- Enable Product Listing. Once product listing is enabled you will be able to see product listing on the product listing page of the website.
When Product Listing is enabled, the responses will originate from the Algolia index.
- Enable Collection Listing. Once collection listing is enabled you will be able to see collections on the website.
- 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.
- You can use the toggle to disable suggestions as per convenience.
- If Algolia is disabled for any of the above, the page will draw data directly from Fynd Platform.
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.
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.
- Download sample file.
- In the downloaded file, fill in relevant conditions, effects, option filters and values in the Excel sheet.
Sheet Name | Fields | Definitions |
---|---|---|
Conditions | rule_id | A unique identifier for the rule. |
rule_action | The action associated with the rule (e.g., "create" or "update"). | |
condition_type | The type of condition (e.g., "query" or "filter"). | |
query_type | The type of query condition (e.g., "is" or "startsWith"). | |
query_keyword | The keyword associated with the query condition. | |
context_name | The name of the context (optional). | |
filter_name | The name of the filter (optional). | |
filter_value | The value of the filter (optional). | |
remove_query | Specifies whether to remove the query (optional). | |
from_date | The start date for the rule's validity (optional). | |
to_date | The end date for the rule's validity (optional). | |
object_id | The unique object identifier associated with the rule (optional). | |
Effects | rule_id | A unique identifier for the rule. |
consequence_type | The type of consequence associated with the rule. | |
position | The position of the consequence (optional). | |
redirect_url | The URL for redirection (if applicable, optional). | |
product_id | The ID of the product (optional). | |
filter_name | The name of the filter (optional). | |
filter_value | The value of the filter (optional). | |
filter_operator | The operator for the filter (e.g., "less than" or "greater than," optional). | |
query_type | The type of query condition (e.g., "is" or "startsWith"). | |
query_delete | Indicates whether certain elements should be deleted from the query. | |
query_insert | Specifies elements that should be inserted into the query. | |
Option | Filters | store_code The unique store code associated with the rule (optional). |
pin | The PIN code associated with the rule (optional). | |
city | The city associated with the rule (optional). | |
alternate_product_code | The alternate product code (optional). | |
mku | Additional identifier or code relevant to the rule, such as a product SKU or any other unique identifier. | |
tag_name | Tag name that can be associated with the rule for categorization or filtering purposes. | |
position | Position relevant to the rule, which could represent a specific rank or order within a list of items. | |
product_code | Product code associated with the rule, which could be used for product identification or categorization. | |
mart_type | Type of market or mart associated with the rule; it can be Jio or Smart and are specifc to Jio. | |
object_id | The unique object identifier associated with the rule (optional). | |
state | The 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_id | condition_type | query_type | query_value | context_name | context_scope | filter_name | filter_value | from_date | to_date |
---|---|---|---|---|---|---|---|---|---|
my_rule_1 | query | is | juice | 6/9/2023 | 6/15/2023 | ||||
my_rule_1 | context | testing | all | ||||||
my_rule_1 | filter | color | red |
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_id | consequence_type | position |redirect_url| product_id | filter_name | filter_value| filter_operator | query_type | query_delete| query_insert | |---|---|---|---|---|---|----|---|---|---| | my_rule_1| pin| 1| | 1231231 | | | | | | | | my_rule_1 | hide | | | hide_product_1 | | | | | | | | my_rule_1 | redirect | | https://www.sample.com | | | | | | | | | my_rule_1 | filter | | | | tags | famous | | | | | | my_rule_1 | query | | | | | | | delete| under 1000 | | | my_rule_1 | query | | | | | | | replace | average | expensive|
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_id | store_code | pin city| alternate_product_code | mku| tag_name | position | product_code | mart_type | object_id| state_code| |---|---|---|---|---|---|----|---|---|---| | my_rule_1 | 10,12,13 | 1234 | Mumbai | 490000075 | 490000075 | trending | 5| 490000075| JIO | my_rule_1_obj_1 | 27|
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_id | condition_type | query_type | query_value | context_name | context_scope | filter_name | filter_value | from_date | to_date |
---|---|---|---|---|---|---|---|---|---|
my_rule_2 | query | is | mobile |
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_id | consequence_type | position |redirect_url| product_id | filter_name | filter_value| filter_operator | query_type | query_delete| query_insert | |---|---|---|---|---|---|----|---|---|---| | my_rule_2 | pin| 1 | | 123211 | | | | | | |
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_id | store_code | pin city| alternate_product_code | mku| tag_name | position | product_code | mart_type | object_id| state_code| |---|---|---|---|---|---|----|---|---|---| | my_rule_2 | 10| 123 | Mumbai | 490000075| 490000075 | trending | 3 | 121211212 | JIO | my_rule_2_obj_1 | 27|
- Go to Fynd Platform > Sales Channel > Extensions> Algolia > File Uploader and click Upload.
- Click Refresh.
- 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.
- Click Set up in the Algolia dashboard.
- You will be redirected to Algolia.
- 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).
- Click Set up in the Algolia dashboard.
- You will be redirected to Algolia.
- 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.
- Click Set up in the Algolia dashboard.
- You will be redirected to Algolia.
- 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.
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.
- Enable Attributes.
- Add fields.
- Edit/delete field if required.
- Click Save.
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.
- Go to Search > Index under Configure.
- Go to the Index drop-down in the header and select the relevant index from the drop-down.
- Under Manage Index, select Delete or Clear.
- 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
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
Question - Data not coming from Algolia.
Answer: Ensure the data loader is configured for Algolia in your system.
-
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.
-
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.
-
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.
-
Question - Product, brand, category, or query suggestions not appearing.
Answer - Confirm in the autocomplete section that suggestions are enabled.
-
Question - Internationalization not working.
Answer - Check the Algolia extension credentials section for filled API keys. Also, ensure that the sales channel supports multiple currencies.