This section explains the configuration files of the Data Manager. Those files are used by the Data Manager at runtime to:
Define the target Cirrus Shield instance in which the data is to be loaded using the specified user for the connection.Define the path and files to be used as source data to be imported into the corresponding Cirrus Shield instance.Define the mappings of the source fields (in the .csv files) to the target fields (in the Cirrus Shield instance)
1. Path to DataManagerConfig and DataMappingsConfig
In CirrusShield.DataManager.exe.config and CirrusShield.DataManager.vshost.exe.config files you have to change the following:
<appSettings> <add key="DataManagerConfig" value="C:DataManagerdatamanager.config"/> <add key="DataMappingsConfig" value="C:DataManagerdatamappings.config"/> </appSettings>
You specify the path to datamanager.config and datamappings.config in the value of these two keys in both files listed above.
datamanager.config: file containing information about the Data Manager.
datamappings.config: Definition file of the correspondences of the fields.
2. Configuration file : datamanager.config
In this file, you have to specify:
The username
The password of the user (encrypted value).
The URL of the Soap Api of your application for which protocol you are using “http” or “https” (Obviously the https is strongly recommended).
The CSV delimiter (, or ;).
The bulk size (the number of records to be inserted/updated at the same time).
The AutoExit (true of false): indique au data manager s’il doit donner la main à la ligne de commande en terminant le chargement ou s’il doit attendre une action manuelle de l’utilisateur.
Here is an example of how to set the datamanager.config file:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="UserName" value="nom.utilisateur@domaine.fr"/> <add key="Password" value="VALEUR_ENCRYPTEE_DU_MOT_DE_PASSE"/> <add key="HttpCSInstance" value="http://localhost:1739/CirrusShieldWS.asmx"/> <add key="HttpsCSInstance" value="https://ws.cirrus-shield.net/CirrusShieldWS.asmx"/> <add key="CSPrivateKey" value="C:DataManagerprivateKey.xml"/> <add key ="Proxy" value=""/> <add key ="ProxyUser" value=""/> <add key ="ProxyPwd " value=""/> <add key ="CSVDelimiter" value=","/> <add key="Bulk" value="true"/> <add key="BulkSize" value="10"/> <add key="AutoExit" value="true"/> <add key="WebServiceProtocol" value="https"/> </appSettings> </configuration>
Note: For encryption of password you will need the encryption tool provided within the Cirrus Shield platform: EncryptDataManagerCirrusShieldUserPassword
You can find this tool in “DropboxCirrus ShieldR&DToolsEncryptDataManagerCirrusShieldUserPasswordEncryptionGUI.exe”.
3. Configuration file : datamappings.config
In this file, you can define the target object into which you plan to import your data, as well as specify the mappings between your application’s fields and the csv files fields.
Here is a sample mapping:
<map> <FilePath>C:datasourcePolicies.csv</FilePath> <ObjectName>Policy</ObjectName> <Action>Insert</Action> <MatchingField>Policy_Number</MatchingField> <Fields> <Field Column="POLICY_NUMBER" APIColumn="Policy_Number" ></Field> <Field Column="PRODUCT" APIColumn="Product" ></Field> <Field Column="HOLDER_NUMBER" APIColumn="Holder_Number" ></Field> <Field Column="HOLDER" APIColumn="Holder" ></Field> <Field Column="INSURED_NUMBER" APIColumn="Insured_Number" ></Field> <Field Column="INSURED" APIColumn="Insured" ></Field> <Field Column="PAYER_NUMBER" APIColumn="Payer_Number" ></Field> <Field Column="PAYER" APIColumn="Payer" ></Field> <Field Column="TOTAL_PREMIUM" APIColumn="Total_Premium" ></Field> <Field Column="NUMBER_OF_PAYMENTS" APIColumn="Number_of_Payments" ></Field> <Field Column="COMMISSION" APIColumn="Commission" ></Field> <Field Column="UNPAID_COMMISSION" APIColumn="Unpaid_Commission" ></Field> <Field Column="ACCOUNT_VALUE_LIFE" APIColumn="Account_Value_Life" ></Field> <Field Column="INSURANCE_TERM" APIColumn="Insurance_Term" ></Field> <Field Column="PAYMENT_TERM" APIColumn="Payment_Term" ></Field> <Field Column="POLICY_VALUE" APIColumn="Policy_Value" ></Field> </Fields> <ResultDirectory>C:dataResults</ResultDirectory> </map>
The above example is used to show the following:
1. The path of the csv file used as a source data to import.
2. Choice of the data manager action: insert, upsert, update or delete.
3. Specification of the matching field that is used as a primary key for the data.
4. Definition of the mappings between the fields in the csv file and the application.
– “Column” corresponds to the name of the field in the csv file.
– “API Column” is the fields name in your application.
5. Specification of the path to the Results folder where you would like the result information to be stored. This folder will contain a log of the results of the actions of the Data Manger. A csv file will be saved (Name: datetime-name_of_original_csv.csv) in it with the same fields in the original csv file, complemented by two additional fields: the first for the success of action of each record and the second is for the error message.
4. Actions
With Data Manager you can insert, upsert, update or delete records:
To insert, you have to specify from the system fields only the name of record and the Owner Id which is the user’s internal id that owns this record or the user’s external Id if it exists.
By default, the fields CreatedBy and ModifiedBy will be assigned to the user importing the data specified in datamanager.config
To update, if you don’t want to update all the fields of this record you can keep only those you want to change and the matching field.
You have to be careful to the matching field you choose, it should be unique if you want to update only a specific record.
Important: You have to keep in datamappings.config only the updated fields, if you kept all fields, the system will take the not existing fields in the csv file as null and will update them as null.
To upsert, you have to be careful to the matching field, if it’s not unique, data manager will update all the fields that have the same matching field value.
This action will allow users to Update existing records and insert non existing records.
To delete, you have to keep only one column in your csv file. Choosing this column depends if you want to delete a specific record or a group of records.
If you want a specific record, the only column in your csv should be a field that you are sure it’s unique.
If you want to delete all records that have for ex. the Broker_Number = 1, the column that you have to leave in the csv file is the Broker_Number with the value 1
With Data Manager you can insert, upsert, update or delete records:
To insert, you have to specify from the system fields only the name of record and the Owner Id which is the user’s internal id that owns this record or the user’s external Id if it exists.By default, the fields CreatedBy and ModifiedBy will be assigned to the user importing the data specified in datamanager.configTo update, if you don’t want to update all the fields of this record you can keep only those you want to change and the matching field.You have to be careful to the matching field you choose, it should be unique if you want to update only a specific record.Important: You have to keep in datamappings.config only the updated fields, if you kept all fields, the system will take the not existing fields in the csv file as null and will update them as null.To upsert, you have to be careful to the matching field, if it’s not unique, data manager will update all the fields that have the same matching field value.This action will allow users to Update existing records and insert non existing records.To delete, you have to keep only one column in your csv file. Choosing this column depends if you want to delete a specific record or a group of records.If you want a specific record, the only column in your csv should be a field that you are sure it’s unique.If you want to delete all records that have for ex. the Broker_Number = 1, the column that you have to leave in the csv file is the Broker_Number with the value 1