7

I've created an xConnect client API for Sitecore 9 that creates new contacts and sets the facet properties. I've added multiple contacts to xDB, however only one contact has shown in the Experience Profile search so far. I've tried adding a known contact and an anonymous one, but without any luck. When I look up the guid of the contact and enter it manually in the URL it does redirect to that contact, but that same contact does not appear in the Experience Profile search. I've also tried rebuilding the reporting database and rebuilding the search index. So far nothing seemed to help. Does anyone have any idea what it could be?

I create a contact like this:

var identifiers = new ContactIdentifier[]
{
    new ContactIdentifier(source, id, ContactIdentifierType.Known),
};
var xContact = new Contact(identifiers);

client.SetFacet<PersonalInformation>(xContact, PersonalInformation.DefaultFacetKey, personalInfoFacet);

client.AddContact(xContact);
client.Submit();

I create an interaction like this:

var interaction = new Interaction(existingContact, InteractionInitiator.Brand, Guid.Parse(channelId), ConfigurationManager.AppSettings["USER_AGENT"]);
Event ev = new Event(Guid.Parse(eventId), DateTime.UtcNow) { };
interaction.Events.Add(ev);
client.AddInteraction(interaction);
client.Submit();
6
  • The code looks fine, are you sure the existingContact is the contact you expect it to be? Commented Jan 24, 2018 at 12:51
  • What exactly do you mean by that? Commented Jan 24, 2018 at 12:52
  • How do you get the existingContact, are you sure you're not getting the Contact you do see in the experience profile everytime Commented Jan 24, 2018 at 12:54
  • I'm sure, because when I retrieve the guid of the new contact, and add the GUID to the url, so ExperienceProfile/contact?cid={GUID}, it returns the correct contact with the interactions and events. Commented Jan 24, 2018 at 12:56
  • The contact gets added correctly in xDB with all its facets. However it doesn't show up in the experience profile search. Commented Jan 24, 2018 at 12:57

5 Answers 5

2

In the initial release of Sitecore 9 the experience profile had some issues.
The 'To date' in the filter wasn't working properly.
I've added a screenshot of all known issues, these are fixed in Sitecore 9 update 1!

enter image description here

8
  • 1
    I'm already running on update 1 of Sitecore 9 Commented Jan 24, 2018 at 12:34
  • can you share the code of how you create the new Contacts and fill their facets? Commented Jan 24, 2018 at 12:35
  • I add a contact like this:var identifiers = new ContactIdentifier[] { new ContactIdentifier(source, id, ContactIdentifierType.Known), }; var xContact = new Contact(identifiers); client.SetFacet<PersonalInformation>(xContact, PersonalInformation.DefaultFacetKey, personalInfoFacet); client.AddContact(xContact); client.Submit(); Commented Jan 24, 2018 at 12:38
  • I add an interaction like this: var interaction = new Interaction(existingContact, InteractionInitiator.Brand, Guid.Parse(channelId), ConfigurationManager.AppSettings["USER_AGENT"]); Event ev = new Event(Guid.Parse(eventId), DateTime.UtcNow) { }; interaction.Events.Add(ev); client.AddInteraction(interaction); client.Submit(); Commented Jan 24, 2018 at 12:39
  • Could you add the code in your post, makes it alot more readable :p Commented Jan 24, 2018 at 12:41
2

Check the indexer is running and that there aren’t any errors in the indexer log. Check this doc entry post for more info.

Also consider whether you are searching by PII data, which is not indexed by default.

2

After rebuilding the reporting database and rebuilding the search indexer, I found that the 'Sitecore xConnect Search Indexer' service was't running in Windows services. After starting the service, the contacts started showing up in the experience profile.

1

Experience Profile shows contacts from index. Not directly from DB. Issue is definitely in indexing. It means that "sitecore_analytics_index"(I am not sure that it still have same name in Sitecore 9). Have you tried to rebuild this certain index?

What I suggest to do:

  1. Enable debug level of logging for indexing (crawling).
  2. Run "sitecore_analytics_index" index rebuild and check logs on any exceptions.

It will either give you a clue what happens, or you will be able to update question with more details.

UPDATE: All mentioned above is relevant only for Sitecore 7.5-8.x

5
  • I would not rebuild the analytics as listed in this linked document. Instead, you want to rebuild the reporting database. Commented Jan 24, 2018 at 23:56
  • @PeteNavarra I didn't understand your comment. List of contacts in Experience Profile is built using search index. If you have issue with index then nothing(or not all) will be shown. Samir has exact same symptoms. That is why I suggest him to take a look on indexing. Experience Profile doesn't work with aggregated data at all. I didn't suggest Samir to rebuild the reporting database.
    – Anton
    Commented Jan 25, 2018 at 9:49
  • Rebuilding reporting index is how you rebuild the analytics index. This is an old method that shouldn't be used. Commented Jan 25, 2018 at 11:50
  • Not anymore, indexing for XConnect in the 9 series is now completely independent to both aggregation (what the rebuild reporting database does) and content search (what other type of indexes in Sitecore use). See my answer for the link to more information on the XConnect indexer.
    – eglasius
    Commented Jan 25, 2018 at 15:29
  • @eglasius Nice one, thank you, I didn't know it. Will update answer that it is relevant only for Sitecore 8.(Probably someone on Sitecore 8 will have this problem)
    – Anton
    Commented Jan 25, 2018 at 16:56
0

Reporting such as Experience Profile is still aggregated data performed by the Processing pools. That's still the same as before. The difference between pre-9 with regards to contacts is that contact data is actually saved immediately instead of when session ends. This means that contact data still needs to be processed at a regular interval and then it will show up in the list. Take a look at the documentation on Reporting, Processing Architecture, Interaction aggregation to see the sequence of events.

1
  • That actually changed for the 9 series. XConnect has its own indexer, completely independent to the other Sitecore indexes as well as to aggregation.
    – eglasius
    Commented Jan 25, 2018 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.