Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. 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 additionnal entries to a persisted set already in database.

  2. 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.