5

Why the list of country and state picklists are different in different organization?

When we retrieve values from sandbox or production org we have values like Chinese Taipei instead of Taiwan on scratch org, also, Cuba is missing

enter image description here

The reason why do we try to retrieve these and deploy is we want to automate the State and Country picklist enablement.

And we receive errors when we try to deploy them.

Component Failures [1]
====================================================================================================================
| Type  Name    Problem                                                                                  Line:Column 
| ───── ─────── ──────────────────────────────────────────────────────────────────────────────────────── ─────────── 
| Error Address Cannot modify label for state Taiwan with iso code 71 to Chinese Taipei in country China   

enter image description here

Component Failures [1]
================================================================
| Type  Name    Problem                              Line:Column 
| ───── ─────── ──────────────────────────────────── ─────────── 
| Error Address Invalid iso code CU for country Cuba  

       

enter image description here


Update. SF Support asked for the complete list of differences.

Different Labels.

Taiwan - Chinese Taipei (as state)

(Missing) - Cuba

Czechia - Czech Republic

Telangana - (Missing)

(Missing) - Iran, Islamic Republic of

All Japan states - (Missing)

(Missing) - Korea, Democratic People's Republic of

Libya - Libyan Arab Jamahiriya

North Macedonia - Macedonia, the former Yugoslav Republic of

Palestine - Palestinian Territory, Occupied

(Missing) - Sudan

(Missing) - Syrian Arab Republic

Eswatini - Swaziland

Türkiye - Turkey

Taiwan - Chinese Taipei (as country)

Vietnam - Viet Nam

Kosovo - (Missing)

enter image description here

enter image description here

enter image description here

enter image description here

1
  • 1
    Following the thread Commented May 15 at 11:12

1 Answer 1

1

Response from the product team which has been passed by SF Support on the opened case.

1)If there is any other open bug about this inconsistency behavior in address settings:

[Answer]: Product team have logged a doc bug W-15812204 to refine the doc considering your use case.

Based on this, the below help article: https://help.salesforce.com/s/articleView?id=sf.admin_state_country_picklists_api.htm&type=5 would be updated to reflect the below.

Note: "AddressSettings data may changed from time to time, and it may causes mismatch in state or country labels when deploying AddressSettings data retrieved from another org, the workaround is to edit the retrieved metadata to match the one in the deploy org.”

2)The metadata of address settings is not same across all the orgs. For a developer org, scratch org we could see same metadata which is different for a demo org(enterprise or any other edition)

[Answer]: Different org edition is created based on the template, and those template should be causing the difference between the addressSettings.

In the AddressSettings doc, it says the following which shows this current designed behaviour. You can use the Metadata API to edit existing states, countries, and territories in state and country/territory picklists. You can’t use the Metadata API to create or delete new states, countries, or territories.

For state and country label, it cannot be updated in API as it is read only.

https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_addresssettings.htm

3)Is there any workaround or will Salesforce fix this issue in future releases to have a consistent unique default master list of Countries and States picklist values across all the Salesforce Orgs.

[Answer]: The workaround will be to change the label in the retrieved metadata to match the one with the deploy org, and there shouldn’t be that much differences, and it depends on when the org is created, if it is old, there will be more delta between the recent orgs.

4)If countries and state picklist values are not supposed to be available for deployment or not supported for deployment, should this documentation be corrected: https://help.salesforce.com/s/articleView?id=sf.admin_state_country_picklists_api.htm&type=5 that Address Setting Metadata API available?

[Answer]: Address data is available for deployment between Sandboxes/Scratch orgs. However, if there are mismatch in labels it will error out due to labels as they are not subjected to be changeable via API.

3
  • AddressSettings master data is subject to change, and state/country populates the data based on the AddressSettings master data when the org is created, so at any given time when the org is created, it is possible that the state/country data is different, therefore it has been considered as current designed behaviour Commented May 24 at 7:19
  • 1
    I understand the expectation is to have a unified AddressSettings master data across all the orgs or allow deployment of labels. The product team has noted this scenario as feedback for future improvements. I will provide if there are any further updates from them in this thread. Commented May 24 at 9:10
  • ok, thanks @SwethaMaddali
    – Patlatus
    Commented May 24 at 9:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .