Hi,

I just want to share an issue I had with Salesforce webform integration and how I solved it. I share it for others who might have the same problem.

Problem
I created a webform that will create lead objects in Salesforce. During testing I noticed that some of the form submissions came through in Salesforce (good). However, some (majority) did not.

Reason
After going in with the debugger I discovered that this was caused by the Country field (field mapped to the Country field in Salesforce). Apparently Salesforce only accepts values for this field from a specified list. Only countries spelled correctly or their official abbreviation are allowed. I don't know if this is a standard settings for country fields in Salesforce or the salesforce instance I had to work with was customized.

When your input for this field doesn't match their list, the salesforce api sends back an error. However, the error isn't displayed by this module.You wont find it displayed on the screen, nor in the wachtdog logs (It might be in the 3.x dev version).

Solution
Install the Country code API module. You can specify an options list with all countries. Salesforce accepts these values.