Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more


Nov 13, 2015
  2758
(0 votes)

Find optimizations export-import

Recently I got a question if there is a way to transfer EPiServer Find optimizations from one index to another. By optimizations here I mean synonyms, related queries, autocomplete entries and best bets. There was no utility for this, so my suggestion was to use the same REST API that we use in EPiServer Find UI. Using this REST API without documentation and ability to look under the hood might be quite challenging, so I decided to write a tool for this myself.

The tool is an EPiServer Admin mode plugin that allows exporting and importing EPiServer Find optimizations entities between indexes or sites. It is packed as a NuGet package and uses JSON format for export. It is available at nuget.episerver.com, so you can install it by running Install-Package Vro.FindExportImport in Visual Studio package manager console. Once installed the plugin can be found in Admin mode under the Tools section.

Exporting and importing Find optimizations has two synchronization problems: how to match sites (each optimization belong to an individual site or "All sites") and how to match the content selected in Best bets.

When it comes to sites, it is relatively easy: optimizations can be exported only within a single site.
Image ExportView.png

When importing, users select a target site and all optimizations just get new site value during import. 

Image ImportView.png
Please note, the value “All sites” in EPiServer Find does not mean all available sites, but rather a unique value indicating that an optimization has an effect on all sites. Therefore, when exporting with “All sites” selected, it just means only optimizations with “All sites” value are exported and not optimizations from all sites. The same is for import: all imported entities assigned to the selected site or the special “All sites” value. The plugin also can be used to copy optimizations from one site to another within the same index.

For the content references in best bets, I have not found a better solution than just trying to find a matching content by name on the target site. For best bets with pages, importer searches within pages, and for best bets with commerce products, importer searches only within commerce catalog items. If there is no content with a matching name, the best bet is skipped from importing.

When importing optimizations, the same validation rules apply as if optimization is created manually in EPiServer Find UI. If there is already an optimization with the same properties like the one being imported, no new optimization is created, and no existing optimizations get updated.

Plugins source code is available at GitHub

Nov 13, 2015

Comments

Please login to comment.
Latest blogs
Optimizely Configured Commerce and Spire CMS - Figuring out Handlers

I recently entered the world of Optimizely Configured Commerce and Spire CMS. Intriguing, interesting and challenging at the same time, especially...

Ritu Madan | Mar 12, 2025

Another console app for calling the Optimizely CMS REST API

Introducing a Spectre.Console.Cli app for exploring an Optimizely SaaS CMS instance and to source code control definitions.

Johan Kronberg | Mar 11, 2025 |

Extending UrlResolver to Generate Lowercase Links in Optimizely CMS 12

When working with Optimizely CMS 12, URL consistency is crucial for SEO and usability. By default, Optimizely does not enforce lowercase URLs, whic...

Santiago Morla | Mar 7, 2025 |

Optimizing Experiences with Optimizely: Custom Audience Criteria for Mobile Visitors

In today’s mobile-first world, delivering personalized experiences to visitors using mobile devices is crucial for maximizing engagement and...

Nenad Nicevski | Mar 5, 2025 |

Unable to view Optimizely Forms submissions when some values are too long

I discovered a form where the form submissions could not be viewed in the Optimizely UI, only downloaded. Learn how to fix the issue.

Tomas Hensrud Gulla | Mar 4, 2025 |

CMS 12 DXP Migrations - Time Zones

When it comes to migrating a project from CMS 11 and .NET Framework on the DXP to CMS 12 and .NET Core one thing you need to be aware of is the...

Scott Reed | Mar 4, 2025