Team Import Interface logic

This section describes how the standard Team Import Interface converts team CSV data into the Workforce Management system. This section references field specifications in Team Import Interface field specification.

General

The Team Import file is a CSV text file with columns enclosed in quotes if there are commas in the column field value. The records in the file are processed sequentially from top to bottom.

After the Team Import is performed, the interface automatically adjusts the team node adjacency tree model.

Team string (column 1)

The Wbt_String team string field (column 1) indicates the team hierarchy to edit, add, or delete. The Wbt_String team string value can be in one of these formats:

  • ~~Team1|Team1_type~Team2|Team2_type~…~TeamN|TeamN_type

    This format has two tildes (~) at the beginning, which indicates that this team string is a full team hierarchy path from the Workforce Management Root (since the full hierarchy always includes the Workforce Management Root as the root team node).

    Team_type is optional for each team. If defined, the associated team is updated with the new team type. If Team_type is not supplied and a team is created, the global team type definition is used (the Team Type interface parameter value).

    The leaf team (TeamN) is the team for which the user-role assignments are made.

  • ~Team1|Team1_type~TeamN|TeamN_type

    This format has one tilde (~) symbol at the beginning, which indicates that Team1 is the parent of TeamN, a partial hierarchy team path. There are possibly other teams directly above Team1 (Team1 might have parent teams).

    The leaf team (TeamN) is the team for which the user-role assignments are made.

The maximum size of the team string cannot exceed 1000 characters. Therefore, all the team level names combined cannot exceed 1000 characters.

Team action (column 2)

The Team Import Interface lets you move, add, or delete teams and update team location from the CSV file. Team updates are dictated by the combination of the Wbt_Action and Wbt_String fields. This table describes the behavior of the Wbt_Action field (column 2).

Action Description
ADD The ADD action creates a team within the given team hierarchy or moves the team's location if all the teams in the team string hierarchy exist. In addition, the ADD action updates the team type and description, if necessary. These examples use the ADD action with the team string scenarios:
  • For a full hierarchy team path (for example, ~~Team1~Team2~Team2.3~Team2.3.5):
    • If Team2.3.5 does not exist, a new team is created.
    • If Team2 exists, but is not in the listed hierarchy, the team is moved to the indicated hierarchy (along with all of the related sub-teams).
    • If any of the team types differ from the team types that are specified in the data file, then the team types are updated.
    • If all the teams in the hierarchy exist (including Team2.3.5), then team types are updated if specified in the data file and only the description of Team2.3.5 is updated.
    • If none of the indicated teams exist, then all the teams are created from the Workforce Management Root (Workforce Management Root->Team1->Team2->Team2.3->Team2.3.5).
  • For partial hierarchy team path (for example, ~Team3.1~Team3.1.1):
    • If Team3.1.1 does not exist, the team is created as a sub-team of Team3.1.
    • If Team3.1.1 exists as a child node under Team3.1, then the team type is updated if necessary and the description of Team3.1.1 is updated.
    • If Team3.1 does not exist, an error is returned since the interface does not know where to place Team3.1.
DELETE The DELETE action removes the team from the Workforce Management application.
ADD_LOCATION The ADD_LOCATION action updates the parent location for existing teams. These examples use the ADD_LOCATION action with these parent location scenarios:

Team 1 (location 1) ~Team 2 (location 2), Location 2 has Parent Location 1

Team 3 (location 3) ~ Team 4 (location 4); Location 4 has Parent Location 3

  • Scenario 1: If the Team hierarchy is changed from Team 1 to Team 4, then:
    • Team 4 is still associated with location 4.
    • The Parent of Location 4 changes from Parent Location 3 to Parent Location 1.
  • Scenario 2: If the Team hierarchy is changed from Team 5 to Team 2, then:
    • The parent of Location 2 changes, but there is no Team 5 in the system.
    • No changes are made because Team 5 does not exist.

If no action is specified in the Wbt_Action field, no action is performed.

Roles (column 3)

The Wbrole_Name field allows the application to retrieve the role ID field from the WORKBRAIN_ROLE table. If this field is null, then no role assignments are made for this team. If the role cannot be found in the WORKBRAIN_ROLE table, an error is returned.

Users (column 4)

The Wbu_Name field is the user name of the person filling the role. If this field is null, no user-role assignments are made for this team. The user name must already exist in the Workforce Management application; otherwise, an error is returned.

Team user-role actions (column 5)

The Team Import Interface lets you add, delete, or update team user-roles from the CSV file. User-role actions are dictated by the Wbut_Action field. This table describes the behavior of the Wbut_Action field (column 5).

Action Description
ADD The ADD action assigns the user (Wbu_Name) to the given role (Wbrole_Name) of the specified team (Wbt_String) during the specified date range (Wbut_Start_Date and Wbut_End_Date).

If another user is assigned the same role within the same date range and the Overrides Existing User Team check box is selected, the existing user is overwritten by the new user. If the Overrides Existing User Team check box is cleared in this case, an error is returned.

UPDATE The UPDATE action searches the system for the role (Wbrole_Name) of the specified team (Wbt_String) that is assigned during the specified date range (Wbut_Start_Date and Wbut_End_Date).

If the team role assignment exists and the Overrides Existing User Team check box is selected, the new user (Wbu_Name) is assigned the role for the dates that are specified.

If the role for the specified team is not originally assigned, then an error is returned. Updates are used only for re-assigning existing roles.

DELETE The DELETE action removes the user (Wbu_Name) from the role (Wbrole_Name) of the specified team (Wbt_String) during the specified date range (Wbut_Start_Date and Wbut_End_Date).