Search contacts and Commerce interactions in the xDB index
Using the xConnect Search API, you can search contacts and Commerce interactions to produce, for example, a list of customers who have placed orders or a list of all product purchased by a customer.
You can find a blacklist of all models that are not indexed by default. These models have the DoNotIndexAttribute type. This list is contained in the Sitecore.Commerce.Connect.XConnect.Models.json file that is deployed with a custom model.
This topic provides examples of how you can use the xConnect Search API to query contacts based on Commerce events.
On Azure, you can put the nested loops in the following examples into a single LINQ statement.
Return a list of customers who have placed orders
Return a list of customers who have placed orders
The following code example returns a list of contacts who have placed orders.
Return a list of all products purchased by a customer
Return a list of all products purchased by a customer
The following code example returns a list of products that have been purchased by a specific customer.
Return a list of all products viewed by a customer
Return a list of all products viewed by a customer
The following code example returns a list of all the products that have been viewed by an individual customer.
Return a list of all categories visited by a customer
Return a list of all categories visited by a customer
The following code example returns a list of all the categories that a customer visited.
Return a list of customers who have abandoned their carts
Return a list of customers who have abandoned their carts
The following code example returns a list of customers who have abandoned their carts.