You may see a sync error in the sync-error-tool with the status code FIELD_INTEGRITY_EXCEPTION and a message similar to one of the following:
- "The BillingStateCode field contains EP, which isn't an available state. Your administrator can add it for you."
- "The ShippingStateCode field contains STS, which isn't an available state."
- "The BillingCountryCode field contains LK, which isn't an available country/territory."
The affected fields are typically BillingStateCode, ShippingStateCode, BillingCountryCode, or ShippingCountryCode on an Order or Account record.
This error is especially common for stores with international customers, even when shipping is restricted to specific countries.
Cause of state and country picklist sync errors
This error occurs when Salesforce's State and Country/Territory Picklists feature is enabled in your org (which is the default for new Salesforce orgs) and the state or country code submitted during checkout is not in your Salesforce picklist options.
StoreConnect uses standard ISO 3166-2 state and country codes at checkout. These codes are correct, but Salesforce only includes state/territory values for approximately 10 countries by default (Australia, Brazil, Canada, China, India, Ireland, Italy, Japan, Mexico, and the United States). If a customer enters an address from any other country, the state code will not be recognized by Salesforce and the sync will fail.
StoreConnect restricts shipping countries based on your shipping rate and provider configuration, but billing countries are not restricted. Customers can enter a billing address from any country worldwide, even if you only ship domestically. This means state and country picklist errors can occur for billing addresses from countries you may not expect.
Resolution for state and country picklist sync errors
Step 1: Identify the missing value
Open the sync-error-tool and locate the failing record. The error message will tell you:
- The field that failed (e.g.,
BillingStateCode,ShippingStateCode) - The code that was rejected (e.g.,
EP,STS,LK)
Note both of these values. You will also need to identify which country the code belongs to — you can look this up using the ISO 3166-2 standard.
Step 2: Add the missing state or country to Salesforce picklists
- In Salesforce, go to Setup.
- In the Quick Find box, search for State and Country/Territory Picklists.
- Select Configure States, Countries and Territories.
- Find the relevant country in the list and click Edit.
- To add a missing state or territory:
- Click New in the States section.
- Enter the State Name (e.g., "Extremadura").
- Enter the State Code matching the code from the error message (e.g., "EP").
- Ensure Active and Visible are both checked.
- Click Save.
- If the country itself is missing, click New Country at the top level and add the country code and name.
For full details on configuring picklists, see the Salesforce documentation: Configure State and Country/Territory Picklists.
Salesforce only pre-loads state/territory values for approximately 10 countries. If your store serves international customers, you will likely need to add states for additional countries beyond the defaults.
Step 3: Re-sync the failed records
- Go to the sync-error-tool in StoreConnect.
- Select the checkbox next to the affected record(s).
- Click the Re-sync button.
The record should now sync successfully with the newly added picklist value.
Select all records in the list when re-syncing, not just the one that failed. Related events for the same record may also need to be re-processed.
Verify the fix
- Confirm the sync error no longer appears in the sync-error-tool.
- Open the synced record in Salesforce and verify the address fields are populated correctly.
- Optionally, place a test order using an address with the previously failing state/country code to confirm future orders sync without issues.
Prevent state and country picklist sync errors
- Proactively add picklist values: If you sell to international customers, add state/territory values for all countries your customers may use — including for billing addresses, which are not restricted to your shipping countries.
- Audit after expanding to new markets: When you begin selling to a new region, check that all relevant state codes are in your Salesforce picklist before orders start coming in.
- Monitor the Sync Error Tool: Check the sync-error-tool regularly for new
FIELD_INTEGRITY_EXCEPTIONerrors, especially after expanding to new markets or receiving orders from new regions.