Introduction
This article will show you, how to migrate your current users (guests and members) to the Perfect Gym database on your own. It may include their active or archival contracts and also basic information about their payment sources such as credit card details or bank account numbers and sort codes.
Important: If you migrate CC or DD details along with User data don’t forget to add CC tokens/DD mandate in the next steps by script if required by the provider
Before you start
Before the migration make sure you have an access to PGM -> Settings -> Support tools. Usually, it's available only for system admins.
Instruction
1. Download template
- To create and upload migration file go to the PGM -> Settings -> Support tools -> Migration
- Download the template file ( Users template),
- Your template has 2 tabs. On the first tab, you have the table where in each row you provide data for migrated Users. On the second tab, you can find the description of each column ( Description, what Information is required, eventual values)
2. Fill up Users template
A single column is intended for a separate guest or member (in the case of members, more lines are allowed only when we migrate more than 1 contract for a given member. Then we give the same externaluserid, but change the externalcontractID. User data is then left unchanged and we only work on the data regarding the contract).
Only the required and key columns for the migration will be described.
- ExternalUserId: described as Member's Id number from external system, for migration purpose you may use ID number that been assigned to the user in previous system, or you may ente rany value as long as it’s unique for each Guest or Member. If you upload several User templates into PGM, please make sure the externalUserID doesn’t exists in the system, cause otherwise you won’t be able to update profile data, and you may only add a new contract on the account. The only exception to duplicating it in the file is when you upload more than one contract for a single member. It won’t display in PGM after the migration.
- ExternalContractId: described as Contract Id number from external system. You may use agreement/contract id that was provided in the previous system, or you may ente rany value as long as it’s unique for each row and it doesn’t already exist in PGM. For Guests(users without any conract) leave it empty. It won’t display in PGM after the migration.
Example how to fill up externaluserid and externalcontractit for guest, member with single contract and a member with two active ones:
Columns from C to AA are the profile data that display in PGM > Club Members > User Profile > Data > Information.
- Name: Member's first name,
- LastName: Member's last name,
- Sex: Male or Female are possible values, so if some users have „other” option, the nit has to be changed manually or by script,
- BirthDate: it accept a regular format DD.MM.YYYY or DD-MM-YYYY,
- Email – email address,
- PersonalId – Member's personal Id,
- Phone – by default mobilephone is displaying on the profile, so I suggest to use next column,
- MobilePhone - adding phone number include country code, especially if you have phone numbers from abroad,
- PhotoUrl - we may upload photos separately by using different tool,
- Company- Company of a Member's,
- Street - Member's address - street,
- PostalCode - Member's address - zip code/postal code,
- City - Member's address - city,
- State - Member's state,
- Country - Member's address – country,
- UserNumber - Member's number in PerfectGym system after migration. If you leave it empty, the it will be generated by the system,
- ClubNumber - Number can befound in PGM>Clubs>List of Clubs in first column. By default the value for the first club is 101, but please check on that in PGM,
- MemberCardNumber - Meber's club card number (not credit card),
- Consultant - Consultant of the member, name and last name of the employee,
- IsActive - Is member active( is the contract active, not mandatory to provide), system suppose to calculate it by itself if you leave it empty,
- IsGuest - for guests we provide 1, for any row where we fill up contract details we have to provide 0,
- TodayBalance – current account balance on migration date. If no value is provided then the member will be migrated with debt,
- PrepaidBalance - Current balance of member's prepaid account,
Columns from AD to BJ are the information about the contract that we want to be created for the member
- SignUpDate - Contract signup date, we provide it in date format, like 01.01.2022; it cannot be in the future or later than StartDate Contract,
- StartDate Contract - start date in date format, by default it cannot be ealier that signupdate,
- EndDate - Contract end date in date format,
- MinCancelTimeMonths - Minimum number of months before contract cancelation,
- IsProrata - Does contract have a prorata,
- IsEndProrata - Does contract have an end prorata,
- ProrataDay - What day of month is prorata caltulated from,
- Membership - Name of Access Rule, it has to be configured in PGM first,
- PaymentPlan - Name of payment plan,
- PaymentPlanType - Name of payment plan type,
- VisitLimit - Limit of number of visits for given paymentplan,
- RemainingVisitCount - Remaining visits if VisitLimit is on,
- VisitPeriod - Time period per which visits are granted, for example if number of visits is limited per month, then VisitPeriod=month,
- SynchronizeWithContract - Used on add-on contracts to synchronise with main contract,
- TimePeriod - Is contract time interval based on days or months (for a year contracts it’s still month)
- ContractLength - Number of Time Periods in a contract (in PGM it’s the setting „Commitment period”),; for a year contract please use "12",
- ContractFrequency - Number of Time Periods in 1 payment interval, in PGM it’s called „Payment interval” in Payment Plan settings, for a year contract please tuse "12" as well
- IsUpfront - Is upfront payment checked for payment plan
- VatRate - Vat rate, we provide the value that already exists in the system, for example for 5% it’s 5.
- AdminFee - Administrative fee of a contract
- AdminFeeVatRate - Administrative fee vat rate
- MembershipFee - Membership fee
- PaymentType - Type of payment for the contract
- StartChargingFromDate - Date of first payment of a contract
- StartGeneratingTransactionsFromDate - PG will not generate transactions for contract before this date - this works on payment plan level
- ForcePaymentPlan - If true, payment plan will not be created based on migration file, but rather taken as a pre existing payment plan in the system
- PaymentPlanAutoName - If true, payment plan will be automatically named based on its parameters from migration file
- IsPaymentChosenDay - Is payment charged on a chosen day of month. If false the payment will be charged on 1st day of month
- IsAutomaticallyEnded - If true, the contract will end automatically after reaching minimal contract length
- IsAdditionalContract - Is contract an additional contract
- StopChargingAfterMinPeriod If true, user will not be charging after reaching a minimal contract length
- FreezeAvailable - Is freezing available for the contract
- AutomaticRenew - Is contract automatically renewed after ending
3. Upload the file and validate it.
- Validator will mark incorrectly filled cells and add cell comments telling you what needs to be fixed
- If the validator finds no errors in your migration file, it will highlight the header column in green color and the next step will be possible
- Once the file has been successfully validated, you can start the migration and the option "Migrate Users" will be possible,
- Refresh grid to see progress of your migration.