{"id":1150,"date":"2017-05-16T13:48:00","date_gmt":"2017-05-16T12:48:00","guid":{"rendered":"https:\/\/help.cirrus-shield.com\/docs\/developper-guide\/data-manager\/customizing-files-to-be-adapted-to-your-operations\/"},"modified":"2020-04-06T14:39:42","modified_gmt":"2020-04-06T13:39:42","slug":"customizing-files-to-be-adapted-to-your-operations","status":"publish","type":"docs","link":"https:\/\/help.cirrus-shield.com\/en\/docs\/developer-guide\/data-manager\/customizing-files-to-be-adapted-to-your-operations\/","title":{"rendered":"Customizing files to be adapted to your operations"},"content":{"rendered":"<p>This section explains the configuration files of the Data Manager. Those files are used by the Data Manager at runtime to:<\/p>\n<p>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)<\/p>\n<hr>\n<h3 class=\"fw-accordion-title\"><span style=\"color: #339966;\">1. Path to DataManagerConfig and DataMappingsConfig<\/span><\/h3>\n<hr>\n<p>In CirrusShield.DataManager.exe.config and CirrusShield.DataManager.vshost.exe.config files you have to change the following:<\/p>\n<pre>\n&lt;appSettings&gt;\n\n&lt;add key=\"DataManagerConfig\" value=\"C:DataManagerdatamanager.config\"\/&gt;\n&lt;add key=\"DataMappingsConfig\" value=\"C:DataManagerdatamappings.config\"\/&gt;\n\n&lt;\/appSettings&gt;\n<\/pre>\n<p style=\"padding-left: 30px;\">&nbsp;<\/p>\n<p>You specify the path to datamanager.config and datamappings.config in the value of these two keys in both files listed above.<br \/>\ndatamanager.config: file containing information about the Data Manager.<br \/>\ndatamappings.config: Definition file of the correspondences of the fields.<\/p>\n<hr>\n<h3 class=\"fw-accordion-title\"><span style=\"color: #339966;\">2. Configuration file : datamanager.config<\/span><\/h3>\n<hr>\n<p>In this file, you have to specify:<br \/>\nThe username<br \/>\nThe password of the user (encrypted value).<br \/>\nThe URL of the Soap Api of your application for which protocol you are using \u201chttp\u201d or \u201chttps\u201d (Obviously the https is strongly recommended).<br \/>\nThe CSV delimiter (, or ;).<br \/>\nThe bulk size (the number of records to be inserted\/updated at the same time).<br \/>\nThe AutoExit (true of false): indique au data manager s\u2019il doit donner la main \u00e0 la ligne de commande en terminant le chargement ou s\u2019il doit attendre une action manuelle de l\u2019utilisateur.<br \/>\nHere is an example of how to set the datamanager.config file:<\/p>\n<pre>\n&lt;?xml version=\"1.0\" encoding=\"utf-8\" ?&gt;\n&lt;configuration&gt;\n\n&lt;appSettings&gt;\n\n&lt;add key=\"UserName\" value=\"nom.utilisateur@domaine.fr\"\/&gt;\n&lt;add key=\"Password\" value=\"VALEUR_ENCRYPTEE_DU_MOT_DE_PASSE\"\/&gt;\n&lt;add key=\"HttpCSInstance\" value=\"http:\/\/localhost:1739\/CirrusShieldWS.asmx\"\/&gt;\n&lt;add key=\"HttpsCSInstance\" value=\"https:\/\/ws.cirrus-shield.net\/CirrusShieldWS.asmx\"\/&gt;\n&lt;add key=\"CSPrivateKey\" value=\"C:DataManagerprivateKey.xml\"\/&gt;\n&lt;add key =\"Proxy\" value=\"\"\/&gt;\n&lt;add key =\"ProxyUser\" value=\"\"\/&gt;\n&lt;add key =\"ProxyPwd \" value=\"\"\/&gt;\n&lt;add key =\"CSVDelimiter\" value=\",\"\/&gt;\n&lt;add key=\"Bulk\" value=\"true\"\/&gt;\n&lt;add key=\"BulkSize\" value=\"10\"\/&gt;\n&lt;add key=\"AutoExit\" value=\"true\"\/&gt;\n&lt;add key=\"WebServiceProtocol\" value=\"https\"\/&gt;\n\n&lt;\/appSettings&gt;\n\n&lt;\/configuration&gt;\n<\/pre>\n<p>&nbsp;<br \/>\nNote: For encryption of password you will need the encryption tool provided within the Cirrus Shield platform: EncryptDataManagerCirrusShieldUserPassword<br \/>\nYou can find this tool in \u201cDropboxCirrus ShieldR&amp;DToolsEncryptDataManagerCirrusShieldUserPasswordEncryptionGUI.exe\u201d.<\/p>\n<hr>\n<h3 class=\"fw-accordion-title\"><span style=\"color: #339966;\">3. Configuration file : datamappings.config<\/span><\/h3>\n<hr>\n<p>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\u2019s fields and the csv files fields.<br \/>\nHere is a sample mapping:<\/p>\n<pre>\n&lt;map&gt;\n\n&lt;FilePath&gt;C:datasourcePolicies.csv&lt;\/FilePath&gt;\n&lt;ObjectName&gt;Policy&lt;\/ObjectName&gt;\n&lt;Action&gt;Insert&lt;\/Action&gt;\n&lt;MatchingField&gt;Policy_Number&lt;\/MatchingField&gt;\n&lt;Fields&gt;\n\n&lt;Field Column=\"POLICY_NUMBER\" APIColumn=\"Policy_Number\" &gt;&lt;\/Field&gt;\n&lt;Field Column=\"PRODUCT\" APIColumn=\"Product\" &gt;&lt;\/Field&gt;\n&lt;Field Column=\"HOLDER_NUMBER\" APIColumn=\"Holder_Number\" &gt;&lt;\/Field&gt;\n&lt;Field Column=\"HOLDER\" APIColumn=\"Holder\" &gt;&lt;\/Field&gt;\n&lt;Field Column=\"INSURED_NUMBER\" APIColumn=\"Insured_Number\" &gt;&lt;\/Field&gt;\n&lt;Field Column=\"INSURED\" APIColumn=\"Insured\" &gt;&lt;\/Field&gt;\n&lt;Field Column=\"PAYER_NUMBER\" APIColumn=\"Payer_Number\" &gt;&lt;\/Field&gt;\n&lt;Field Column=\"PAYER\" APIColumn=\"Payer\" &gt;&lt;\/Field&gt;\n&lt;Field Column=\"TOTAL_PREMIUM\" APIColumn=\"Total_Premium\" &gt;&lt;\/Field&gt;\n&lt;Field Column=\"NUMBER_OF_PAYMENTS\" APIColumn=\"Number_of_Payments\" &gt;&lt;\/Field&gt;\n&lt;Field Column=\"COMMISSION\" APIColumn=\"Commission\" &gt;&lt;\/Field&gt;\n&lt;Field Column=\"UNPAID_COMMISSION\" APIColumn=\"Unpaid_Commission\" &gt;&lt;\/Field&gt;\n&lt;Field Column=\"ACCOUNT_VALUE_LIFE\" APIColumn=\"Account_Value_Life\" &gt;&lt;\/Field&gt;\n&lt;Field Column=\"INSURANCE_TERM\" APIColumn=\"Insurance_Term\" &gt;&lt;\/Field&gt;\n&lt;Field Column=\"PAYMENT_TERM\" APIColumn=\"Payment_Term\" &gt;&lt;\/Field&gt;\n&lt;Field Column=\"POLICY_VALUE\" APIColumn=\"Policy_Value\" &gt;&lt;\/Field&gt;\n\n&lt;\/Fields&gt;\n&lt;ResultDirectory&gt;C:dataResults&lt;\/ResultDirectory&gt;\n\n&lt;\/map&gt;\n<\/pre>\n<p style=\"padding-left: 60px;\">&nbsp;<\/p>\n<p>&nbsp;<br \/>\nThe above example is used to show the following:<\/p>\n<p style=\"padding-left: 30px;\">1. The path of the csv file used as a source data to import.<br \/>\n2. Choice of the data manager action: insert, upsert, update or delete.<br \/>\n3. Specification of the matching field that is used as a primary key for the data.<br \/>\n4. Definition of the mappings between the fields in the csv file and the application.<\/p>\n<p style=\"padding-left: 60px;\">&#8211; \u201cColumn\u201d corresponds to the name of the field in the csv file.<br \/>\n&#8211; \u201cAPI Column\u201d is the fields name in your application.<\/p>\n<p style=\"padding-left: 30px;\">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.<\/p>\n<hr>\n<h3 class=\"fw-accordion-title\"><span style=\"color: #339966;\">4. Actions<\/span><\/h3>\n<hr>\n<p>With Data Manager you can insert, upsert, update or delete records:<br \/>\nTo insert, you have to specify from the system fields only the name of record and the Owner Id which is the user\u2019s internal id that owns this record or the user\u2019s external Id if it exists.<br \/>\nBy default, the fields CreatedBy and ModifiedBy will be assigned to the user importing the data specified in datamanager.config<br \/>\nTo update, if you don\u2019t want to update all the fields of this record you can keep only those you want to change and the matching field.<br \/>\nYou have to be careful to the matching field you choose, it should be unique if you want to update only a specific record.<br \/>\nImportant: 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.<br \/>\nTo upsert, you have to be careful to the matching field, if it\u2019s not unique, data manager will update all the fields that have the same matching field value.<br \/>\nThis action will allow users to Update existing records and insert non existing records.<br \/>\nTo 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.<br \/>\nIf you want a specific record, the only column in your csv should be a field that you are sure it\u2019s unique.<br \/>\nIf 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<\/p>\n<p>With Data Manager you can insert, upsert, update or delete records:<\/p>\n<p>To insert, you have to specify from the system fields only the name of record and the Owner Id which is the user\u2019s internal id that owns this record or the user\u2019s 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\u2019t 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\u2019s 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\u2019s 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<\/p>\n<p><!-- 8f5c69189339c1622544106b57a033b1 --><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1144,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"doc_tag":[],"class_list":["post-1150","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1150","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/comments?post=1150"}],"version-history":[{"count":17,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1150\/revisions"}],"predecessor-version":[{"id":3928,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1150\/revisions\/3928"}],"up":[{"embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1144"}],"next":[{"title":"Running the Data Manager","link":"https:\/\/help.cirrus-shield.com\/en\/docs\/developer-guide\/data-manager\/running-the-data-manager-2\/","href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1151"}],"prev":[{"title":"Data types and ID considerations","link":"https:\/\/help.cirrus-shield.com\/en\/docs\/developer-guide\/data-manager\/data-types-supported-by-the-data-manager\/","href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/docs\/1149"}],"wp:attachment":[{"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/media?parent=1150"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/help.cirrus-shield.com\/en\/wp-json\/wp\/v2\/doc_tag?post=1150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}