{"title":"Resolve state and country picklist sync errors","slug":"resolve-state-country-picklist-sync-errors","url":"https://support.storeconnect.com/articles/resolve-state-country-picklist-sync-errors","url_markdown":"https://support.storeconnect.com/articles/resolve-state-country-picklist-sync-errors.md","subtitle":null,"summary":"Fix FIELD_INTEGRITY_EXCEPTION sync errors caused by missing state or country values in your Salesforce State and Country Picklists configuration.","type":"Help_Documentation","video_url":"","keywords":"FIELD_INTEGRITY_EXCEPTION, state, country, picklist, sync error, BillingStateCode, ShippingStateCode","last_modified":"2026-08-21T07:12:35+0000","body_markdown":"## Symptoms\n\nYou see a sync error in the [sync error tool](sync-error-tool) with the status code **FIELD_INTEGRITY_EXCEPTION** and a message similar to one of the following:\n\n- \"The BillingStateCode field contains EP, which isn't an available state. Your administrator can add it for you.\"\n- \"The ShippingStateCode field contains STS, which isn't an available state.\"\n- \"The BillingCountryCode field contains LK, which isn't an available country/territory.\"\n\nThe affected fields are typically `BillingStateCode`, `ShippingStateCode`, `BillingCountryCode`, or `ShippingCountryCode` on an Order or Account record.\n\nThis error is especially common for stores with international customers, even when shipping is restricted to specific countries.\n\n## Cause\n\nThis 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.\n\nStoreConnect 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.\n\n:::note\nStoreConnect 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.\n:::\n\n## Resolution\n\n### Step 1: Identify the missing value\n\nOpen the [sync error tool](sync-error-tool) and locate the failing record. The error message will tell you:\n\n- The **field** that failed (e.g., `BillingStateCode`, `ShippingStateCode`)\n- The **code** that was rejected (e.g., `EP`, `STS`, `LK`)\n\nNote 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](https://en.wikipedia.org/wiki/ISO_3166-2).\n\n### Step 2: Add the missing state or country to Salesforce picklists\n\n1. In Salesforce, go to **Setup**.\n2. In the Quick Find box, search for **State and Country/Territory Picklists**.\n3. Select **Configure States, Countries and Territories**.\n4. Find the relevant country in the list and click **Edit**.\n5. To add a missing state or territory:\n   1. Click **New** in the States section.\n   2. Enter the **State Name** (e.g., \"Extremadura\").\n   3. Enter the **State Code** matching the code from the error message (e.g., \"EP\").\n   4. Ensure **Active** and **Visible** are both checked.\n   5. Click **Save**.\n6. If the country itself is missing, click **New Country** at the top level and add the country code and name.\n\nFor full details on configuring picklists, see the Salesforce documentation: [Configure State and Country/Territory Picklists](https://help.salesforce.com/s/articleView?id=sf.admin_state_country_picklists_configure.htm\u0026language=en_US\u0026type=5).\n\n:::tip\nSalesforce 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.\n:::\n\n### Step 3: Re-sync the failed records\n\n1. Go to the [sync error tool](sync-error-tool) in StoreConnect.\n2. Select the checkbox next to the affected record(s).\n3. Click the **Re-sync** button.\n\nThe record should now sync successfully with the newly added picklist value.\n\n:::tip\nSelect 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.\n:::\n\n## Verification\n\n1. Confirm the sync error no longer appears in the [sync error tool](sync-error-tool).\n2. Open the synced record in Salesforce and verify the address fields are populated correctly.\n3. Optionally, place a test order using an address with the previously failing state/country code to confirm future orders sync without issues.\n\n## Prevention\n\n- **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.\n- **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.\n- **Monitor sync errors**: Check the [sync error tool](sync-error-tool) regularly for new `FIELD_INTEGRITY_EXCEPTION` errors, especially after expanding to new markets or receiving orders from new regions.\n\n## Related issues\n\n- [Manage sync errors](sync-error-tool)\n- [How to find and resolve sync errors](how-to-find-and-resolve-sync-errors)"}