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();