Integrate the application
Sitecore Search is a powerful platform that you can integrate with other applications to show predictive and personalized search experiences for your visitors. When you integrate with Search, you request data that you can use to build a search experience. This data could be, for example, a list of search results, facets, or suggestions. You also send visitor-driven events, so Search can generate personalized content and build analytics for your domain.
The complexity, flexibility, and development effort required to integrate depends on the method of integration that you choose.
Integration methods
Sitecore Search provides three integration methods:
-
JavaScript SDK for React - integration involves adding SDK packages containing components and features to your project. Built especially for React applications, the SDK is the fastest way to integrate with Search and requires the least time and development effort.
-
JavaScript Data - can be used with vanilla JavaScript or in any JS framework. This is a quick way to make search queries and receive responses from Search.
-
REST APIs - integration involves accessing endpoints that expose Search services. You configure the requests you want to send to Search. You'll also need to handle the responses and translate them into Search experiences.
Search features, including personalization, depend on basic visitor information like UUID in the payload when tracking visitor interactions. UUID is a requirement.
The JS SDK sets a cookie and includes the UUID when tracking events.
Compared to the SDK, API integration usually takes longer and requires more development effort but provides complete flexibility.
Before integration
Before a developer begins integration, at a minimum, make sure that they:
-
Can log in to Sitecore Search where they can test requests and monitor events. They will also need to view attributes, features, and widgets configured for your domain and get details like their names and IDs.
-
Have the API keys with required scopes. These are required for authentication if a subdomain has not been set up.
-
Know where to show different experiences. Provide them with mockups and brand guidelines for various pages and widgets.
-
Know which features, like facets, sorting, and others, are required for each search experience and how these features are configured.
NoteThe values in a search request always override those in any rules because the context conditions have already been met.
At runtime, you can add a rule in the request if a value you want to use is only known at runtime.
-
Know what content needs to be searchable in each search experience. This is because not all indexed content might need to be available for all searches.
Validate the integration
You can validate the integration by comparing your integrated application with the configuration in Sitecore Search. You can also verify the integration is through the records in Analytics.