As Salesforce has no native function to merge Opportunities I'm looking into creating my own. I'm comfortable with the field mapping/child records (products, activities, attachments etc) but the one object I'm stuck with is Campaign Influence.
Here are the potential scenarios I can think of:
1. Neither oppo has a primary campaign source
Great do nothing
2. Only oppo to keep has a primary campaign source
Great do nothing
3. Only oppo to delete has a primary campaign source
Great update Oppo to keep
4. Both have a primary campaign source
What if both have more than one...how can I tell if there is more than one???
We have no api access to Campaign Influence (vote here! https://success.salesforce.com/ideaview?id=087300000006n77AAA) ...the only way I can see to add a campaign influence is via an update to the oppo field "Primary Campaign Source". Now the issue with scenario 4 is I can't tell how many Campaign Influence records there are (plus the horrible need to update the oppo to keep multiple times).
Is there a way to handle this without writing my own campaign influence functionality?