Our client uses contact pattern matching and they noticed strange information in the dashboard. Total visits count for the contact (real person) is 157, but several patterns have 'Latest match: -216 visit ago' .

How can this happen and what can we do to fix it?

enter image description here

Sitecore 8.0 rev. 151127

UPD: image provided.

1 Answer 1


The logic of finding how many visits ago a pattern was matched is as follows:

  1. Find an interaction that matches a pattern by inspecting Profiles sub-document in Interactions collection in MongoDB.
  2. Subtract interaction index from total visit count of the contact:

Contacts.System.VisitCount - Interactions.ContactVisitIndex

Most likely Contacts.System.VisitCount field in MongoDB was not incremented when some interactions were saved and the count got out of sync. It might have happened due to an error during aggregation, during contact merge or while performing MongoDB operations. AFAIK, you should be able to update VisitCount for the contact and for any related contacts that were created during contact merge.

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.