Schedule and Import Accounts and Contacts from CSV

Schedule and Import Accounts and Contacts from CSV

SupportCenter Plus allows you to schedule and import accounts and contacts from CSV files. This feature is especially useful to import data periodically from other applications. 

This requires admin access to the product database and installation folders. 

  1. Connect to the database. To know more, click here.

  2. Enable Scheduled CSV import by executing the following query.
         update Globalconfig set Paramvalue='true' where Category='CSVUserImportSchedule';

  3. Obtain Portal IDs by executing the following query. 
          select * from helpdeskdetails; 

  1. If you want import portal-specific data, do the following. Else skip this and go to Step 5.
    Create folders based on the Portal IDs under the home directory. Example: For Portal ID  301, create a folder with the same name under the home directory. The CSV files for the portal with ID 301 will be placed under <SupportCenter_Plus_Home>\301.

  1. Define mapping in 'ScheduledCSVUserImportMapping.xml' file present under <SupportCenter_Plus_Home>\conf directory.            

                 a. For single portal setups, configure the filePath and fileName using the following lines. 
                           <USERFIELDMAPPING AppFieldName="filePath" CsvFieldName="C:\ManageEngine\SupportCenterPlus"/>
                           <USERFIELDMAPPING AppFieldName="fileName" CsvFieldName="requesters.csv"/>
                b. If you want to import portal-specific data, add PORTALID in the CsvFieldName. 
                           <USERFIELDMAPPING AppFieldName="filePath" CsvFieldName="C:\ManageEngine\SupportCenterPlus\$PORTALID"/>
                            <USERFIELDMAPPING AppFieldName="fileName" CsvFieldName="requesters.csv"/> 
  1. The data will be imported from requesters.csv file.
  2. $PORTALID should be replaced with the actual portal id obtained in step 2. Example:For Portal with ID 301, use C:\ManageEngine\SupportCenterPlus\301
  3. After the import, the csv file will be renamed automatically to avoid unnecessary (or) repeated imports.<USERFIELDMAPPING AppFieldName="displayName" CsvFieldName="displayName"/>

             
                       c.  Map the user fields as required. The default mapping is as follows.
                                    <USERFIELDMAPPING AppFieldName="firstName" CsvFieldName="firstName"/>

         <USERFIELDMAPPING AppFieldName="lastName" CsvFieldName="lastName"/> 

         <USERFIELDMAPPING AppFieldName="emailId" CsvFieldName="emailId"/>

         <USERFIELDMAPPING AppFieldName="phone" CsvFieldName="phone"/>

                       <USERFIELDMAPPING AppFieldName="mobile" CsvFieldName="mobile"/>

                       <USERFIELDMAPPING AppFieldName="account" CsvFieldName="account"/>

                       <USERFIELDMAPPING AppFieldName="login" CsvFieldName="login"/>

                       <USERFIELDMAPPING AppFieldName="password" CsvFieldName="password"/>

         <USERFIELDMAPPING AppFieldName="portalId" CsvFieldName="portalId"/>

  1. You can map both default and additional fields
  2. The fields DisplayName, LoginName, Password and PortalID are mandatory. If any of these filed is missing the requesters.csv then import will be getting failed.
  3. To send email notification when import fails, add the following replacing "emailaddress" with an actual email address
    <USERFIELDMAPPING AppFieldName="errormailaddress" CsvFieldName="emailaddress"/>
  1.  Schedule the time using the query given below. the highlighted data and time can be changed in the query. The data will be imported from csv files daily at the time mentioned in the query.
                  update task_input set schedule_time = '2020-09-15 14:23:00.000' where schedule_id in (select schedule_id from schedule where schedule_name ='CSVuserimportschedule');

Restart the application of the changes to take effect

  1. Store the CSV files: 

To import accounts and contacts irrespective of portals:

Place the CSV files in the home directory. 

To import portal-specific accounts and contacts:

Place the CSV files in the respective directories as created in step.
You can download the sample CSV below.