First, we should address how SmartConnect sends data to SalesForce. SmartConnect connects to SalesForce using the SOAP API. For every record SmartConnect makes two calls to the web service. The first call is a SOQL query to check if the record exists, and the second call will create or update the record.
The SOQL Query
SmartConnect will run a query in SalesForce to return the Id of any existing records. The query will search using one of two logics. The first option, is a query with a where clause for each record used in the grouping of the destination. The second option is a query with a where clause using an External Id field.
*Note that if you map a field that is setup in SalesForce as an External Id, that field will be used in the lookup, and not the fields used in the grouping.
We commonly see an issue with trailing spaces when the data source is GP. GP will put trailing spaces into fields which will cause a mismatch when mapping to SalesForce.
The workaround is to use a trim in your data source such as the following.
RTrim(RM00101.CUSTCLAS) As CUSTCLASS
SalesForce Ids are case sensitive, so if you have saved the SalesForce Id to another system, make sure it has not changed the case.
If the issue isn’t one of the other two, then it is likely you have mapped a field that is setup in SalesForce as an External Id. Check in SalesForce to verify if there are any External Id fields on that object.