Reduce Deal amount based on associated deals

I want to create a master Deal (stays in Recon) example $100,000

If a Closed-Won deal gets created and associated to this Deal for $25,000 I want to reduce the amount of the Master Deal to be $75000

Is this possible with a workflow, or API?

Yes, this is possible, but not with a standard HubSpot workflow. You’ll need to use either a custom code action within a workflow (which requires Operations Hub Professional or Enterprise) or an external API integration.

The standard workflow tools can’t perform actions on associated deals; they can only affect the deal that is enrolled in the workflow or its associated contacts/companies.


Method 1: The Best Solution - Custom Code Workflow (Ops Hub Pro+)

This is the cleanest and most manageable way to achieve your goal directly within HubSpot.

Here’s the process:

  1. Create a Deal-based Workflow: Set the enrollment trigger for when a deal’s Deal Stage is any of Closed-Won.

  2. Add a Custom Code Action: This is where the magic happens. You’ll write a small snippet of code (in Node.js or Python) that runs when the deal is closed.

  3. The Code’s Logic:

    • The code will receive the Amount and Deal ID of the Closed-Won deal.

    • It will use the HubSpot Associations API to find any other deals associated with this one.

    • It will loop through the associated deals (your “master” deals) it finds.

    • For each master deal, it will:

      • Read the master deal’s current Amount.
      • Calculate the new amount by subtracting the Closed-Won deal’s amount.
      • Use the HubSpot API to update the Amount property on the master deal record.

:white_check_mark: Pros: Fully contained within HubSpot, secure, and triggers in real-time. :warning: Prerequisite: Requires an Operations Hub Professional or Enterprise subscription.


Method 2: The API/Webhook Approach

If you don’t have Operations Hub Pro, you can build a custom integration using the HubSpot API. This is more complex and requires a developer and an external server to host the application.

Here’s the process:

  1. Set up a Webhook: You would create a webhook in HubSpot that sends a notification to your external application every time a deal stage changes.
  2. Build an Application: Your application would “listen” for these webhook notifications.
  3. Filter and Act: When your app receives a notification about a deal moving to Closed-Won, it would then execute the same logic as the custom code action described above, using a series of API calls to find the associated master deal and update its amount.

:white_check_mark: Pros: Extremely powerful and doesn’t require a specific HubSpot Hub subscription. :warning: Cons: Requires significant developer resources, ongoing maintenance, and an external server to run the code.


Why a Standard Workflow Fails

To be clear, a standard workflow can’t do this because its actions are limited. While it can trigger on the $25,000 Closed-Won deal, it has no native action to “find an associated deal and then decrease its property value.” The scope of its actions is limited to the enrolled deal itself.

Hey @Raflab!

Just a friendly reminder to please disclaim when your posts are AI-generated or AI-assisted.
This helps maintain transparency and ensures a clear understanding within our community.
You can find more information in our Terms of Use.
Thanks!

Hi @JTowner,

Yes, you can with few new properties at deal object.

1. Sub-deal Amount - This property will count a total amount of sub-deal associated with the master deal. In my example, I only want to rollup when associated deal mark as closed won.

2. New Deal Amount - Now create a another property which store a original master deal amount but when first time deal amount set on master deal AND after that time only when step 4 workflow got executed.

3. Print This Amount - Create a another calulation property which use to substract Sub-Deal Amount from the New Deal Amount and store to print on a master deal.

4. Create a workflow to print a new value on “Print This Amount” to the Amount property on deal.

Still need support? Let us know and we are happy to setup for you quickly!


Community.png

This looks good, but I have not see Print this amount options, do you mean edit?

THANK YOU!

You need first to create a “Print This Amount (example name)” calculation property to get a value. Once you have a value for this property, you can proceed to the next step.
Does that clear your query? Send me a PM if you still have an any query!