function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sandeep kumar 73sandeep kumar 73 

How to update Opportunity Revenue Splits via SOAP API

We are trying to update revenue splits using SOAP API from external system. We have a sync running between Opportunity to another record in external system. When the data gets updated in external system we need to update the opportunity revenue splits in salesforce but we are getting errors because Salesforce has a validation on the Revenue splits that the total of their contributions should be 100%. Consider a scenario that there are two Revenue splits on the opportunity where Opportunity Owner being 70% and other user being 30% and this data gets reflected to the external system. Lets say they remove the other user with 30% contribution and add another user for same contribution in the external system and we need to sync this data to Opportunity. We cant use upsert here since it would be 130% contribution on SF side and it would throw an error. So, basically how do update splits satisfying 100% contribution criteria. 
James LoghryJames Loghry

Yeah, Opportunity Revenue Splits can be a tricky integration.
Can you set the 30% split to 0%, and then the new user would be set to 30% in the same upsert?
Optionally, you could delete the existing Revenue splits, then re-upsert the updated splits.

sandeep kumar 73sandeep kumar 73
Hi James, Thank you for the response, please see my response below and let me know if there is any alternative. First option of clearing the splits from 30 to 0 and upsert will work but it needs additional delete calls for team members and splits which could have performance issues. For second option, Salesforce will not allow us to delete all the existing revenue splits since there is a validation that sum of revenue splits should be 100% and the opportunity owner cannot be deleted from the revenue splits. Thanks, Sandeep.
Gina GarciaGina Garcia
Hi Sandeep. We have the same issue. We are trying to update revenue splits through update on opportunity. Have you resolved this issue? How? Thanks.