How to Create and Configure an Import Template in iDempiere

An Import Template in iDempiere is used to define a standard format for importing data from a CSV file into a specific window and tab. It ensures that users upload data using the correct column structure, file format, and character set.

The template also controls which users can access it and whether they can insert new records, update existing records, or merge data, making the import process consistent and secure.

Business Rules

  • Name is mandatory when creating an Import Template record.
  • Window and Tab are mandatory — an Import Template applies to exactly one window/tab combination.
  • CSV Header is mandatory and must exactly match the technical column names of the target tab, in the order they are expected.
  • CSV Alias Header is optional and lets end users see a friendlier header row instead of raw technical column names.
  • Character Set, Separator Character, and Quote Char must match the format of the file that will be uploaded.
  • At least one Import Template Access record (Role) must be added and set Active before any user of that role can see or use the template.
  • Allow Insert, Allow Merge, and Allow Update on the Template Access tab control which import modes that role may run with this template.
  • An Import Template (and each Template Access row) must be Active to be available for use.

Process Work Flow

Tenthplanet Idempiere-Data-Import Template-ProcessFlow

Prerequisites

  • System Administrator role, to access the Import Template window.
  • The target Window and Tab (e.g. Business Partner) already exist and are the ones you want to control CSV import.
  • The Role(s) that should be allowed to use the template are already defined.

Navigation

Menu → System Admin → General Rules → System Rules → Import Template

The window opens to a list of existing Import Templates. An Import Template Access sub-tab is available to assign roles and permitted import modes to each template. Click New Record to define a new template.

Configuration Steps

Step 1: Create the Import Template Record

The Import Template defines the target window, target tab, file format, and CSV column layout. Once it is saved, the template becomes available in the Import button of the selected window, allowing users to import data using the predefined format.

Instructions

Open the Import Template window and click New Record.

Enter a Name and Description, select the target Window and Tab, set the Character Set, Separator Character, and Quote Char, enter the CSV Header (and optionally a CSV Alias Header), choose the Import Template Type, enable Active, and save.

Field Reference

FieldSample ValueMandatoryDescription
TenantPOTSYesThe client/tenant this template belongs to.
Organization*YesOrganization scope for the template; * makes it available across all organizations.
NameImport Business PartnerYesLabel shown to end users when choosing a template from the import dialog.
DescriptionImport Business PartnerNoShort description of what the template is used for.
WindowImport Business PartnerYesThe window this template applies to.
TabImport Business Partner_Import Business PartnerYesThe specific tab within the window this template applies to.
Character SetUTF-8YesText encoding the uploaded file must use.
Separator Character,YesDelimiter character used between CSV columns.
Quote CharYesCharacter used to quote CSV field values.
CSV Headerad_org_id,value,name,groupvalue,address1,postal,city,c_region_id,regionname,countrycode,title,contactname,phone,email,iscustomer,isemployee,isvendorYesThe exact, allowed column header line — the contract the uploaded file must satisfy.
CSV Alias Headerad_org_id,value,name,groupvalue,address1,postal,city,c_region_id,regionname,countrycode,title,contactname,phone,email,iscustomer,isemployee,isvendorNoFriendlier/alternate header end users may use instead of raw technical column names.
Import Template TypeComma-separated values (CSV)YesFile type this template accepts (CSV, or Excel XLS/XLSX where supported).
ActiveCheckedYesMakes the template available for use.
Tenthplanet Idempiere-Data-Import Template

Step 2: Configure Import Template Access

Granting access on the Import Template Access sub-tab is what determines which roles can see and use the template, and which import modes they are permitted to run.

Instructions

On the saved Import Template, open the Import Template Access sub-tab and click New Record.

Select the Role that should be allowed to use this template, enable the Import Modes to permit (Allow Insert, Allow Merge, Allow Update), enable Active, and save.

Field Reference

FieldSample ValueMandatoryDescription
TenantPOTSYesThe client/tenant this access record belongs to.
Organization*YesOrganization scope for the access record.
Import TemplateImport Business PartnerYesThe parent Import Template this access rule applies to.
RolePOTS AdminYesThe role permitted to use the template.
Allow InsertCheckedNoPermits this role to run the template in Insert mode.
Allow MergeCheckedNoPermits this role to run the template in Merge mode.
Allow UpdateCheckedNoPermits this role to run the template in Update mode.
ActiveCheckedYesMakes this access rule effective.
Tenthplanet-Idempiere-Data-Import Template-1

Step 3: Use the Template to Import Data

After creating the Import Template, it is used in the Import CSV Process to upload the CSV file. Based on the selected Import Mode (Insert, Update, or Merge), the uploaded data is first loaded into the corresponding Import (staging) table.

The related Import process is then executed to validate the data and transfer the valid records from the staging table to the corresponding master window.

Common Issues and Resolutions

IssueCauseResolution
Import Template does not appear in the Import dialogNo active Import Template Access record for the user’s roleAdd or activate a Template Access row for that role under the Import Template.
“Invalid header” error on importUploaded CSV header does not exactly match the template’s CSV HeaderRe-export a fresh template CSV from the target tab, or correct the file’s header to match exactly, including column order.
Import Mode option is greyed out or unavailableAllow Insert / Allow Merge / Allow Update not enabled for the roleEnable the required mode(s) on the Import Template Access record for that role.
File fails with character encoding errorsCharacter Set on the template does not match the actual file encodingSave/export the CSV using the Character Set configured on the template (e.g. UTF-8).
Template not visible to any userImport Template or its Template Access record is not ActiveEnable Active on both the Import Template header and the relevant Template Access row.
Update/Merge mode fails with a key errorCSV file does not include a key column marked with /KAdd the required key column(s) to the CSV Header/file so existing records can be matched.

Next Steps

  • Use the same Import Template pattern to control CSV import for other sensitive windows (e.g. Product, Sales Order).
  • Coordinate with business users on the approved CSV Alias Header so they can prepare files without needing technical column names.
  • Periodically review Import Template Access to ensure only the intended roles retain Insert/Merge/Update permissions.
  • Combine Import Template restrictions with Restrict Toolbar Buttons if the Import/Export buttons themselves should be hidden from other roles.