Advanced Search - Search alternatives
In This Topic
How it works
The Search Alternatives feature enables alternative products to be identified and displayed for any item in the catalog, directly through a new Search alternatives button. It builds on the standard Related Products relations available in Product Information Management, so no new data model is required — existing (or new) product relation types are simply marked as "alternative" relations.
The Search alternatives button will be available on all forms where the Product Search button is available.
Once configured, these alternative products are added to the index, so they can be searched and filtered on. A product can have multiple alternatives, and a single product can also be marked as an alternative for multiple other products.
When opening the compare form from the Search alternatives form, the selected alternatives can be compared against the base item (from the order line) which is shown as the first column in the compare form.
Note
Alternative relations are one-directional. If Product A is marked as an alternative for Product B, this does not automatically mean Product B is an alternative for Product A. If the relationship is intended to apply in both directions, both relation records must be created.Type your Note Box content here.
Example
The table below shows how alternative relations set up on four products translate into what each product's "alternative for" field contains — the other products for which it has been marked as an alternative.
Product 0006 has no alternatives set up on it, but it still appears as an alternative for three other products — 0003, 0004, and 0005 — because each of those products lists 0006 as one of its alternatives.
Setup
The steps below describe how the Search Alternatives feature is configured.
Mark a product relation type as "Alternative"
- Go to Product Information Management > Setup > Product relation types.
- Select the relation type intended to represent alternatives within product search or create a new one
- Enable the Alternative relation type checkbox.
More than one relation type can be marked as "Alternative" if needed — related products are picked up from all relation types flagged this way.
Assign the relation to products
- Go to Product Information Management > Products > Products
- Select the Related products menu item (found in the setup group on the product ribbon).
- Add the products intended to appear as alternatives by selecting the relation type marked as "Alternative" in step
Configure the field search query
- Go to Product Information Management > Setup > Advanced Search > Field search queries click the Load predefined queries menu item and select the predefined query named Product Alternative For.
- This query links the product table to the relation table and filters on the relation type flagged as "Alternative," returning all related products that carry an alternative relation.
- Go to Product Information Management > Setup > Advanced Search > Search configuration > Category hierarchies > Configure search hierarchy > Fields Search add a new record and select the query Product Alternative For. Because this is a product-to-product relationship, the query contains two product data sources. The data source specifically named for "EcoResProduct_AlternativeFor" must be selected — using the wrong one causes the relationship to be filtered in the wrong direction.
- Select the Display product number field.
- Fill Azure search field with alternativefor in the name of the index field
- Set the Azure Value type to Multi-value, since a product can have more than one alternative.
- Update the (index) scheme via menu item Update scheme in the menu item tab Search data > Index
Add the field to the search layout (optional)
Adding the alternative-products field to the search layout allows the indexed data to be previewed directly. This step is mainly useful for testing or demo purposes and is not typically required in a live, production setup.
Use the Publish menu item in the menu item tab Search form > Setup to update the layout definitions to reflect this setup.
Update the search index
Click Update data in the menu item tab Search data > Search data to update the index is with the configured alternative product relations.
Map the field in the configuration
- Go to Product Information Management > Setup > Advanced Search > Search configuration > Field Mappings.
- Select the field from the index (defined in the previous steps = alternativefor) which the system needs to use when filtering on alternative products .
Adjust the label for the Index field
Go to the tab Index fields and adjust the label of the record with name “alternativefor” and change field label “Display product number” into “Alternative for”
Enable automatic updates (Data Change Tracking, optional)
By default, field search index is not automatically refreshed when the underlying product alternatives data changes. To keep the index up to date automatically. To update this automatically, data change tracking needs to be setup for this table.
- Go to System Administration > Setup > Advanced search > Parameters > Data change tracking
- Use the load from field search button to populate the defaults or add the table EcoResProductRelationTable manually
- Set Tracking Enabled to Yes.
- Read Advanced Search - Search Data Update Triggers for more information how to schedule the update job which will update the search data based on these triggers.
The Search Alternatives feature is now fully configured. Products marked with an alternative relation appear as alternatives in search results, and the index remains current as long as data change tracking and its batch job stay enabled.