Create New Import/Update Template

Prev Next

COBBLESTONE SOFTWARE

Contract Insight — User Guide

Create New Import/Update Template

Data Import Manager: Creating and Updating Import Templates


Note: Each procedure in this guide begins at the Contract Insight homepage, so any section can be followed on its own. Importing and updating data affects records across the application and should be performed by a Contract Insight System Administrator.



1. Overview

Contract Insight imports data from a structured CSV file — a plain-text format of comma-separated values that opens in any standard spreadsheet program, such as Microsoft Excel. Every import runs against a template, so building the template correctly is what makes an import land where it should.

A template does three things. It names the target table the data belongs to; it records which of that table’s fields appear in the file and the CSV column header each one sits under; and it marks the condition field used to recognise a record that already exists, along with any lookup fields whose values have to be resolved against a master reference list. A template also carries a mode — insert / update, or update only.

Templates are reusable. Once a template is built and saved it can be run against a new file whenever that data needs loading again, so the mapping work is done once rather than repeated for every import.

2. Accessing the Data Import Screen

Import templates are created and maintained from the Data Import screen. To open it:

From the Contract Insight homepage, click Administration at the bottom of the left navigation menu. On the Administration page, under Configuration & Fields, select Data Import.

The screen opens with a New template panel at the top and a Templates grid beneath it listing every template already saved, with its Name, Target table, Mode, and Created details.

3. Creating the Template

Steps:

  1. From the Contract Insight homepage, click Administration at the bottom of the left navigation menu. On the Administration page, under Configuration & Fields, select Data Import.
  2. In the New template panel, enter a Template name. Choose something that identifies what the template loads, since this is how it is found in the Templates grid later.
  3. Choose the area the records belong to from the — target table — dropdown. Every area in the application is listed — for example Contract Details, Employee Details, Vendors/Customers, or any subtable or user-defined table.
  4. Tick Update-only if this template should only change records that already exist and must never create new ones. Leave it clear to build an insert / update template.
  5. Click Create & map fields →. The button becomes available once both a template name and a target table have been given.
  6. The template is saved and its field-mapping screen opens, headed with the template name and the target table.
     

Note: The mode set here is shown in the Mode column on the Templates grid as either Insert / update or Update-only, and is repeated at the top of the mapping and run screens.

4. Mapping the Template’s Fields

The mapping screen lists every field on the target table, one per row, showing the field label with its stored column name beneath it. Across each row are the Include tickbox, the CSV column header box, and the Condition and Lookup tickboxes.

Steps:

  1. From the Contract Insight homepage, click Administration at the bottom of the left navigation menu. On the Administration page, under Configuration & Fields, select Data Import.
  2. Click Map fields on the row for the template to open its mapping screen.
  3. Use the Find a field box to locate a field by name — a target table can carry hundreds of fields, and the counter in the upper right shows how many are mapped so far, for example “2 of 743 fields mapped”.
  4. Tick Include for every field that appears as a column in your CSV. A field left unticked is ignored by the import.
  5. In the CSV column header box beside each included field, enter the exact heading used for that column in the file.
  6. Tick Condition for the field that identifies an existing record, and Lookup for any field whose value has to be resolved against a master reference list. These are covered in Sections 5 and 6.
  7. Click Save mapping in the lower right. Tick Only the ones I’ve ticked to review just the mapped rows and confirm the template is complete.

Note: Matching is done on the column headings, so the columns do not have to appear in any particular order in the file — but each heading must match the value entered in CSV column header exactly.
 

5. Condition Fields

Function: Tells the import how to recognise a record that already exists.

A field ticked as Condition is the value the import matches on. When a row’s condition value matches an existing record, that record is updated with the rest of the row. When no match is found, the row is inserted as a new record — unless the template is update-only, in which case the row is skipped.

The condition field is usually an identifier, such as a Contract ID, that reliably picks out one record. On the run screen, the condition field is flagged in the What goes in each column table with a Matches existing records badge, which is a quick way to confirm the template will match on the field you intended.

Note: A template that updates records needs at least one field ticked as Condition. Without one, nothing can be matched and every row is treated as new.

6. Lookup Fields

Function: Lets the file carry a readable value where the record actually stores an id.

Fields that draw on master reference data — Department/Business Unit, Location, Contract Type, Status, Employee and the like — store the id of the selected value rather than its text. Ticking Lookup for such a field tells the import to take the display value from the file and resolve it to the matching id.

Note: When Lookup is ticked, the text in the spreadsheet must match the value held in the application exactly, or the row cannot be resolved. When Lookup is left unticked, put the underlying id in the spreadsheet instead of the display text.

7. Update-Only Templates

Ticking Update-only when the template is created restricts it to changing records that already exist. Rows whose condition value matches are updated; rows that match nothing are not inserted. Use it whenever a file should refresh data already in the application and must not introduce new records.

An insert / update template does both: matching rows update, and the rest are added as new records. The Mode column on the Templates grid shows which of the two applies to each saved template.

Note: Update-only depends entirely on matching, so at least one field must be ticked as Condition for the template to do anything at all.

8. Preparing the Import File

Steps:

  1. From the Contract Insight homepage, click Administration at the bottom of the left navigation menu. On the Administration page, under Configuration & Fields, select Data Import.
  2. Open the template’s Run import screen — click the run button on its row, or Go to run import → from the mapping screen.
  3. Click Download blank CSV under “Start from the blank spreadsheet”. The file already carries the template’s column headers, so the headings are guaranteed to match the mapping.
  4. Expand What goes in each column to see, for each heading, the field it Holds and any notes — including the Matches existing records badge on the condition field.
  5. Fill in one row per record, then save the file in CSV format.
  6. Click Choose File on the run screen and select the completed file to import it against the template.

Note: For the built-in flag fields — such as Active, Allow Login, System Admin, and Force Password Reset — enter 1 for Yes and 0 for No. User-defined dropdown fields are different: enter the value as it is defined, for example Yes, Y, No, or N.

9. Revising or Removing a Template

Steps:

  1. From the Contract Insight homepage, click Administration at the bottom of the left navigation menu. On the Administration page, under Configuration & Fields, select Data Import.
  2. Find the template in the Templates grid using the Search box, or the filter icon on the Name, Target table, Mode, or Created column.
  3. Click Map fields on its row to reopen the mapping and change which fields are included, the CSV column headers, or the condition and lookup marks. Click Save mapping to keep the changes.
  4. Click the run button on the row to go straight to the Run import screen for that template.
  5. Click the delete button on the row to remove the template.

Note: Deleting a template removes the saved mapping only. Records previously imported through it are unaffected and stay in the application.
 

10. Quick Reference Summary

Task

How to Complete It

Open the screen

Homepage → Administration → Configuration & Fields → Data Import.

Create the template

New template panel: enter a Template name, pick the target table, then Create & map fields.

Map the fields

Tick Include for each field in the file, enter its CSV column header, then Save mapping.

Mark the match field

Tick Condition on the field that identifies an existing record — usually an ID. At least one is needed to update.

Mark lookup fields

Tick Lookup where the file holds display text for a master reference value; the text must match exactly.

Restrict to updates

Tick Update-only when creating the template so unmatched rows are never inserted.

Build the file

Run import → Download blank CSV, check What goes in each column, fill one row per record.

Revise or remove

Map fields to change the mapping; the delete button on the row removes the template.