I'm using the npm package
email@example.com to write a custom integration with Salesforce.
The package works fine most of the time, the problem arises when a user selects maps our contact data to incompatible Salesforce custom fields at the contact or lead level.
For example, if one of our fields is 600 characters long, but Salesforce's custom field max length is 100 characters; the moment the user decides to import this record to Salesforce as a contact or lead, the API throws a fatal error and the contact/lead is not created.
In order to solve this issue, I've come up with 2 solutions:
Create a contact with just First Name, Last Name and AccountId and then update the newly created contact with our data (this is fine, the problem is that it uses 2 API Calls)
Research if Salesforce API supports an "
INSERT IGNORE" kind of query, that as long as
AccountIdare present, the contact is still created despite some custom fields being invalid.
I'm fine with option #1, but I'd really like to know if it's possible to accomplish #2. Or in other words:
Is there a way to still create a contact even if some custom fields fail?