Configure StateCountry Code mapping correctly in Salesforce to avoid integration errors
Integration errors occurring due to incorrect State and Country code mapping can be resolved by configuring the Salesforce forms with the correct integration values for States and Countries.
You encounter the following error when the state/country mapping is incorrect.
“Error | There’s a problem with this state, even though it may appear correct. Please select a state from the list of valid states.”
The error occurs because State and Country codes are represented differently in NetSuite and Salesforce applications. In the NetSuite customer form or contact form, even though the state field may look like a name, e.g. California, behind the scenes, NetSuite uses a 2-letter ISO code to represent the data. The solution is to set up the Salesforce Integration Values to have the 2-letter codes. The following are the steps you need to complete in the Salesforce Setup section.
In Salesforce, go to Setup.
In the quick search, type "country", select State and Country picklist.
Then, click on the hyperlink that says “Configure states and countries”
This brings you to a screen with a list of Countries.
Scroll down to the United States and click the Edit button to modify the record.
For the Integration App (SmartConnector) to work correctly, change the Integration Value for United States to “US”.
Then, edit each State, and change the Integration Value for each state so that it is the 2-character ISO code.
Example: In the Integration Value section, modify the state ‘Arizona’ to’ AZ’
The following is the default setting:
Here’s what it should be:
Note: This error occurs in Salesforce v2 and does not happen in Salesforce v1 because, in v1, a backend server translates state and country codes into the acceptable values automatically during integration.
I'm still getting the following error after following these instructions, "Error | Billing Country Code: bad value for restricted picklist field: United States |"
Does this apply for the IO as well as for V2?
Yes, as a matter of fact, it turns out that it does. It also applies to Canadian Provinces. Can you tell me if it applies to still other countries?
Hi Meter Group,
The above changes are required for both SFNSIO and v2. Salesforce packages 239 countries and includes the states and provinces of the United States, Canada, Australia, Brazil, China, India, Ireland, Italy, and Mexico. (i.e. 9 countries out of 239 have state picklist). For countries other than 9 listed above, the state list has to be configured. You would have to setup the data (Name, Code and Integration Value) for the new entries.
The integration application maps the Salesforce State and Country field with NetSuite State and Country codes. You would observe this error when the codes in NetSuite do not match with Salesforce configured state or territory lists. The codes in NetSuite can be 10+ characters, while SF allows only 10 characters, so there are high chances of error for the newly configured states lists.
Please let us know if this answers your query.
The problem I fear is that now everything else that integrates with SF will be broken instead. Salesloft, Pardot, and an ever-growing list. Is there no other way? Can we map it with a Lookup, or change the values in Netsuite?
Does this apply to the IO version of SF to NS IA as well??? Agree with above comment as well. Might need to do a lookup or static mapping.
Hi METER Group and David Gollom,
I'm checking on your questions with our SFNS PM team.
Hi Meter Group and David Gollam,
Please sign in to leave a comment.