Example of Importing Country Structure Data

You use the country structure of a country to define which geography types are part of the country and how the geography types are hierarchically related within the country.

For example, you can create geography types called State, City, and Postal Code. Then you can rank the State geography type as the highest level within the country, the City as the second level, and the Postal Code as the lowest level within the country structure.

To add a country structure using import management, your source file must contain information about the country to which the country structure belongs. You can view the list of valid values for country codes in the UI by navigating to the Manage Geographies task and searching with % as the Country Code value. You also need to specify the level at which the geography types need to be placed. By default, all countries are at Level 1. You create the country structure by increasing the level number as you go down the country structure. You place the geography types such as states, provinces, and so on at Level 2, districts or counties at Level 3, and so on. To add a country structure, your source file must include the values that let the import process identify the existing records.

Sample Input CSV File

You include the data that you want to import into CX Sales and Fusion Service in a source CSV file. Here is a sample input CSV file for country as US.

CountryCode

LevelNumber

GeographyType

US

1

COUNTRY

US

2

STATE

US

3

COUNTY

US

4

CITY

US

5

POSTAL CODE

Here is another input CSV file for importing the country structure for India.

CountryCode

LevelNumber

GeographyType

IN

1

COUNTRY

IN

2

STATE

IN

3

DISTRICT

IN

4

CITY

IN

5

POSTAL CODE

In case you want to import the country structure for Mexico, your input CSV file would look like this:

CountryCode

LevelNumber

GeographyType

MX

1

COUNTRY

MX

2

STATE

MX

3

MUNICIPALITY

MX

4

LOCALITY

MX

5

POSTAL CODE

In this example, we are importing the Country Structure for US. You must create a source file (CSV) file with the attributes as shown in this table and import it using Import Management.

Attribute Name

Value

Description

CountryCode

US

The code for the country for which the country structure is applicable.

LevelNumber

1

The level number of the geography in the hierarchy. For example, Country is at Level 1 (Top level) and State (California) is at Level 2. You need these to create parent-child relationships between geography types for your country.

GeographyType

COUNTRY

Geopolitical divisions such as Country, State, City, and so on. For example, for US the different geography types would be State, County, City, and Postal Code. For India, the different geography types would be State, District, City, and Postal Code. For Mexico, it would be State, Municipality, Locality, and Postal Code.

Create an import activity to import the information. To create an import activity:

  1. Go to Navigator > Tools > Import Management > Import Queue.

  2. Click Create Import Activity in the Manage Imports page.

  3. In the Enter Import Options page, provide a name for the import activity, and select Country Structure from the Object drop-down list.

    Note: In the Advanced Options section, the option Enable High-Volume Import is selected by default. This mode is designed to import millions of records at once.
  4. Select the CSV file in the File Name field, and click Next.

  5. The source and target attributes are automatically mapped in the Map Fields page. Review and edit the mappings if required.

  6. Check the file for unmapped columns or data format issues by clicking Validate Data. Click Next.

  7. Review the import details on the Review and Submit page, and click Submit.