In this article, we will cover how to update user profile fields using a CSV file in the People application.
We will outline the process of exporting, updating, and re-importing a CSV file.
This method updates any profile field you require and is most useful when changes are needed en masse across a large number of users.
In this scenario, we will bulk update a field created to host phone number information ‘Mobile’ so it reflects the current information for each user that there is data for.
For more information on User Profile Fields, check out our guide here.
The first stage of updating a user profile field is to export user information via CSV. This will give you the current information that is attached to each user on the system.
At this point we do not wish to create large export that includes superfluous information, instead, we only want to include the bare minimum fields required for the import to run successfully alongside the field(s) we want to update.
1. Head to Admin > People, and select Export users. This area will show you a list of all available (hardcoded & custom-made) fields that can be updated.
2. Choose the relevant fields including the field you wish to update and select Filter.
By default, ‘Username’, ‘First name’ and ‘Surname’ will be selected.
⚠️ The username must be included in any CSV re-import so the system knows who to tie updates to, upload will fail without the username being included.
It is best practice to include first name and surname in your exports, as this allows you to easily identify each user when making edits and lowers the possibility of errors in data entry.
For this example, the 'Mobile' field has been selected as well as the User ‘ID’ field to help identify the user for each column.
Reminder: The CSV export will include both active & blocked accounts. You can include the 'Account State' option when filtering the CSV so you can determine the status of each account. Where 'yes' denotes an active account and 'no' is blocked.
3. Download the data by selecting CSV.
💡 Tip: The order of the columns will be reflected as per the field list. You can change the column order by using the blue arrows next to the field names.
When opening the CSV, the selected fields will display the current information for each user. The column title will reflect the symbolic name of the profile field.
When editing the CSV file in your chosen external program, there are certain caveats when using specific providers - in general, we recommend avoiding Microsoft Excel due to the issues it can cause in data formatting and subsequent re-import.
Excel can be used successfully but your team will need to be vigilant about data entry, ensure the absence of excel processing and export the file from Excel in CSV format to ensure successful re-import into the Intranet.
More information on alternatives here.
1. In the downloaded CSV, enter the new data in the relevant column(s) for the users.
This is the stage where the CSV can be edited where a change is required.
Copying/pasting information from your repository into the CSV is fine, vigilance is key to avoid incorrect data entry whilst getting the CSV ready for import.
In this example, the symbolic name used for the Mobile field is [m]usr_mobile
Please note: The symbolic name is important in identifying the profile field. The symbolic name should not be altered when editing the CSV.
The new field information should all be entered in the same format, and the format required will depend on the type of the field itself.
In the 'Mobile' example the field type is 'string' therefore any combination of letters and numbers is accepted and will be read by the system successfully.
Other types have different expectations however, for 'date' type fields the data entry is required to be YYYYMMDD with no hyphens, slashes etc separating the numbers.
Check out the list of data entry expectations per field type here.
2. Save this file as a CSV.
Depending on the provider you used to edit the CSV, the option to save the file as a CSV may be deeper in its settings or require clicking 'save as' first to see CSV as an option.
If the file is not saved in CSV format the import to the Intranet will fail.
The last stage of updating a user profile field is to re-import the updated CSV. The import process will replace the existing data based on information in the CSV.
1. Head back to Admin > People, and select Add/Update from CSV file:
2. Select or use our drag & drop feature to upload the CSV
Synchronisation mode should only be used in situations where mass deletions are taking place, as with this enabled the system will copy everything from the CSV imported, deleting all other user-profiles and information not included in it.
Reminder: Ensure the Synchronisation mode is not selected when importing a CSV that is only to update information.
3. Check the Update column for all relevant users.
The Update column indicates the user found in the system and in the uploaded CSV. If the option is not available, please ensure the user exists in both the system and CSV (Username or User ID should match in both areas).
Please note: If your CSV contains a lot of users the system may not be able to handle all the changes in a single import. To combat this, you will need to import the CSV in smaller batches of users and/or exclude blocked accounts from the CSV so only active accounts are updated.
4. Select the Confirm submit button (found on the bottom of the page) to confirm the changes.
Once the CSV has been successfully imported, you will see a list of the changes applied for each user.
💡 Tip: You can find the total number of updated users at the bottom of this list.
To check information has been updated successfully, head to any user profile that was included in the CSV and confirm the fields have been updated as expected.
(To ensure fields show on user profiles, you will need to add them to display in the 'view profile page' area)