1

We are adding contact through programming and it is added on Experience Profile after sometime.

How to avoid adding the same contact in Experience profile?

Code used for adding contact:

 using (var client = this.CreateClient())
            {
                    var source = "sitecore";
                    var id = email;
                    Tracker.Current.Session.IdentifyAs(source, id);
                    var trackerIdentifier = new IdentifiedContactReference(source, id);
                    var expandOptions = new ContactExpandOptions(CollectionModel.FacetKeys.PersonalInformation, CollectionModel.FacetKeys.EmailAddressList);
                    var contact = client.Get(trackerIdentifier, expandOptions);
                    SetEmail(email, contact, client);
                    client.Submit();

                    var manager = Factory.CreateObject("tracking/contactManager", true) as Sitecore.Analytics.Tracking.ContactManager;
                    manager.RemoveFromSession(Tracker.Current.Contact.ContactId); 
                    Tracker.Current.Session.Contact = manager.LoadContact(Tracker.Current.Contact.ContactId);

}
5
  • What do you mean by not adding to Experience Profile? You would like to hide contacts in Experience Profile? All contacts with interactions will appear there by default Apr 22 at 5:31
  • Dont want to show contact there after adding contact through programming. I dont know can I hide or remove in Sitecore ?
    – User7864
    Apr 22 at 5:54
  • You can explicitly deny showing Experience Profile icon in Launchpad so effectively hiding it for content editors. I am not aware of any other option Apr 22 at 6:50
  • You want to add a contact to Sitecore and not have them show up in XP? XP is a view of all the contacts in the xDB index. If you add them to xDB, they will show up in XP.
    – Chris Auer
    Apr 22 at 15:42
  • Would like to add contact in Sitecore. However, dont want to show in Experience profile. I dont know is it possible or not
    – User7864
    Apr 22 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.