Relationship between 'users' and 'contacts' in Kentico 8.2

steve burleigh asked on June 23, 2017 19:14


I have some questions regarding the relationship between Kentico Users and Contacts - namely has does this work?

The Kentico site I use has Users created when a user logs in - with additional user data (i.e. email / address / member info etc) populated from an external database. The data is just 'stored' on Kentico and cannot be edited here i.e. the database acts as the actual source of data for a user's profile.

I'm trying to map this data against the same User's Contact record, and I've mapped the appropriate fields in Kentico between the User and Contact modules, but I cannot see why the data from the User profile isnt actually populating against the Contact record.

To try and understand this, i wanted advice / help on the following:

1) Should data from a user record automatically populate the same contact record once the fields have been mapped? 2) Do you have to rely on a user logging in order for the mapping to take place each time? 3) Why does the primary contact (i.e. where there are multiple associated contacts for the same user) not always contain the data mapped from the Contact? I suspect that this might be that i've not got the settings quite correct for the EMS setup - but I'm not quite sure 4) If a macro is used for the default value of a particular field, does this require a user to login in order to popular the appropriate contact field?

I'd be really appreciative of any help and advice on this as i've been backwards and forwards through the documentation and can't quite get to the bottom of it.

I'm not a developer by the way!


Correct Answer

Brenden Kehren answered on June 23, 2017 20:26

This documentation has some good information in it if you haven't already read it.

Essentially, there isn't a direct map/relationship from a user to a contact. The relationship is via a membership mapping table. This table defines a type of member (user in your case) and the users id and links it to a contact.

So that being said, when a user:

  • Register on the website
  • Log in under a user account
  • Fill in customer data while making a purchase
  • Subscribe to a newsletter

The link between a user and a contact is created.

0 votesVote for this answer Unmark Correct answer

Recent Answers

steve burleigh answered on June 25, 2017 15:25

Thanks for your response Brenden - much appreciated, the clarification on how the contact link to user was created was really helpful.

I'd been hoping that the site user didnt need to 'actively' do anything to create the link - we've got about 90k users on the site, and had been hoping that i could link them to their contact record without the user actively doing anything.

I think a manual upload of data might help in this instance


0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on June 26, 2017 18:45

You could create a link between them if you wanted manually but you'd have to be able to identify a unique user and contact by name, email, etc. I'd suggest running a few queries against your contacts and users and find out how many duplicates you have or don't have and then run a query to create that link.

Understanding you're not a developer may cause some problems with this but it can be done.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.