Appearance
Product and Content Data
Without products or other content (collectively known as entities), there would be nothing to search for or recommend, so naturally this is important data. Most likely, you already have this data on your website, PIM or ERP, and Relewise will need to be given an 'up-to-date version of this (sent via the API or the feeds feature in My relewise).
Implementation details for Developers
See how to provide Entity Data via the API here
Product Data
Product data is the products you sell. We do not need every single detail about a product, only the subset that is relevant to your type of searches and recommendations. Common examples of such metadata are: Name, Id, Product Group, Variant, and Brand, but you can send and configure any kind of data. For example, if you sell wine, country, wine type, and year would be relevant extra data.
Our product model supports the following
- SKU
- Variants
- Categories
- Brand
- Display Name (multi-lingual)
- Pricing (multi-currency)
- Assortment information
- Data (Key/Value*) *Value can be a number, a string, a boolean, a currency, a data object, or any list of the former.
You can read more about the types of data we support here.
Importing Products
When importing data into Relewise, it is advisable to include as few fields as possible to ensure optimal performance. To help ensure that you get the correct data imported, consider these criteria when evaluating the data fields on your products:
- Should the field be text searchable?
- Should results be able to be filtered on the basis of this field?
- Should results be able to be sorted on the basis of this field?
- Is the field necessary for facetting?
- Is the field necessary for boost/bury rules or similar Merchandising rules?
- Do you need this field to be returned in results from Relwise (e.g. for displaying on the website)?
If you can answer yes to at least one of these, the field should be included. Otherwise, leave it out.
Variant Data
ProductVariants are treated exactly like a regular product as far as Relewise is concerned. The only difference is that a ProductVariant is tied to another product, and so carries both the superordinate product's ProductId, as well as its own VariantId. The Data Dictionary for ProductVariants, however, is identical to a non-variant Product, and should contain the same kind of data that you want to be used for search and recommendation purposes.
In addition to the Data Dictionary, ProductVariants also contain a Specification Dictionary. Specifications are designed to identify the dimensions of a variant product, such as size, color, vintage etc. Specifically, Specifications are designed to correlate between products, allowing for cross-referencing on the basis of variant-specific data.
Example of Specifications Usecase
A User is looking at a Red shirt in size Medium. Specifications allows Relewise to recommend the User other shirts of the same color and size, ensuring that they are more likely to find a product that fits what they want to buy.
Content Data
Content data is comprised of sets of texts (typically blogs and articles, but can also be support pages like return policies, etc.), so such data can also be presented in your user's searches or as blog recommendations to a product view.
Similarly to Products, Content Data can contain a number of different types of data depending on what you need. When importing data to Relewise, consider what is the least amount of fields you can import, and forego the rest.
- Should the field be text searchable?
- Should results be able to be filtered on the basis of this field?
- Should results be able to be sorted on the basis of this field?
- Is the field necessary for facetting?
- Is the field necessary for boost/bury rules or similar Merchandising rules?
- Do you need this field to be returned in results from Relwise (e.g. for displaying on the website)?
If you can answer yes to at least one of these, the field should be included. Otherwise, leave it out.
Categories
In Relewise, categories are self-living entities similar to products and content. Typically, categories are created during the import of products and content pages, where you can specify the category of each entity using the CategoryPaths
data field. With category paths specified on the entities, Relewise is able to create the categories and their respective hierarchical structures automatically.
Since searching is rarely relevant for Categories themselves, the most typical data for categories is simply an Id
and a DisplayName
. However, categories can theoretically contain as much data as any other entity, should it be relevant.
Click here for examples on importing Categories
Example of importing multiple CategoryPaths on a Product via API
If you import your entities via the API, make sure to use a Multilingual value, to ensure that the DisplayName
fields are properly searchable.
csharp
product.CategoryPaths.Add(new CategoryPath(
new CategoryNameAndId("4", new Multilingual(
new Multilingual.Value(english, "Audio"))),
new CategoryNameAndId("8", new Multilingual(
new Multilingual.Value(english, "Headphones"))),
new CategoryNameAndId("16", new Multilingual(
new Multilingual.Value(english, "Ear Buds")))
));
product.CategoryPaths.Add(new CategoryPath(
new CategoryNameAndId("2", new Multilingual(
new Multilingual.Value(english, "Smartphones"))),
new CategoryNameAndId("74", new Multilingual(
new Multilingual.Value(english, "Accessories")))
));
Example of importing multiple CategoryPaths via Product Feed
When importing products via a Google Product Feed, be aware that Google only allows 5 repeated fields of prouct_type
per product.
<g:product_type>Audio > Headphones > Ear Buds</g:product_type>
<g:product_type>Smartphones > Accessories</g:product_type>
Often, you will want to use Categories for faceting or filtering. For instance, you may want to filter results so that you only get products that are contained within a certain category to make a category page.
csharp
var request = new ProductSearchRequest(
new Language("da-dk"), new Currency("dkk"),
User.Anonymous(), null, null, 0, 10);
request.Filters.Add(new ProductCategoryIdFilter("8", CategoryScope.Ancestor));
Category information can furthermore be accessed directly from Products and Content as a part of its display properties if you specify that a request should return this. You can access the PathFromRoot
from any of the CategoryPaths that will be a part of the ProductResults
to get the breadcrumbs to that product.
Be aware that moving categories or moving entities within/between categories can prove tricky, because the relation between entity and category is maintained across changes. This means that if an entity is moved permanently from one category to another (or simply removed from a category), it requires an explicit decoupling of the category from the entity. In other words, the entity's relationship to its individual categories must be restated in its entirety to ensure that the removed category is properly removed.
Making Entities Searchable
Once your entities are imported into Relewise, it is important to remember to configure the Search Index with the chosen data fields. By default, a black Search Index will only return hits on Id
and DisplayName
for Products, Variants, and Content Pages. Please refer to our in-depth guide for configuring the Search Index for a detailed walkthrough of the system.