I have technical design needs to be finalized. I want to get some expert opinion about which approach would be better. Please provide me helpful feedback. Here is brief about my design:
- ESB will send external id, contact info (without Id) and email as parameters.
- If Contact does exists with provided external id then update contact.
- If contact doesn't found with provided external id then look into Lead with same external id.
- If Lead does exists with provided external id then update Lead.
- If Lead doesn't found with provided external id then search Lead with provided Email Id, if found then update Lead else create new lead.
I suggested to use out of the box enterprise wsdl webservice api to achieve this. As from ESB, there is going to be few IF conditions and out of the box api call. i.e. First query contact with external id to get Contact and if found then update and same for whole flow.
But the architect team is forcing to keep dependency on CRM, means they want me to write apex webservice method where I will first query contact with external id to get contact and then compare each fields to assign with updated values and then update Contact and same for Lead.
I want to know which one is better to use, either out of the box or webservice method to be exposed. There will be one contact at a time to update. What are pros and cons from CRM and ESP perspective?