We’re experiencing contact data sync failures between Salesforce and our external customer service platform due to field mapping mismatches. This is causing data loss and sync failures that affect our support team’s ability to access complete customer information.
The integration runs through a middleware platform that maps fields between systems. When contacts are updated in the external system and synced back to Salesforce, we get this error:
{
"error": "INVALID_TYPE_ON_FIELD_IN_RECORD",
"message": "Phone value of type String cannot be assigned to field of type Phone",
"fields": ["MobilePhone"]
}
Our custom field mapping includes standard fields like MobilePhone, Email, and several custom fields for customer preferences. The external system stores phone numbers as plain strings with various formats (with/without country codes, different separators). When these sync to Salesforce, the Phone field validation rejects improperly formatted numbers.
We’ve implemented basic data integrity validation in the middleware to strip non-numeric characters, but it’s not catching all format variations. Some records sync successfully while others fail, creating data inconsistencies. The middleware logs show about 15% failure rate on contact updates.
Additionally, we have custom fields for customer tier (picklist in SF, integer in external system) and communication preferences (multi-select picklist in SF, comma-separated string externally) that aren’t mapping correctly.
What’s the best approach for handling field mapping mismatches when data types don’t align perfectly between systems? Should we transform data in the middleware or adjust Salesforce field definitions?