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
4 votes
Accepted

Send email to contact before deleting the contact

Email Experience Manager(ExM) doesn't send and finish all things related to email immediately. Your code will put the email into an "automated message bus". And then your email will be sent. ...
Anton's user avatar
  • 3,821
2 votes

Can we get all contacts data from xdb through code?

Code below should do the trick. It gets contacts from xDB in batches of 200 and adds them to the list. Then returns the list. public async Task<List<Contact>> GetAllContacts() { var ...
Marek Musielak's user avatar
  • 23.8k
2 votes

Sitecore.XConnect.Contact vs Sitecore.Analytics.Tracking.Contact

You don't need to explicitly convert Sitecore.Tracking.Analytics.Contact to XConnect.Contact as this is done on session end where data collected by the tracker is converted. You can take a look at the ...
Cristi Vulturar's user avatar
2 votes

How to programmatically trigger a goal to contact and then retrieve it in the same visit and in later visits

Goals of the current visit (interaction) are stored in the session and can be retrieved using Tracker API: List<PageEventData> pageGoals = Sitecore.Analytics.Tracker.Current.Interaction.Pages ...
grg's user avatar
  • 1,811
1 vote

contact added manually not appeared in contact list in list manager sitecore 10.2

PS: I am not having access to the comment, so adding it as an answer. Hope this is helpful. Contact information is stored in the xdb collection database. You can check the data in the ContactFacets ...
Ravindra Mishra's user avatar
1 vote
Accepted

Make Sitecore contact as inactive when exm bounce contact email

Sitecore stores information about email addresses in EmailAddressList facet (Sitecore.XConnect.Collection.Model.EmailAddressList). EmailAddressList contains: public EmailAddress PreferredEmail { get; ...
Marek Musielak's user avatar
  • 23.8k
1 vote
Accepted

How to implementing keyword search with xconnect contact facet search?

xConnect Search does not support Contains extension method as you rightly identified, you may fetch the contacts in batches using GetBatchEnumerator and iterate through contacts until you find the ...
Suneeth Sunkari's user avatar
1 vote
Accepted

How to mock XConnect contact

If you go with the second option (real Contact instance), you can use reflection (e.g. ReflectionUtil) to set FacetMap property on the contact instance. FacetMap is then used by Facets and GetFacet ...
Marek Musielak's user avatar
  • 23.8k
1 vote

Can we get all contacts data from xdb through code?

I have updated the code suggested by @Marek for you without async and await: var allContacts = new List<Contact>(); using (Sitecore.XConnect.Client.XConnectClient client = Sitecore....
Himmat Singh Dulawat's user avatar
1 vote

Reloading contact into session fails

The CM server does not process xDB since the role ContentDelivery or Standalone is not enabled. This is by default to prevent CM activity from polluting the xDB database. Your code will only work on ...
Chris Auer's user avatar
  • 13.1k
1 vote

LeaseOwner and LockAttempt does it work in Sitecore 9.3 Analytics

You don't need to use in Sitecore 9 the LeaseOwner and lock/unlock contacts. With Sitecore xConnect it was simplified a lot how to send data to xDB. In Sitecore 8+ to update data you have to use next ...
Vlad Iobagiu's user avatar
  • 18.5k
1 vote

What's the best way to get the current Contact's location?

In order to get around this drawback on one of our projects we have relied on Akamai to send the user location(in our case the country) and we would do personalization based on this data instead of ...
Cristi Vulturar's user avatar
1 vote

Retrieve Sitecore Contacts based on current contact ID

When website user is anonymous his data is stored in session and appears in xDb only when session is ended. You can force flush contact with his session in xDb by: var manager = Factory.CreateObject(&...
x3mxray's user avatar
  • 3,150

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