Sunday, 13 March 2022

Sitecore Commerce + Coveo Indexing

 This post for you if you are working or planning to work on Sitecore Commerce implementation with Coveo as your site search provider. I would assume you already planning to use Coveo for Commerce for your implementation, which is using a Catalog source on Coveo cloud, if you're looking into how you would implement your indexing strategy then this post is what you're looking for!! 




There are two approaches I know by which you will be able to indexing your Sitecore commerce products/sellable items into Coveo Cloud Catalog source. You can use Stream API with your own custom implementation and the other is to use push API using Coveo SDK, keep reading for more details. 

STREAM API

If you're not familiar with Coveo Stream API, I would suggest you give it a read, following where you can find the related documentation: 


You will find from the documentation that there are 3 main APIs that you would need to use to upload your content/indexed products JSON into Catalog source:

  1. Open Stream
  2. Upload Stream
  3. Close Stream
Pay attention to the part mentioning size limit, if you're running into more than 250 MB of content, you would need to upload these in batches. 

I already prepared a Json Postman Collection for you to try it out, you would need to make sure you have an organization, source and an API key in order to use it. here is GitHub repo, enjoy!; 



Coveo C# Platform SDK

The other approach is to use the official Coveo SDK, which contains an API for uploading content using Push APIs, following is the intro from he repo doc:
The official Coveo C# SDK allows your software to communicate with the Coveo Cloud Platform public APIs and the Push API. The package is .NET Standard 2.0 compatible and therefore works with .NET Core and .NET Framework


As you can see from the documentation, the SDK is built using .Net Standard 2.0 which is compatibility with .Net Core, which is perfect to be used with a Sitecore Commerce Plugin :) 

I believe the above will give you a good intro into the topic, on the coming post I will go through a technical dive into how to implement a Coveo indexing for your sitecore commerce content,

No comments:

Post a Comment