Batch Create & Update User Accounts
  • 22 Apr 2024
  • 5 minute read
  • Dark
    Light
  • PDF

Batch Create & Update User Accounts

  • Dark
    Light
  • PDF

Article Summary

☑️ Prerequisite Skills

Upload Dataset

User Accounts

Creating user accounts one at a time can be time consuming, especially if you have a constant stream to add to your database. Thankfully, Upload Dataset empowers you to import not only data in bulk, but user accounts as well.

Batch Importing User Accounts with Upload Dataset

If you aren’t yet familiar with the Upload Dataset tool, refer to our article on  Upload Dataset Stages.

When importing a spreadsheet that consists of user data, selecting the destination scope User causes the source format or ad hoc file import to create or update user records. Since the general aspects of importing user data are the same as importing any other kind of data, this article will focus specifically on the user destinations. User-scoped destinations include three categories:

  • Account - This category contains destinations for basic account information.

  • Access Permissions - This category contains destinations to add or remove realms, roles, and permissions.

  • Field - User-scoped custom fields appear as destinations under this category.

To batch import user data:

  1. Your From the main navigation, select Database.

  2. Under Import and Data Processing, select Sources / Upload Dataset

  3. Click Upload Dataset.

  4. Configure the following settings:

    • File Format: New Spreadsheet/Data File

    • Folder: Keep uploads organized by placing them in an existing folder, or select Other to create a new one.

    • File Type: Select the type that matches your file.

    • Destination Scope: User

    • Update Only: Select this option if the imported file should not create new records and should only update existing records.

  5. Click Add Files and select a file, or drag in a file from your desktop. Repeat as necessary.

  6. Click Upload. You are redirected to the summary page for the source file.

    Select_Destination_Scope_User.png

Matching Criteria

When importing user-scoped data, Slate attempts to prevent the creation of duplicate records by finding an existing, matching user account. As soon as a user account matches a mapped item, Slate considers the account to be found, and it will stop evaluating subsequent matching criteria. The order in which these criteria are evaluated is important:

  1. User GUID (Matching Only) - This is the 36-character unique identifier of the user account. Matching only means that this will not update the GUID; it is used only to find potential matches.

  2. User ID - This is the ID that the user will use to log in to Slate. If the account does not exist yet, or a match was made from previously evaluated matching criteria, and the user ID does not match, then the user ID will be updated.

  3. User-scoped unique custom fields - If the unique field value does not yet exist or does not match what was mapped in the source, the value will be updated.

If a matching user account does not exist, and record creation is not disabled for the source, then a new user will be created. The following items are required for user account creation: User ID, First Name, Last Name, and Email Address.

Access Permissions

Adding and Removing Realms from User Accounts

A user can be associated with multiple realms. To add new realms to a user account, simply map the realm destination. 

One way to associate a user with more than one realm in the same import is to use a single, delimited list of realms within a single column mapped to this destination:

Alternatively, the  Realm destination can be mapped for multiple source columns:

Likewise, realms can be removed from the user account via the import. The  Realm - Clear Al l destination will remove all realms from the user account that are not explicitly added via the import. 

The  Realm - Remove destination targets specific realms for removal from a user's account. Realms can be removed singly or multiply using either a single, delimited column, or with multiple columns each mapped to Realm - Remove. Each realm mapped to the Realm - Remove destination is removed from the user account.

Adding and Removing Roles and Permissions with Populations

Roles and permissions have the same destination options as described above for realms: add, remove and clear all.

Grant users permissions or roles only if they reside in a given population

The Population for Permission/Role destination adds or removes a given role or permission, but only if a user is associated with a specific population. For example, a user might be granted the Lookup - Person permission, but only if they are a part of the Chemistry population.

To add a given permission only to users within a specified population:

  1. Upload a file using Upload Dataset that specifies:

    • A user,

    • A permission or role to be granted, and

    • A population to be affected.

      Example_Population_for_Permission_or_Role_File.png

  1. Click Build Import. You arrive at the Field Mappings stage.

  2. Map the fields to their respective destinations:

    • For Population, select Access Permissions>Population for Permission/Role.

    • For Permission, select Access Permissions>Permission or Role

      Field_Mappings.png

  1. Select the next stage, Prompt Value Mappings.

  2. Click Refresh Values.

  3. Select a value. A pop-up appears.

  4. Select the corresponding Destination Value from the list.

  5. Click Save. Repeat for the other value.

  6. Select the stage Review & Run Import.

  7. Click Run Import.

Prompt_Value_Mappings.png

After clicking Force Process Import in the Database section of the main navigation, check the Population tab of the user record from your imported file. They have been granted the permission you specified in the file.

Assign permissions or roles to more than one population with groups

The previous section describes adding a single permission to a user within a given population. If you want to add (or remove) permissions or roles from a user that exists in multiple populations, you can use groups. In the Value Mappings stage, you can map unique population groups as needed to the desired populations, granting corresponding permissions or roles for just that population.

pop_groups.png

Let's say you want to grant Alexander Hamilton, a chemistry advisor, the roles and permissions associated with the Chemistry Department (as represented by the population Chemistry) as well as the roles and permissions associated with their role as an advisor (represented by the population Advising Staff).

By default, any Access Permissions destination starts in group 1, so we can leave the Chemistry population fields alone. As we set destinations for the Advising population, we enter "2" in the Group field. See the following example, which shows the mappings for the fields Role for Population 1 and Role for Population 2.

A single population can be applied to any number of  Role, Role - Remove, Permission, and Permission - Remove destinations by mapping each of them with the same group number as the corresponding  Population for Permission/Role destination.

🔔 Important!

The Role - Clear All and Permission - Clear All destinations are not groupable - they will remove all roles or all permissions for the user, regardless of the population with which they may be associated.


Was this article helpful?