...
// Generic User Import File Field Names (keys for dictionary)
private const string DeactivateUserKey = "Deactivate (X)";
private const string OrgPathKey = "OrgPath";
private const string OrgLoginKey = "OrgLoginID";
private const string LoginKey = "LoginID"; //This can be UserName or EmailAddress
private const string PasswordKey = "Password";
private const string FirstNameKey = "FirstName";
private const string LastNameKey = "LastName";
private const string EmailAddressKey = "EmailAddress";
private const string ContactEmailKey = "ContactEmail";
private const string CanViewReportsKey = "CanViewReports";
private const string ForcePasswordChangeKey = "ForcePasswordChange";
...
Example CSV:
Default CSV Format:
[DX]Note: Order does not matter.
Deactivate (X), OrgPath, OrgLoginId, LoginId, Password, FirstName, LastName, EmailAddress, ContactEmail, CanViewReports, ForcePasswordChange,[OrgProfileFieldName, OrgProfileFieldValue]*
Note:
The first column indicates whether a user should be deleted (D) or deactivated (X). Leave empty to create/update and activate the user
OrgPath: is optional if no OrgLoginId has been set. Add user to this organization
OrgLoginId: is optional if LoginId has been set. Don't update if empty. Used as a secondary look up key to find an existing user (if LoginId is empty)
LoginId: can be user name or email address. Optional if OrgLoginId has been set. Used as a primary look up key to find an existing user
Password: if the user already exists and left empty - the password is not updated
FirstName: will not be updated if empty
LastName: will not be updated if empty
EmailAddress: will not be updated if empty
ContactEmail: will not be updated if empty
CanViewReports: 'True' or 'False'. Anything not 'True' (e.g. empty) for new users will be interpreted as 'False'. For updates, will not be updated if not 'True' or 'False'.
ForcePasswordChange: 'True' or 'False'. Anything not 'True' (e.g. empty) for new users will be interpreted as 'False'. For updates, will not be updated if not 'True' or 'False'.
OrgProfileFieldName: case-insensitive OrgProfileFieldName (must exist for the organization at OrgPath)
OrgProfileFieldValue: value of the OrgProfileValue (will not be updated if empty, *remove* to delete the value)
[OrgProfileFieldName, OrgProfileFieldValue]* means that those columns can occur 0, 1, n times
A new user is created if a non-existing OrgLoginId is speficied or no LoginId is set
*remove* can be used to remove a user property/fieldvalue since leaving it empty doesn't update the property/fieldvalue
*remove* can be used for all columns except: [DX], LoginId, Password and OrgProfileFieldName.
Notes:
1) Currently the The importer assumes NEEDS that the headers are in the file. TODO update this when this can be flagged. The user importer uses the first line of the CSV to create it's mapping to the DB. If the keys in the CSV do not match the keys in the previous section, then a mapping must be added to the translation attribute (also above).
2) Default Passwords - currrently uses the user guid. force change is true for newly created user unless a password is specified inthe file or the attribute. Passwords will never update for existing users.
...