We are going to be turning on State/Country picklists soon for Leads and Accounts.
There is currently a process for us in place that inserts new Leads using the SForce SOAP Api). Data that is currently entered through this process (by the very nature of the process) is not currently validated, and can end up with some weird values (for example, the following could all be entered in place of United States: USA, US of A, U.S.A., Untied States, United State of America, etc – this includes misspellings and weird variants).
When picklists are turned on, will data like this that will be entered for country or state cause issues/errors when we try to insert it through the API? If so, is there any alternative other than to catch these inconsistencies and correct them (per the approved list of Countries/States) before submitting them through the API?
Best Answer
The answer is YES - they will be enforced. This is easily proven by turning on the State and Country picklists in a Sandbox and using SFDC Workbench to insert 'bad' values (say, into the Account
BillingCountry
field)You will receive a
FIELD_INTEGRITY_EXCEPTION
if you use a value other than the Integration Value configured for the country/state. Integration value is defined as:The documentation doesn't indicate that you can use multiple integration values (which is what you want in your use case)
In a prior org, we had a similar situation with multiple values for the canonical United States. We had the source system update proxy fields on the Lead and then used workflows to deal with the variants. If nothing matched, it was assigned to an 'unknown' country and appropriate alerts were done