+ Start a Discussion

Design quest - whats the recommended way to track an opportunity amount being used and reallocate the unused balance

To all the sf experts out here, trying to get your inputs for a use case that i’m trying to incorporate. Use case: We have a currency field called “Amount Owed” on opportunity which holds an $ value. It is calculated by user based on any unused amount for that opportunity. Example if an opp Amount = $1000 and only $800 was spend in reality, then the Amount Owed = $200 which will then be applied to future opportunities under that account. (Note: This Amount Owed can be applied to a single oppty or to multiple opportunities.)
Question: That said, business needs a way to track where, when and to which Opportunities was this $200 got applied to as a credit. Also they want the ability to run reports showing this.
My Idea: Thinking on to create a custom object named “AmountHeld” which would hold the actual amount owed on the oppty record and then have a child record associated to “Amount Held” called “AmountDistributed” which would then hold the credited amount value along with oppty name to which credit was applied to.
Please let me know if i’m thinking in the right direction in regards to business logic implementation & also reporting perspective? if not pls share your inputs. Thanks in advance!
ShirishaShirisha (Salesforce Developers) 
Hi Sathish,


Can you please confirm,how exactly the amount is being spent here.If it is for product(which is child of opportunity) then you can easily relate the product record for which you spent the amount as a child record in the related list and you need to have an another amount on the Opportunity Object which holds the credit amount(to store the remaining amount) for which you would like to spend in future.

Instead of creating the custom Objects,you can proceed it with the Products and Opportunity as these are standard Objects and related to each other.You can easily create the report as well.

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri

Hi Shirisha,

So this amount value is spent across opp line items. At the end of the opp end date, the "amount owed" is calculated based of products. So, for any future opps created under the same account which will also have its dedicated amount values & associated prods, we will be adding the credit(part of "amount owed "or Full "amount owed") to this Amount value. Now, how do we track the to which opps does the actual amount owed was distributed & how much was allocated. Also note that the future opps may/may not have amount owed value based of what was spend per opp. So, if we have 2 previous opps withsome values in amount owed fields, then we need to be able to track which opp's amount owed value was used to credit the future opp & how much was used.

Thats where i came up with the object which holds the amount owed value record by Opp & a child obj to that cust obj as amt distributed to track the amoutn allocation respectively.