Keep track of incomplete opportunity ids
Problem
A recent bug created duplicate web direct Opportunities due to a validation error when creating the Opportunity ContactRole. A revert for a recent change fixed the issue but brought back the initial issue it was trying to resolve.
This also led to discussing a few other ideas on how to solve the issues around Opportunity objects creation. Opportunity objects are Quote, QuoteAmendment, QuoteRatePlan and QuoteRatePlanCharge. If there are errors while creating them, we get an Opportunity with incomplete data. An additional idea in particular is how to keep track of those incomplete Opportunities.
I don't know if there's already a way for the Sales team to do this. So please let me know if there is and we can close this issue.
Proposal
Option 1: Create a rake task in CustomersDot that can be run any time and returns the ids of Opportunities that are incomplete. This would result in a lot of queries to SFDC though.
Option 2 (simplest solution): Create a file that contains Opportunity ids that encountered errors during the Opportunity objects creation. This does not involve additional queries to SFDC as the data is already present.
We could keep the results simple by only returning the Opportunity ids or include more info like which objects are missing. With either of these options, the Sales team could have a quicker way to determine which Opportunities are incomplete.
Result
A list of incomplete Opportunity ids for the Sales team and a possible entry point to resolve issues because of them.
Next steps (if any)
Ping some people to get the idea evaluated.