Steps to Import accounts / contacts through schedule csv from SCP 11001 build

Steps to Import accounts / contacts through schedule csv from SCP 11001 build

This is applicable only from 11001 builds.

How to do?

# Based on the Globalconfig table entry with category as 'CSVUserImportSchedule', this can be turned ON/OFF. By default this is turned OFF. 

Query to enable the feature - update Globalconfig set Paramvalue='true' where Category='CSVUserImportSchedule';

# Mapping of the user's fields with the CSV file can be specified in the 'ScheduledCSVUserImportMapping.xml' file present under $SCP-HOME\conf directory. This is a daily schedule.

# Schedule time has to be set via database. Use the query given below to set the time. Highlighted time can be changed 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');

Note: Once the query is executed in the database,restart the application.

Configurations in ScheduledCSVUserImportMapping.xml

# The fields 'filePath' and 'fileName' are used to locate the needed csv file for the user import. After the import, the csv file will be renamed automatically to avoid unnecessary (or) repeated imports.

# If portal specific files are available, specific the file path as [filePath]\$PORTALID (eg: C:\ManageEngine\SupportCenter\$PORTALID) and place the respective files under, [filePath]\[portalid]\[fileName] (eg: C:\ManageEngine\SupportCenter\601\requesters.csv), where portalid is the id of the portal to import. 

In the XML file, you only have to give the variable $PORTALID at the end of the file path as shown below( No need to provide the portal Id in this XML):
In the File name, you have to give the CSV file (ex - Requesters.csv) name that you are going to import


Preview

# In the above case, we need to create a folder named 601 manually under SupportCenter directory.
You have to create separate folders for each Portal ID inside the path "C:\Program Files\Manage Engine\SupportCenter Plus" as shown below:
Ex snapshot (1,2,601 are portalID created as folder)

Preview

# The portalid can be obtained from result of select * from helpdeskdetails query

# If a single file contains portal data, specify the file path as [filePath] (eg: C:\ManageEngine\SupportCenter) and place the files under, [filePath]\[fileName] (eg: C:\ManageEngine\SupportCenter\requesters.csv).

# DisplayName, LoginName, Password and PortalID is mandatory. If any of these filed is missing the requesters.csv then import will be getting failed. In the below CsvFieldName is your CSV header name of the corresponding values.

# Default available USERFIELDMAPPING are
 <USERFIELDMAPPING AppFieldName="displayName" CsvFieldName="displayName"/>
 <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"/>
 
# In addition to the default available USERFIELDMAPPING,  we can add this for
 <USERFIELDMAPPING AppFieldName="errormailaddress" CsvFieldName="tech2@sdpmsplinmail.com"/>
  This USERFIELDMAPPING is used to send a mail if the import has beed failed.
 
# We can configure Additional fields as well to import the contacts with additional fields.
 <USERFIELDMAPPING AppFieldName="userSingle" CsvFieldName="userSingle"/>
 <USERFIELDMAPPING AppFieldName="userMulti" CsvFieldName="userMulti"/>
 <USERFIELDMAPPING AppFieldName="userPick" CsvFieldName="userPick"/>
 <USERFIELDMAPPING AppFieldName="userNumeric" CsvFieldName="userNumeric"/>
 <USERFIELDMAPPING AppFieldName="userDate" CsvFieldName="userDate"/>

 ImportCSVConfig

CSV format should be as below and Portal ID should be present as shown

Preview