10 votes
Accepted

How to store booleans in a custom facet?

In your AdditionalInfoFacet constructor, change this line: EnsureAttribute<string>(FIELD_OPT_IN); To this: EnsureAttribute<bool>(FIELD_OPT_IN); You need to register your boolean ...
Dmytro Shevchenko's user avatar
9 votes

Display custom facets in Sitecore Experience Profile version 9 or later

I do this using Experience Profile Express Tab code. It allows you to add a custom tab to the contact in experience profile. Then you just load your facet into it. You can put anything in the model. ...
Chris Auer's user avatar
  • 13.1k
8 votes
Accepted

Why are custom xDB facets being overwritten on session end?

The solution If you are sure that the contact currently has a session on the site, then you should NOT release it to the Collection Database. Instead, you should use this method: manager....
Dmytro Shevchenko's user avatar
8 votes
Accepted

Remove contact from contact list

We use code like this and it works fine. It is similar to yours however there are some differences: using (var client = SitecoreXConnectClientConfiguration.GetClient()) { try { var ...
Bartłomiej Mucha's user avatar
6 votes

The type of this instance does not correspond to any type in the model

The error I got in code behind when creating contact, on client.submit() is: "The type of this instance does not correspond to any type in the model". I was currently checking with Sitecore Support ...
Raul's user avatar
  • 61
6 votes

How to programatically add contact to a contact list in Sitecore 9.0u1

With your code you are always changing facet value on contact so contact will be part of only one contact list (last one assigned) at the end. You are also effectively replacing all other list ...
Peter Procházka's user avatar
6 votes

How do I get access to my Contact Card information

The issue that you are seeing is because you are trying to instantiate a new ContactRepository(). The appropriate way to reference the repository is by creating the object through Sitecore's ...
Pete Navarra's user avatar
  • 14.6k
6 votes

Questions extending custom facet code

The code you are referencing is part of the process that details how List Manager, or the Marketing Operations of Sitecore, handles mapping imported CSV data to facets on a contact. At least that's ...
Pete Navarra's user avatar
  • 14.6k
6 votes
Accepted

Postcondition 'this.Interaction should not be null' exception while identifying a Contact

We faced the same issue and raised Sitecore support ticket for the same and we get to know that if you try to hit from Postman, need to remove user-agent from postman headers like below - https://www....
Gaurav Agarwal's user avatar
5 votes
Accepted

How can I search for date field values on the Content Editor?

In the past I found that the only way I can do date search was to use the default start field from search field types. As you can see that it has the Start field and some date value and it does ...
Mrunal Daftari's user avatar
5 votes
Accepted

Is it possible to extend an existing custom facet?

When A Custom Facet Is Extended, Mongo Is Not Immediately Affected Just because Mongo isn't showing the added facet/element/attribute, doesn't mean that the Facet isn't there. MongoDB will only store ...
Pete Navarra's user avatar
  • 14.6k
5 votes
Accepted

Difference between Identify contact and create a contact

@VicentGaliana is exactly right. The difference between identifying a contact and creating a contact essentially boils down to whether or not you are able to "recognize" the contact. What is contact ...
Zachary Kniebel's user avatar
5 votes

Difference between Identify contact and create a contact

TL;DR No, just use that method, it's enough. Long answer In your case, Sitecore has already created a contact the first time it requested a page and tracked information against that contact. You ...
Vicent Galiana's user avatar
5 votes
Accepted

How to add item in contact custom facet List type property

You should use similar code as below one to fix your problems to get and set custom facet values: Contact contact = client.Get<Contact>( new IdentifiedContactReference(_contactSource, ...
Peter Procházka's user avatar
5 votes
Accepted

Automation Engine activity type not retrieving custom facet

The Marketing Automation engine requires you to define custom facets that will be available when the contact is evaluated. You will need to patch in your custom facet to the IncludeFacetNames section ...
George Tucker's user avatar
5 votes

Sitecore 9.1 custom facets

Ones you want to extend your contact model with the facet above, a code will look like below: JobPreference model: using System; using Sitecore.XConnect; using Sitecore.XConnect.Schema; namespace {...
Artem Prashkovich's user avatar
4 votes

How can I get Search Contacts via XConnect API?

In general, you can look at the examples in the documentation for searching contacts by an interaction facet: https://doc.sitecore.net/developers/xp/xconnect//xconnect-client-api/search/contacts/...
Jason St-Cyr's user avatar
  • 6,761
4 votes
Accepted

Retrieve favorite pages based on the user profile

I think your solution to create a new collection in mongodb is a very viable solution. Then you can just query the collection to get the top 5 pages. I would not recommend to put it in xDB as a ...
Morten Røermose's user avatar
4 votes

Does an Anonymous xDB Contact facet data get restored for new sessions?

Anonymous visitor xDB data is stored according to the cookie guid that was placed on the visitors computer as SC_ANALYTICS_GLOBLE_COOKIE. As long as the user doesn't clear his cookies, subsequent ...
Pete Navarra's user avatar
  • 14.6k
4 votes
Accepted

System.Collections.Generic.KeyNotFoundException when calling Create method on Facet

Your collection getters need to access the actual collections by using proper keys: public IElementCollection<IHistoryChangeElement> Changes { get { return GetCollection<...
Dmytro Shevchenko's user avatar
4 votes
Accepted

How to add a custom xDB facet to an IElementCollection facet

You need to register Address as your IAddress implementation in Sitecore configuration. You can see how it is done in Sitecore.Analytics.Model.config. Basically, you'd have a patch file along the ...
Dmytro Shevchenko's user avatar
4 votes
Accepted

How to get PageViewEvents from Interaction

You should get a contact with expanded interactions which will contain page events. private async Task<IReadOnlyCollection<PageViewEvent>> GetAllPageEvents(Guid contactId) { ...
grg's user avatar
  • 1,811
4 votes

xConnect Contact Identifier Search

Contact Identifiers are considered PII sensitive and are not indexed by default. To enable indexing of PII sensitive data, set IndexPIISensitiveData to true for xConnect index worker which is ...
grg's user avatar
  • 1,811
4 votes
Accepted

How to properly configure a custom facet in Sitecore 9.1

You need to perform the below steps to achieve this: Create a Custom Facet Model Register the Custom Facet Model Deploy Custom Facet model to XDB Add it to the Sitecore.XConnect.Client....
Himmat Singh Dulawat's user avatar
4 votes
Accepted

Updating model of custom facet

NOOOOOOOO Under most circumstances this is a horrible idea. The reason is if you change from a string to a bool or a string to an int, when the Newtonsoft deserializer runs in xConnect, it will ...
Chris Auer's user avatar
  • 13.1k
4 votes
Accepted

Custom facet from a contact is coming null but when creating a new one Sitecore is complaining that the facet already exists

When you retrieve a contact from xConnect, you should specify which facets should be returned with this contact by passing an array of facet keys into the ContactExpandOptions. The only facets that ...
Anna Gevel's user avatar
  • 1,918
3 votes

Can we use xDB contact to do a Lookup for users

API endpoint There is an api route for that (it is being used by exp. profile in fact): [host]/sitecore/api/ao/v1/contacts/search?pageSize=100&pageNumber=1&sort=visitCount%20desc&match=...
Andrey Bobrov's user avatar
3 votes
Accepted

Sitecore Contact Send Email using EXM

You can force the contact email into xDB so it will be available during the session. Contact contact = Tracker.Current.Session.Contact; //update email in xDB var recipientRepository = ...
Nathan Hase's user avatar
3 votes
Accepted

How to programatically add contact to a contact list in Sitecore 9.0u1

Besides implementing the chorpo's code, please try enabling the indexing of anonymous contact data. To do that, please go to the following file locations of your xconnect site: \App_data\config\...
Foysal's user avatar
  • 506
3 votes
Accepted

Experience Profile custom facet retrieval error

Go to your Azure Sitecore Reporting instance and select "Application settings" under the Settings menu. Under "Application settings" on the right, add a new "APP SETTING NAME" called ...
Navneet Pisharodi's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible