Data Migration - Import Methods and Configuration
Summary
This article covers the recommended and proper order for importing data in to EngageIP Billing
For information on how to generate the XML for import see the KB Article: Data Migration – Creating XML to Import
For information on importing specific data for instance system configuration settings or customer data see the Additional Data Import Guides section at the bottom of this article.
Data Import Methods
Note: you can import data via the API (webservices). Go to your Webservices file and search for 'XMLImport' to find the requirements and formatting.
There are currently three methods for importing XML data:
Via the Import EXE utility available in the adminportal folder on your webserver
Via the AdminPortal interface (Setup page / Import)
Via API (Webservices) - Method is called 'XMLImport'
AdminPortal Import Utility
The Import functionality in the AdminPortal is suitable for importing small amounts of data. The interface will not import data if there is an error, it will roll back any changes so that you can address the issue and attempt the import again.
To access the AdminPortal XML Import:
Access the Setup page in the AdminPortal
Under the Configuration heading click on Import
On the import interface either Choose File or paste in the XML Data to the imported into EngageIP
Legacy Mode - enable to maintain compatibility with older import files. Most of the XML found on the following articles are standard or legacy XML files. They will import data using logic and validation similar to the UI. Data Migration - System Configuration Import Data Migration - Customer Data Import Normally this mode should be used as its the most simple format and it provides better data validation on import. If legacy mode XML cannot be found on the above two articles, generic can be used. Note that there are a few generic xml examples (requiring IDs as opposed to item names) in the above two as well, if generic, they are marked as such and require the ‘Use Generic XML’ to be selected. You should not use both Legacy and Generic at the same time, use one or the other depending on the type of XML required.
Use Generic XML - enable to import data using basic table and column mapping, do not use specific/advanced importing logic for particular tables/records. Generic XML is that which is pulled from the Database Schema, its a raw import and it uses IDs of items such as User Status Type IDs as opposed to the common name of ‘Enabled’ for example. Its more versatile but also not fully documented. NOTE: Generic method imports raw data to the tables, it will not trigger logic such as for payment disbursement related to the data or other items that may be triggered with the regular import related to the data imported.
Create Workflow Event - enable to trigger workflow events while records are created/updated/deleted
Click Save when finished
If errors are returned address them in the XML Data/XML File (if using a file it will need to be imported again after the issues are addressed)
Repeat this process as needed until the data passes validation and has been successfully imported
DataMigration Utility Overview
Designed to import data into the EngageIP Billing application through XML it allows you to reset a database quickly and import a single or predefined list of files. When run, the database migratory tool looks for XML Elements which can be combined into one file if you wish. Configuring the migrator is done within the DatabaseMigrator.exe.config file.
Located usually here: C\Program Files\EngageIP\DatabaseMigrator\
Sample Configuration File
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="SQLServer" value="(local)"/>
<add key="SQLDatabase" value="boss"/>
<add key="SQLServerUser" value="boss"/>
<add key="SQLServerPassword" value="boss"/>
<add key="path" value="..\..\XML"/>
<add key="Current1SQLConnectionString" value="server=192.168.1.169;Trusted_Connection=false;database=current1sql;uid=boss;pwd=boss;Timeout=3000"/>
<add key="BossConnectionString" value="server=localhost;Trusted_Connection=false;database=boss;uid=boss;pwd=boss;Timeout=3000"/>
<add key="ErrorLogging" value="false"/>
<add key="RollBackOnError" value="false"/>
<add key="CreateWorkFlowEvent" value="false"/>
<add key="UseGenericXML" value="false"/>
</appSettings>
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
Note:
RollBackOnError - if TRUE, it will not import any data on error. It will wait until ALL import data passes before committing
Current1SQLConnectionString - this is a legacy connection point to EngageIP 6 databases
If ErrorLogging is TRUE, the log file will drop in the folder where the EXE is run from or in the folder where the XML import file was loaded from if different than the EXE location
Configuration File Options:
SQLServer - The sql server to use
SQLDatabase - The database to import into
SQLServerUser - A valid user with valid permissions
SQLServerPassword - The password for the user
BossConnectionString - The full connection string to the server
Note: This tool will also show two buttons for disbursing payments (usually used after import) and a textbox where you can enter the name of a single account you wish to manually disburse payments on. Click 'Disburse User Payment' to disburse just the user account you have entered in the textbox beside it. If you simply wish to have the tool disburse all payments set as automatic disburse, click 'Disburse Payments'. This tool will ONLY disburse those payments that are already checked as 'automatic disburse'. Any payments not marked as such will not be disbursed. Also, deposit payments will not be disburse, these will need to be manually disbursed, or changed to payments and marked as 'auto disburse' before the tool will look at them for disbursal.
Resetting Database Using MDF Files
The database migratory tool will look for a file named after what is defined in the SQL Database section for the config file.
It will then detach the existing database and copy the one defined to the new (if different) location only if Reset Database is checked.
For Example, the SQL Database name is EngageIP. The Database Migratory Tool will look for EngageIP.MDF in the executing directory which it will use to reset the database by first detaching the original database then reattaching this new MDF.
The final step is the import which happens once the above is complete. You have the option to import a single file or defining a list of files in the importfiles.txt file.
Database Migrator Usage
Note: observing the order of steps below is very important.
Make sure that any linkage tables are first imported so they exist before you add the core tables
Edit importfiles.txt to set the order you would like, from here you can add or remove any files from this list. The name of the file is not important however the XML Tag is. Combining contacts and contact points in one file is possible if desired, as long as they are ordered correctly in the files, however single files can be imported at any time.
Be sure to backup your database when it's in a condition ready for import.
You may also wish to setup your owner structure prior to importing your accounts manually.
Database Migrator XML Files
Variable Name | Short definition or description of use | Valid data or entries including format that is accepted by the migrator |
Username | The name of a user account or numeric identifier | John Wayne or jwayne or ACCT112204902 or Company X |
To use Microsoft Excel, you can import the sample XML to use as a framework.
Open MS Excel
Click Data
Select XML then click XML Source
Select the generic XML Sample file
Click Open
On the right hand side, the XML format is displayed
Click Owners for example and drag it into the active sheet and then you can populate the rows accordingly
So now once all this is complete, start importing system configuration using the configuration import article.
Once configuration is imported, use the customer data import doc.