Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added information about delimiter parsing

Overview | Advanced Features | Release Notes

...

Two files are excepted to be found in there:

addressConfiguration.xml

This file defines both the address template and the address hierarchy entry levels in the hierarchy. Furthermore it indicates the location of the second configuration file. Here is a sample file:

Code Block
languagexml
titleaddressConfiguration.xml
<addressConfiguration>
  <wipe>true</wipe>
  <addressComponents>
    <addressComponent>
      <field>COUNTRY</field>
      <nameMapping>Location.country</nameMapping>
      <sizeMapping>40</sizeMapping>
      <elementDefault>Cambodia</elementDefault>
      <requiredInHierarchy>true</requiredInHierarchy>
    </addressComponent>
    <addressComponent>
      <field>STATE_PROVINCE</field>
      <nameMapping>Location.province</nameMapping>
      <sizeMapping>40</sizeMapping>
      <requiredInHierarchy>true</requiredInHierarchy>
    </addressComponent>
    <addressComponent>
      <field>COUNTY_DISTRICT</field>
      <nameMapping>Location.district</nameMapping>
      <sizeMapping>40</sizeMapping>
      <requiredInHierarchy>true</requiredInHierarchy>
    </addressComponent>
    <addressComponent>
      <field>ADDRESS_1</field>
      <nameMapping>Commune</nameMapping>
      <sizeMapping>40</sizeMapping>
      <requiredInHierarchy>true</requiredInHierarchy>
    </addressComponent>
    <addressComponent>
      <field>CITY_VILLAGE</field>
      <nameMapping>Location.village</nameMapping>
      <sizeMapping>40</sizeMapping>
      <requiredInHierarchy>true</requiredInHierarchy>
    </addressComponent>
  </addressComponents>
  <lineByLineFormat>
    <string>cityVillage, address1</string>
    <string>countyDistrict, stateProvince</string>
    <string>country</string>
  </lineByLineFormat>
  <addressHierarchyFile>
    <filename>addresshierarchy.csv</filename>
    <entryDelimiter>,</entryDelimiter>
    <identifierDelimiter>%</identifierDelimiter>
  </addressHierarchyFile>
</addressConfiguration>

When wipe is set true the existing address hierarchy entries will be wiped before loading the address hierarchy entries from the CSV import file. On the other hand setting wipe to false allows to add

...

additional entries to a persisted set already in database.

Note that entryDelimiter and identifierDelimiter are interpreted as Regex. As a result, delimiters which are special characters in Regex must be backslash-escaped. If you want to specify an address hierarchy with lines like

  UK^001|London^10001|Steve's House

Where 001 is the identifier for the UK, then your configuration should read

  <entryDelimiter>\|</entryDelimiter>
<identifierDelimiter>|^</identifierDelimiter>

The CSV import file for address entries

Based on the above sample configuration this file is expected to be named addresshierarchy.csv.
This is the

...

usual

...

address hierarchies CSV import file, see 'Importing an Address Hierarchy' for more details about it.