In Implementing State and Country Picklists Part 1, we looked at the setup process which should take place prior to activating the picklist functionality. Part 1 outlines some thoughts on how to evaluate your org to ensure that all bases are covered including how the change will impact users and how to minimize the impact. With the background work completed, this post will work towards the implementation of the functionality. Before proceeding further, be sure to download the official implementation guide by clicking here.

To access the configuration area, click Setup | Data Management | State and Country Picklists.

Salesforce has outlined the appropriate order of the implementation on this page. It is recommended that you follow this order to ensure everything runs smoothly. Take your time while implementing the feature so that it is done right the first time.

Configure Your Picklists

First, we need to determine which countries and states are going to display as picklist values. Start by clicking the Configure state and countries link in step 1. This step allows you to select a default country (particularly helpful if the majority of your users are in a single country) and indicate which countries and states should be available to your users.

The country list is fully customizable.  Each column header indicates a specific action or permission for that particular country and related states. Click Edit to change the provided name, or to add/remove state values. The Active checkbox allows the field value to be accessed via the Metadata API but not visible to users. Visibility is granted via the Visible checkbox.

Salesforce provides access to 239 countries which are the ISO-3166 standard. Several countries will also come pre-populated with their related states. You can make any edits and adjustments you need to to match your business process.

Configure State and Country Picklist Values

Scan Your Organization & Convert Address Data

This scan is a discovery process which shows where the standard state and country fields are being used. After scanning your org, Salesforce will send you two emails, the first of which we will cover here.

The first email report will show you the address data from your current records which needs to be updated to match your new state and country values. The screenshot below provides a visual representation of the mapping that needs to be done on this page. United States was listed in my Salesforce org as UNITED STATES; US and USA. I used this tool to map all three variations to the new country value of United States.

State and Country Picklist

Map each of the field countries Salesforce has presented, and click Next. On the next page, you will be taken to a similar page where you can map your state values. This process may take some time so be patient to ensure proper mapping.

[highlight] NOTE: [/highlight]  If you are unsure of the mapping for a particular country value, select Unknown Value for the mapped country. This will allow you to proceed with the mapping, and after implementation, present the user with an error message and request the data to be updated when the record is edited.

Now that the state and countries are mapped, review the mapping to ensure that it is correct. If you are not ready to enable the picklists, click Finish to save the mappings. Once the mappings are confirmed, you cannot undo them.

The second email you received as part of the org scan will show you where the standard state and country fields are being used currently, and will need to be updated as part of the changes. Let’s take a deeper look below.

Enable State & Country Picklists & Update System

Now that all of your data has been converted, review the customization report sent to you via email as part of the organization scan. Here is an example of the report.

Organization_Customization_Scan

Salesforce recommends that these changes are done after activating the picklists. Just remember that once activating the functionality, you will want to quickly make the updates to your configuration as workflows, reports etc. may not work until they are updated. Depending on the results of this report, you may need to enlist some help to get the configurations updated. Be sure to also communicate to users that some functionality may not work until updates are made.

Once you are ready to enable the picklists, proceed to to the State and Country Picklist section of Setup, and click Enable in step 4. Don’t forget to rescan your organization until all changes have been made and all functionality is fully operational.

That’s it! You have now converted your standard text address fields to picklists! Congratulations!

Photo Credit: Nicolas Raymond via Flickr

13 thoughts on “ Implementing State and Country Picklists Part 2 ”

  1. Thank you for this thoughtful explanation. You have helped me identify areas I need to focus on for this conversion, and yet, made it seem simple enough. Of course, data conversion and customizations are tricky. But from what you’ve shown us, Salesforce has made this process easier by identifying a lot of the manual steps for us. Thanks again for sharing your insight.

    Like

  2. Brent, do you know if we can implement this and use the ISO code, CA instead of California, etc? I’ve done some searching on the web and have gotten mixed feedback on whether it’s possible or not. I’ve tried to implement this and did it successfully but it won’t work for us unless I can use the codes. Thanks!

    Like

    1. The picklist uses the spelled out name, but there is a secondary field (hidden) that automatically populates the ISO code for the State and yet another one that contains the ISO code for country. Those can be pulled into reports and used via the API. However, the picklist shown to the user is going to be spelled out. Hope that helps!

      Like

      1. Hi Brent, you mention that the ISO code can be pulled into a report. Which field are you using for this? I see “Home State/Province” and “Home State/Province (text only)” on the contact object – both of which are showing the full state name. Did you create a formula field that references the MailingStateCode value?

        Like

  3. organization scan?

    How do I address the changes that need to be made. I am new to salesforce and this portion seems daunting. I have over 50 changes according to the email list

    Like

  4. Quick question, For all of the countries that do not have a state value in the org (state field is empty), do I still put “unknown value” even though it should be none?

    Like

  5. Brent, do you know if we can enable only one picklist? That is, our organization only wants to enable the Country picklist and not the State/Territory picklist. Is that possible?

    Like

    1. Hi, Thomas. I believe you still need to enable both as an all or nothing option. You could always go with custom fields, but there are potential downsides to that approach too.

      Like

  6. “Once the mappings are confirmed, you cannot undo them.”

    1. Does that mean I can’t add new values that I didn’t have prior to enabling?
    2. Or what about fixing values say I mark something as unknown value but want to change it to the correct country/state later?
    3. If I disable the country/state picklist can I edit the mappings?

    Like

      1. Thanks. I was playing in my sandbox and was able to answer my questions.
        1. You can add new values after enabling.
        2. You cannot change mapped values unless you disable the mappings.
        3. Yes. Everything will reset and you’ll need to map all values again.

        Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.