I am working in Sitecore 9.3 XConnect custom facet with MongoDB. I have created a custom facets model and JSON file and able to see custom facet attributes and values but facet key(Products) under content is missing in Mongo collection and I have doubt is it possible to create separate section for custom facet like content.
Facet Model:
[Serializable]
[FacetKey(DefaultFacetKey)]
public class Products : Facet
{
public const string DefaultFacetKey = "Products";
public int PersonId
{
get; set;
}
public centraldata CentralData
{
get;set;
}
public Products()
{
}
}
Custom facet in MongoCollection
JSON Model
{
"Name": "FacetSchema",
"Version": "1.0",
"References": [
{
"Name": "XConnect",
"Version": "1.0"
},
{
"Name": "Sitecore.XConnect.Collection.Model",
"Version": "9.3"
}
],
"Types": {
"Central.Provider.Sitecore.xDB.Facets.Products ": {
"Type": "Facet",
"BaseType": "Sitecore.XConnect.Facet",
"ClrType": "Central.Provider.Sitecore.xDB.Facets.Products, Central.Provider.Sitecore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"Properties": {
"PersonId": {
"Type": "Int32"
},
"CentralData": {
"Type": "Central.Provider.Sitecore.xDB.Facets.Products.CentralData"
}
}
},
"Central.Provider.Sitecore.xDB.Facets.Products.CentralData": {
"Type": "Complex",
"ClrType": "Central.Provider.Sitecore.xDB.Facets.Products.CentralData, Central.Provider.Sitecore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"Properties": {
"Preferences": {
"Type": "Central.Provider.Sitecore.xDB.Facets.Products.Preferences"
},
"Bookmarks": {
"Type": [
"Central.Provider.Sitecore.xDB.Facets.Products.Bookmark"
]
},
"FavoriteTools": {
"Type": [
"Central.Provider.Sitecore.xDB.Facets.Products.FavoriteTool"
]
},
"LikedContent": {
"Type": [
"Central.Provider.Sitecore.xDB.Facets.Products.LikedContent"
]
}
}
},
"Facets": [
{
"Target": "Contact",
"Name": "Products",
"Type": "Central.Provider.Sitecore.xDB.Facets.Products"
}
]
}
Someone please help on this issue