How to create a Data Connector import rule to assign a user's department or location

Article:HOWTO64259  |  Created: 2011-12-28  |  Updated: 2011-12-30  |  Article URL http://www.symantec.com/docs/HOWTO64259
Article Type
How To



A custom Data Connector import rule can be used to assign departments or locations to users. This can also be scheduled so that the process becomes automated. The following information describes how to do this. Note: The following instructions assume that the user is familiar with creating and configuring Data Connector. Additional instructions on how to use Data Connector can be found in the Symantec Management Platform (SMP) User's Guide, listed in the Related Articles section, below.
 

  1. Create data in a comma separated value (.csv) or Excel (.xls or .xlsx) file that will include the users and/or departments and/or locations to import. Examples include:

    Users only

    Note: This data can include additional columns as desired beyond what is shown below. Certain columns are required and should always be included, however: User Name, Employee ID, Given Name and Surname.

    User Name, Employee ID, Given Name, Surname, Office Telephone
    John Doe, 1, John, Doe, 111-222-3333
    Joe Smith, 2, Joe, Smith, 444-555-6666

    Departments or locations only

    Users cannot be imported or updated and assigned departments or locations if the departments or locations do not first exist in the SMP. This will result in the users being created or updated but with blank department and location values. Therefore, if departments or locations do not already exist, a Data Connector import rule can be used to bring these in first. Note: This data can include additional columns as desired beyond the minimum shown below.

    Department Name
    Human Resources
    IT

    Or,

    Location Name
    New York
    Los Angeles

    Users and assignment to departments and locations

    Note: A department can be assigned, or a location, or both. Neither are require the other. The following example shows both being assigned.

    User Name, Employee ID, Given Name, Surname, Office Telephone, Department, Location
    John Doe, 1, John, Doe, 111-222-3333, Human Resources, New York
    Joe Smith, 2, Joe, Smith, 444-555-6666, IT, Los Angeles
     
  2. Create a Data Connector data source:

    a. In the SMP Console, click on the Settings button > All Settings.
    b. Click on and expand Notification Server > Connector > Data Sources.
    c. Right click on Data Sources and then click on New > CSV File Data Source or OLEDB Data Source (if using Excel files). Note: For the remainder of Step 2, it will be assumed that .csv files are used for data from Step 1. If Excel files are used, slightly different changes must be made to the data source to set up the Excel file and its worksheet.
    d. Click in the "New CSV FIle Data Source" title at the top of the data source page and change its name to what it is desired to be.
    e. Change settings accordingly. The defaults can normally be used with the following exceptions:

    * Click to enable "Allow import".
    * Click on the ellipse button for "Import from file" and select the file created in Step 1.

    f. Click on the "Save changes" button. Note: It us unnecessary to click on the "View import data" or "Test data source" buttons, however, it may be useful to click on the "View import data" button to ensure that the data is aligned correctly in the expected columns.
     
  3. Create a Data Connector import rule:

    a. In the SMP Console, click on the Settings button > All Settings.
    b. Click on and expand Notification Server > Connector > Import/Export Rules.
    c. Right click on Import/Export Rules and then click on New > Resource Import Export Rule.
    d. Click in the "New Resource Import Rule" title at the top of the import rule page and change its name to what it is desired to be.
    e. Click on the "Data source" drop down list and select the data source created in Step 2.
    f. Change settings accordingly. The defaults can normally be used with the following exceptions:

    * Click on the "Resource type" drop down list and select User.
    * Click on the "Resource lookup key" drop down list and select Resource Name.
    * Click on the Name drop down list and select the column for the user's name. From the examples above, this is "User Name".
    * The "Resource name" drop down list should be set to "User Name" (and disabled).

    g. Assign "Data class mappings" accordingly. If the columns from the data file match up to the data class names, these will be automatically set. From the examples above, this sets the following:

    * Given Name = "Given Name"
    * Surname = "Surname"
    * Office Telephone = "Office Telephone"
    * Department = "Department". Note: If assigning the department, both this data class and its association (described in step 3h) must be set. For locations, only the its association is set.
    * Employee ID = "Employee ID"

    h. Assign "Association mappings" accordingly.

    * Under the "Lookup key" column, click on the "Select a key" drop down list for User's Location and then click on Resource Name. Then, under the "Key column mappings" column, click on the Name drop down list and then click on Location.
    * Under the "Lookup key" column, click on the "Select a key" drop down list for User's Department and then click on Resource Name. Then, under the "Key column mappings" column, click on the Name drop down list and then click on Department.

    i. The import rule can also be scheduled in the "Run schedule" section. Note: If the Data Connector import rule is to be ran on a schedule, the user will need to have a method of updating the data file on a periodic basis so that new records or updates are then processed. This is generally done manually by the user as there is no simple way to populate a .csv or .xls file with desired data. Once this is ready, when the next schedule is executed for the import rule, it is assumed that new data is ready to be processed. If not, no changes are made.
    j. Click on the "Save changes" button.
    k. Click on the "Test rule" button. Using the above examples, this shows that two resources will be created if the rule is ran. Note: Before running this on a production server, ensure that the "Test rule" button is used to verify that the data to be imported is what is expected.
    l. When ready to begin a live import, click on the "Run now" button.


Related Articles

Symantec Management Platform 7.1 SP2 User Guide (also includes Data Connector instructions)
http://www.symantec.com/business/support/index?page=content&id=DOC4730

How to automate the assignment of departments and locations to users and computers
http://www.symantec.com/business/support/index?page=content&id=HOWTO64252

How to create a Data Connector import rule to assign a computer's location
http://www.symantec.com/business/support/index?page=content&id=HOWTO64381

How to import CMDB Solution departments and locations from Active Directory using a Data Connector import rule
http://www.symantec.com/business/support/index?page=content&id=HOWTO59218

How are Locations, Departments, Equipment and Services populated in ServiceDesk?
http://www.symantec.com/business/support/index?page=content&id=HOWTO30360



Article URL http://www.symantec.com/docs/HOWTO64259


Terms of use for this information are found in Legal Notices