Import Data

You can add new contacts, answers, assets, incidents, organizations, and custom objects to your Oracle database by using the Data Import Wizard.

  1. Click Configuration on the navigation pane.
  2. Expand Database, and then double-click Data Import Wizard.
    The Data Import Wizard opens.
  3. Enter field information.

    Data Import Wizard

    Field/Item Description
    Data Record Type Click this drop-down list to select the type of records you want to import.
    Answer Select this option to designate answer data as the type of record you want to import.
    Asset Select this option to designate assets data as the type of record you want to import.

    Currency fields are not supported. For example, the Price field cannot be imported.

    Config Base Entry Select this option to designate configuration setting data as the type of record you want to import. For example, you can create a CSV file that includes your custom configuration settings and then import those settings to your other sites.
    The following fields are required in the Column in File and Field columns for mapping to work. Other columns may also be required depending on the data types of the configuration settings you are importing:
    • Key—Configuration Entry Key (entry_key)
    • Type—Configuration Entry Base Type (type)
    • Data Type—Configuration Entry Data Type (data_type)
    • Default Value—Default Configuration Value (default_value)

    Prerequisite: You must create a configuration base entry before you can create a configuration base value.

    Config Base Value Select this option to designate configuration setting value data as the type of record you want to import. Configuration base value records are essentially the “child” records of configuration base entries.
    The following fields are required in the Column in File and Field columns for mapping to work. Other columns may also be required depending on the data types of the configuration settings you are importing:
    • ID—Configuration Entry ID (configbase_entry_id)
    • Key—Configuration Base ID (configbase_id)
    • Value—Configuration Value (value)

    Prerequisite: You cannot create a configuration base value unless you have a configuration base entry to map it to. Therefore, you must create a configuration base entry before you can create a configuration base value.

    Contact Select this option to designate contact data as the type of record you want to import.

    This is the default record type.

    Incident Select this option to designate incident data as the type of record you want to import.
    Message Base Entry Select this option to designate message base data as the type of record you want to import. For example, you can create a CSV file that includes your custom message bases and then import the file to your other sites.
    The following fields are required in the Column in File and Field columns for mapping to work:
    • Key—Message Base Text Key (entry_key)
    • Type—Message Base Entries Type (type)
    • Maximum Length—Message Base Text Maximum Length (max_length)
    • Text —Text (text)

    Prerequisite: You must create a message base entry before you can create message base text to go with it.

    Message Base Text Select this option to designate message base text data as the type of record you want to import. Message base text records are essentially the “child” records of message base entries.
    The following fields are required in the Column in File and Field columns for mapping to work:
    • ID—Message Base Entry ID (msgbase_entry_id)
    • Message Base—Message Base ID (msgbase_id)
    • Custom Text—Message Base Custom Text (custom_text)

    Prerequisite: You cannot create a message base text unless you have a message base entry to map it to. Therefore, you must create a message base entry before you can create a message base text.

    Organization Select this option to designate organization data as the type of record you want to import.
    Custom Object Select this option to designate custom object data as the type of record you want to import.

    Custom objects must be enabled for this option to display. To enable custom objects, contact your Oracle account manager.

    *Data File Click Browse to the right of the field to access the file containing the data you want to import.

    Windows/MS-DOS format is the only supported CSV file type.

    The maximum number of fields that can be mapped is 50.

    Header Location Click this drop-down list to select the location of the column headers that identify the contents of the data file.
    First Line of Data File Select this option if the column headers are located in the first row of the data file.
    No Headers Specified Select this option if there are no column headers defined for the data file.
    Header File Select this option if the column headers are located in a separate CSV file.

    The header file cannot contain fewer columns than the data file.

    *Import Header File Click Browse to the right of the field to access the CSV file containing your header information. This field is active when Header File is selected from the Header Location drop-down list.
    Staging Directory Click Browse to the right of the field to select a location for staging the good and bad output files that are generated during the data prescan process. By default, the location is C:/Documents and Settings/<username>/My Documents/My Imports/YYYY-MM-DD-#.

    The staging directory can be set to a local directory on your workstation or a shared network drive.

    Duplicate Records Click this drop-down list and select the method used to handle records in cases where the data file and database contain duplicate records. See Duplicate Record Handling for Data Imports.
    Keep Original Data Select this option to prevent updating the database where duplicates occur. Duplicate records are not recorded as errors.
    Note: For optimal performance when adding existing contacts to a contact list, we recommend that you select this option when using the Insert Into Contact List drop-down list (as described in this table).

    If you are importing custom configuration setting or message base metadata, you must select this option or the data import will return errors.

    Update Existing Data Select this option to update the database with data from the data file where duplicates occur. Duplicate records are not recorded as errors.
    Record Error Select this option to prevent updating of the database where duplicates occur and to record duplicates as errors.
    Run Campaign Click this drop-down list to select a campaign entry point for imported contact records. See Overview of Campaigns.

    This option is available only when importing contacts.

    Insert Into Contact List Click this drop-down list and select a list to associate all imported contact records with a contact list. To create a new contact list to associate with the imported records, click New Contact List. See Add a Contact List.

    This option is available only when importing contacts.

    Note: For optimal performance, be sure to select the Keep Original Data option in the Duplicate Records drop-down list when using this option. See the Keep Original Data description in this table.
    Text description of plus icon follows. Click this icon (signified by a plus sign and located to the right of the Insert Into Contact List drop-down list) to create a new contact list.
    *Delimiter Enter the character used to separate columns in the data file. The default delimiter is a comma.

    The tab character is not a supported delimiter.

    Stop Import on Error Select this check box to prevent any more records from being imported if an error is found during the import process. If this check box is not selected, the import continues despite any error, and only records without errors are imported. The check box is cleared by default.
    Run External Events/CPMs Select this check box if you want external events to run against the data you are importing. The check box is cleared by default.
    Note: Object event handlers from enhanced business rules will not execute on objects imported using the Data Import wizard, if Run ExternalEvents/CPMs is not selected.
    Run Workflow Rules Select this check box if you want business rules to run against the data you are importing. The check box is selected by default.
  4. Click Next.
    The content pane displays fields for defining column mapping and duplicate criteria as well as a preview of the records in the data file.
  5. Enter field information.

    Column Mapping

    Field/Icon Description
    File Encoding Click this drop-down list to select the encoding type of the data file. The default encoding type is UTF8.
    Select Template Click this drop-down list to select a previously saved template to use for mapping the data file columns to the database. See Add or Edit a Data Import Template.

    This menu lists only templates for the record type you are importing.

    *Name Enter a template name and click Save As Template on the ribbon to save the current column mapping as a template. Click Clear to clear the field contents. The default delimiter is a comma.

    The template name must be unique for the record type, and the tab character is not a supported delimiter.

    Column Mappings This section defines how columns in the data file are mapped to fields in the database.
    Add Click this icon to create a new row in the column mapping grid.
    Remove Click this icon to remove a selected row from the mapping grid.
    Column in File Click the drop-down list to select the column name specified in the data file or header file, or the column number if no header was specified.
    Field For each data column that you want to import, click the drop-down list and select the database field that you want to map the column to. The data from the column is inserted into the specified database field. If you have specified column headers that exactly match the database field names (such as first_name), the system attempts to automap the field for you. If the data file contains a column that you do not want to insert into your database, leave this field set to No Value. For information about database fields, see the data dictionary located on the navigation pane (Configuration > Database > Data Dictionary).
    Tip: If you map a column to ma_org_name, the Data Import Wizard populates the field with the text value from the data file. If you want to associate a contact with an organization, you can either map the org_id to Organization ID or map the name of the organization to Organization ID. The Data Import Wizard looks up the organization and associates the name to the correct organization. If the lookup fails, an error occurs.
    Ignore on Update Select this check box if you want this column to be inserted into the database for new records, but do not want the column updated for existing records.
    Note: This option has no effect unless you select Keep Original Data from the Duplicate Records drop-down list.
    Default Value Enter the default value to be inserted when an imported record does not contain data for the column.
  6. To map a column to a table associated with a new import record type, click Add in the section corresponding to the associated table.
    Table mapping is available only for new records.
    • Notes—Maps columns to the Notes (notes) table for answer, contact, and organization imports. Supported fields include chan_id and text.
    • Threads—Maps columns to the Threads (threads) table for incident imports. Supported fields include chan_id, seq, note, and entry_type.
    • Addresses—Maps columns to the Organization Addresses (org_addrs) table for organization imports. Supported fields include oat_id, city, country_id, postal_code, prov_id, and street.

    For information about database fields, see the data dictionary located on the navigation pane Configuration > Database > Data Dictionary.

    Be aware of the following restrictions when preparing an import:
    • Associated table mapping is applied only when the import creates new records. Such mapping is ignored when existing records are updated by the import.
    • Only certain values can be mapped to the associated tables of a record. For example, you cannot map a value for the threads.entered field. This value is set to the date and time the import occurred.
  7. Enter field information to map a column to a table associated with a new import record type.

    Associated Table Mapping

    Field/Icon Description
    Add Click this icon to create a new entry in the mapping grid.
    Remove Click this icon to remove an entry from the mapping grid.
    Column in File Click the drop-down list to select the column name specified in the data file or header file, or the column number if no header was specified.
    Field This field displays the database field that you can map a column to. The data from the column is inserted into the specified database field.
    Default Value Enter the default value to be inserted when an imported record does not contain data for the column.
  8. To define custom criteria used to identify duplicate records, clear the Use Default check box.
  9. Click Next.
    The system prescans the data file for errors (such as incorrectly formatted email addresses) and the content pane displays the results.
    Note: If the data file is significantly large, the prescan and import processes can take a considerable amount of time. The Data Import Wizard supports up to one million records per import. If the data file exceeds this size, you must split the data into multiple files of a million records or less.
  10. Review the sample output in the good records preview to confirm that your file is mapped properly.

    The Summary section of the results page displays the number of records to be inserted, updated, ignored, and added during the import process, as well as the number and types of errors returned during the prescan.

    Other results include the prescan status as well counts and previews of good and bad records, as categorized by the prescan process. The good records preview consists of a random sample of up to 10,000 records that were found to be formatted correctly. The bad records preview consists of up to the first 10,000 records that resulted in an error.

    For each record, the preview displays each mapped column, the data to be inserted, and the record row number in the data file. The bad records also include an error description to assist with troubleshooting. See Data Import Error Handling.

  11. To enter a name for the import as it appears on the Data Imports report, enter the name in the Name field. By default, the import is given the name of the data file you are importing.
  12. To see a full list of the good or bad records found during the scan process, click Open CSV File to open the list in a CSV file.
  13. To view a CSV file containing the good or bad records, click Open CSV File next to the good or bad record counts.
  14. To ignore errors returned by the prescan process and continue importing the records that did not return errors, select the Ignore Errors check box beneath the bad record count.
    Note: If errors are reported for records that you want to include in the import, you must resolve the errors before proceeding.
  15. Click Next.
    The data imports to the database.

    When the import starts, the content pane displays the real-time import status, a list of any errors found during the import, and summary counts of records that were inserted, updated, ignored, added, or that experienced errors.

    Back and Next are unavailable during the import process.

  16. To pause the import process after it starts, click Stop on the toolbar. Click Start to resume the import.
    Any records listed as returning errors are not imported to the database. Also, if you close the wizard before the import is finished, the import process ends prematurely and you must begin the procedure again to complete the import.

    When the import process is complete, the Import Status field displays Import Complete.

Results:

All imported records are immediately available for use. Any additional processing that you specified on the initial screen of the wizard (such as the running of a campaign, business rules, or external events) triggers automatically for the new records as soon as they are imported.