---
schema_version: "1"
id: 9210d1509c9f7714d625502e2fddea79e31a1a42908e136bec6518719e4e2337
title: AddressSettings
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_addresssettings.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_addresssettings.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 715c1e589e81073e281648272559b8e43787f0d0937ecdf45eb95973a31aed27
description: Represents the configuration of country/territory and state picklists. Use the AddressSettings component type to configure state and country/territory data in your organization so that you can convert text-based values into standard picklist values. To convert your state and country/territory values, from Setup, enter State and Country/Territory Picklists in the Quick Find box, then select State and Country/Territory Picklists.
---
# AddressSettings

Represents the configuration of country/territory and state picklists. Use the AddressSettings component type to configure state and country/territory data in your organization so that you can convert text-based values into standard picklist values. To convert your state and country/territory values, from Setup, enter State and Country/Territory Picklists in the Quick Find box, then select **State and Country/Territory Picklists**.

This type extends the [Metadata](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/metadata.htm "The base class for all metadata types. You can’t edit this object. A component is an instance of a metadata type.") metadata type and inherits its fullName field.

In the package manifest, all organization settings metadata types are accessed using the Settings name. See [Settings](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_settings.htm "Represents the organization settings related to a feature. For example, your password policies, session settings and network access controls are all available in the SecuritySettings component type.") for details.

## Declarative Metadata File Suffix and Directory Location

AddressSettings values are stored in a single file named Address.settings in the settings directory. The .settings files are different from other named components because there’s only one settings file for each settings component.

## Version

AddressSettings is available in API versions 27.0 and later.

## Salesforce CLI Usage

When working with the Salesforce CLI, use the metadata type Settings:Address to deploy or retrieve address settings.

## CountriesAndStates

This complex metadata type represents valid definitions of states and countries/territories in picklists.

| Field | Field Type | Description |
| --- | --- | --- |
| countries | Country\[\] | The countries and territories available in picklists. |

## Country

This metadata type provides the definition for a country/territory in a picklist.

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d84981e191">Field</th>

              <th class="featureTableHeader  " id="d84981e194">Field Type</th>

              <th class="featureTableHeader  " id="d84981e197">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d84981e191" data-title="Field"><span class="ph" id="active_field"><a name="active_field"><!-- --></a><span class="keyword parmname">active</span></span></td>

              <td class="entry" headers="d84981e194" data-title="Field Type">boolean</td>

              <td class="entry" headers="d84981e197" data-title="Description">
                <span class="ph" id="active_def"><a name="active_def"><!-- --></a>Determines whether the value is available in the
                  API.</span>
                <div class="box message confirm" id="active_note">
                  <a name="active_note"><!-- --></a>
                  <div class="inner">
                    <div class="bd">
                      <div class="media">
                        <img class="img mtm" src="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png" alt="Important">
                        <div class="mediaBd">
                          <h4 class="mbs">Important</h4>
                          <p>After you enable state and
                            country/territory picklists in your Salesforce organization, you can’t set the
                            <span class="keyword parmname">active</span> status to
                            <kbd class="ph userinput">false</kbd>.
                          </p>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d84981e191" data-title="Field"><span class="ph" id="iv_field"><a name="iv_field"><!-- --></a><span class="keyword parmname">integrationValue</span></span></td>

              <td class="entry" headers="d84981e194" data-title="Field Type">string</td>

              <td class="entry" headers="d84981e197" data-title="Description">
                <div class="p" id="iv_def">
                  <a name="iv_def"><!-- --></a>A customizable text value that is linked to a state or
                  country/territory code. Integration values for standard states, countries, and
                  territories default to the full ISO-standard state, country, and territory names.
                  Integration values function similarly to the API names of custom fields and
                  objects. Configuring integration values allows integrations that you set up before
                  enabling state and country/territory picklists to continue to work.<div class="box message confirm">
                    <div class="inner">
                      <div class="bd">
                        <div class="media">
                          <img class="img mtm" src="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png" alt="Important">
                          <div class="mediaBd">
                            <h4 class="mbs">Important</h4>
                            <p>If you don’t specify integration values before enabling state
                              and country/territory picklists in your organization, records use the default
                              value provided by Salesforce. If you change integration values later, records
                              created or updated from that point on use your edited values.</p>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d84981e191" data-title="Field"><span class="ph" id="code_field"><a name="code_field"><!-- --></a><span class="keyword parmname">isoCode</span></span></td>

              <td class="entry" headers="d84981e194" data-title="Field Type">string</td>

              <td class="entry" headers="d84981e197" data-title="Description">
                <span class="ph" id="code_def"><a name="code_def"><!-- --></a>The ISO-standard code populates this field when you issue a
                  <samp class="codeph nolang">retrieve()</samp> call. </span> You can’t edit the
                <span class="keyword parmname">isoCode</span> of <span class="keyword parmname">standard</span> states, countries,
                and territories.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d84981e191" data-title="Field"><span class="ph" id="label_field"><a name="label_field"><!-- --></a><span class="keyword parmname">label</span></span></td>

              <td class="entry" headers="d84981e194" data-title="Field Type">string</td>

              <td class="entry" headers="d84981e197" data-title="Description"><span class="ph" id="label_def"><a name="label_def"><!-- --></a>The label is what users see in picklists in
                  Salesforce.</span></td>

            </tr>

            <tr>
              <td class="entry" headers="d84981e191" data-title="Field"><span class="ph" id="orgdef_field"><a name="orgdef_field"><!-- --></a><span class="keyword parmname">orgDefault</span></span></td>

              <td class="entry" headers="d84981e194" data-title="Field Type">boolean</td>

              <td class="entry" headers="d84981e197" data-title="Description"><span class="ph" id="orgdef_desc"><a name="orgdef_desc"><!-- --></a>Sets a country or territory as the default value for new
                  records in the Salesforce organization.</span></td>

            </tr>

            <tr>
              <td class="entry" headers="d84981e191" data-title="Field"><span class="ph" id="std_field"><a name="std_field"><!-- --></a><span class="keyword parmname">standard</span></span></td>

              <td class="entry" headers="d84981e194" data-title="Field Type">boolean</td>

              <td class="entry" headers="d84981e197" data-title="Description"><span class="ph" id="std_def"><a name="std_def"><!-- --></a>Standard states and countries are states and countries that
                  are included with Salesforce. You can’t edit the <span class="keyword parmname">standard</span>
                  attribute.</span></td>

            </tr>

            <tr>
              <td class="entry" headers="d84981e191" data-title="Field"><span class="keyword parmname">states</span></td>

              <td class="entry" headers="d84981e194" data-title="Field Type">State[]</td>

              <td class="entry" headers="d84981e197" data-title="Description">The states or provinces that are part of the country or territory.</td>

            </tr>

            <tr>
              <td class="entry" headers="d84981e191" data-title="Field"><span class="ph" id="vis_field"><a name="vis_field"><!-- --></a><span class="keyword parmname">visible</span></span></td>

              <td class="entry" headers="d84981e194" data-title="Field Type">boolean</td>

              <td class="entry" headers="d84981e197" data-title="Description"><span class="ph" id="vis_def"><a name="vis_def"><!-- --></a>Makes the state, country, or territory available to users in
                  Salesforce. States, countries, or territories that are
                  <span class="keyword parmname">visible</span> must also be
                  <span class="keyword parmname">active</span>.</span></td>

            </tr>

          </tbody>

        </table>

## State

This metadata type provides the definition for a state in a picklist.

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d84981e380">Field</th>

              <th class="featureTableHeader  " id="d84981e383">Field Type</th>

              <th class="featureTableHeader  " id="d84981e386">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d84981e380" data-title="Field"><span class="keyword parmname">active</span></td>

              <td class="entry" headers="d84981e383" data-title="Field Type">boolean</td>

              <td class="entry" headers="d84981e386" data-title="Description">Determines whether the value is available in the API.<div class="box message confirm">
                  <div class="inner">
                    <div class="bd">
                      <div class="media">
                        <img class="img mtm" src="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png" alt="Important">
                        <div class="mediaBd">
                          <h4 class="mbs">Important</h4>
                          <p>After you enable state and country/territory picklists in your Salesforce
                            organization, you can’t set the <span class="keyword parmname">active</span> status to
                            <kbd class="ph userinput">false</kbd>.
                          </p>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d84981e380" data-title="Field"><span class="keyword parmname">integrationValue</span></td>

              <td class="entry" headers="d84981e383" data-title="Field Type">string</td>

              <td class="entry" headers="d84981e386" data-title="Description">
                <div class="p">A customizable text value that is linked to a state or country/territory code.
                  Integration values for standard states, countries, and territories default to the
                  full ISO-standard state, country, and territory names. Integration values function
                  similarly to the API names of custom fields and objects. Configuring integration
                  values allows integrations that you set up before enabling state and
                  country/territory picklists to continue to work.<div class="box message confirm">
                    <div class="inner">
                      <div class="bd">
                        <div class="media">
                          <img class="img mtm" src="https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/images/icon_note_important.png" alt="Important">
                          <div class="mediaBd">
                            <h4 class="mbs">Important</h4>
                            <p>If you
                              don’t specify integration values before enabling state and country/territory
                              picklists in your organization, records use the default value provided by
                              Salesforce. If you change integration values later, records created or updated
                              from that point on use your edited values.</p>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>

              </td>

            </tr>

            <tr>
              <td class="entry" headers="d84981e380" data-title="Field"><span class="keyword parmname">isoCode</span></td>

              <td class="entry" headers="d84981e383" data-title="Field Type">string</td>

              <td class="entry" headers="d84981e386" data-title="Description"> The ISO-standard code populates this field when you issue a <samp class="codeph nolang">retrieve()</samp> call. </td>

            </tr>

            <tr>
              <td class="entry" headers="d84981e380" data-title="Field"><span class="keyword parmname">label</span></td>

              <td class="entry" headers="d84981e383" data-title="Field Type">string</td>

              <td class="entry" headers="d84981e386" data-title="Description">The label is what users see in picklists in Salesforce.</td>

            </tr>

            <tr>
              <td class="entry" headers="d84981e380" data-title="Field"><span class="keyword parmname">standard</span></td>

              <td class="entry" headers="d84981e383" data-title="Field Type">boolean</td>

              <td class="entry" headers="d84981e386" data-title="Description">Standard states and countries are states and countries that are included with
                Salesforce. You can’t edit the <span class="keyword parmname">standard</span> attribute.</td>

            </tr>

            <tr>
              <td class="entry" headers="d84981e380" data-title="Field"><span class="keyword parmname">visible</span></td>

              <td class="entry" headers="d84981e383" data-title="Field Type">boolean</td>

              <td class="entry" headers="d84981e386" data-title="Description">Makes the state, country, or territory available to users in Salesforce.
                States, countries, or territories that are <span class="keyword parmname">visible</span> must also be
                <span class="keyword parmname">active</span>.
              </td>

            </tr>

          </tbody>

        </table>

## Declarative Metadata Sample Definition

The following is sample XML that configures state and country picklists for the United States and Canada for use in an organization. It also makes the country of Greenland available only in the API. This example is supported in API version 68.0.

<?xml version="1.0" encoding="UTF-8"?>
<AddressSettings xmlns="http://soap.sforce.com/2006/04/metadata">
  <countriesAndStates\>
    <countries\>
      <country\>
        <active\>true</active\>
        <integrationValue\>United States</integrationValue\>
        <isoCode\>US</isoCode\>
        <label\>United States</label\>
        <orgDefault\>true</orgDefault\>
        <standard\>true</standard\>
        <states\>
          <state\>
            <active\>true</active\>
            <integrationValue\>Alabama</integrationValue\>
            <isoCode\>AL</isoCode\>
            <label\>Alabama</label\>
            <standard\>true</standard\>
            <visible\>true</visible\>
          </state\>
          <state\>
            <active\>true</active\>
            <integrationValue\>Alaska</integrationValue\>
            <isoCode\>AK</isoCode\>
            <label\>Alaska</label\>
            <standard\>true</standard\>
            <visible\>true</visible\>
          </state\>
        </states\>
        <visible\>true</visible\>
      </country\>
      <country\>
        <active\>true</active\>
        <integrationValue\>Canada</integrationValue\>
        <isoCode\>CA</isoCode\>
        <label\>Canada</label\>
        <orgDefault\>false</orgDefault\>
        <states\>
          <state\>
            <active\>true</active\>
            <integrationValue\>Alberta</integrationValue\>
            <isoCode\>AB</isoCode\>
            <label\>Alberta</label\>
             <standard\>true</standard\>
             <visible\>true</visible\>
          </state\>
          <state\>
            <active\>true</active\>
            <integrationValue\>British Columbia</integrationValue\>
            <isoCode\>BC</isoCode\>
            <label\>British Columbia</label\>
            <standard\>true</standard\>
            <visible\>true</visible\>
          </state\>
        </states\>
        <visible\>true</visible\>
      </country\>
      <country\>
        <active\>true</active\>
        <integrationValue\>Greenland</integrationValue\>
        <isoCode\>GL</isoCode\>
        <label\>Greenland</label\>
        <standard\>true</standard\>
        <visible\>false</visible\>
      </country\>
    </countries\>
  </countriesAndStates\>
</AddressSettings\>

## Wildcard Support in the Manifest File

The wildcard character \* (asterisk) in the package.xml manifest file doesn’t apply to metadata types for feature settings. The wildcard applies only when retrieving all settings, not for an individual setting. For details, see [Settings](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_settings.htm). For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).