# EGYM Member Account Concept

> Please note that below information is critical to understand to eliminate issues with member
synchronization over EGYM MMS API.


## Regulatory fundamentals

The legal framework we operate in requires us to separate gym data from EGYM data. In other words we
keep data from the Member Management System (MMS) separate from EGYM data. This requires us to work
with different profiles for a single person. Profiles allow us to keep gym data separate from EGYM
data, but still connect the data points in the background into a single user account. See below the
comparison of what data is owned by the gym and only processed by EGYM vs data that is explicitly
owned by EGYM.

| details | Data owned by the gym | Data owned by EGYM |
|  --- | --- | --- |
| Contractual basis for EGYM | Data Processing Agreement with the gym | EGYM terms and conditions accepted by end user |
| Affected data | All member data we receive from the MMS & TA (name, email, age, gender, picture); Health checks from the Trainer App; Trainer related information (e.g. comments, tasks chains); Class Bookings | Everything we collect directly from the user, e.g. via the BMA after the user signed the terms and conditions; Includes: training plans, training results, body data and measurements, BioAge, etc. |


Taking into account the above, we distinguish 3 parts of EGYM account.

![egym_account_concept.png](/assets/egym_account_concept.f2a6ba593ddc7d75a2713bc654cbc228a42f0eee33572f9dffb106bdea5ee5d8.43efe03a.png)

**Account** represents a group of profiles that belong to one and the same person. It can be thought
of as the representation of the actual physical person. It can only ever contain one EGYM member
profile, but several gym profiles that we manage on behalf of gyms. In the MMS API it is uniquely
represented by *accountId*.

**EGYM Member Profile** is only present when the user accepts the EGYM T&C or the Wellpass T&C. It
contains the profile data (Name, Surname, eMail, DoB etc.) that is entered by the user himself and
shown to him on e.g. the BMA. The email of this profile will always be the same as the EGYM ID Login
email.

**Gym Chain Profile** is present once the user is a member of a gym and personal data is transmitted
to EGYM by an MMS ([API](/mms-api-v2/apis/mms-v2/member-account/publishaccount)), Trainer App or EGYM
Machine. We store one gym chain profile for every Gym Chain (
Legal Entity) the user signed an agreement with. It means that there couldn’t and shouldn’ be more
than one gym chain profile for a person and, since, gym profile is differentiated by email and
membershipId (memberId in the MMS) there is a uniqueness restriction we enforce:
email address should be unique within gym chain and membershipId (memberId) should be unique within
gym chain.