# Associate company with deal using private app

**URL:** <https://community.hubspot.com/t/associate-company-with-deal-using-private-app/123787>\
**Category:** APIs & Integrations\
**Tags:** companies, object\
**Created:** [January 13, 2025, 2:18pm UTC](https://community.hubspot.com/t/associate-company-with-deal-using-private-app/123787 "2025-01-13T14:18:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndrewT1](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@AndrewT1](https://community.hubspot.com/u/AndrewT1)\
**Post date:** [January 13, 2025, 2:18pm UTC](https://community.hubspot.com/t/associate-company-with-deal-using-private-app/123787/1 "2025-01-13T14:18:40Z")

</div>

Hey,  
We’re going to create a private app, and We want to see how much revenue we are doing with a certain customer. And track this business per month, quarter, year and so on.  
So one of the ideas were creating a deal with help of private app, but we don’t know how to add an associated company to this deal. So we can create a report and look how much revenue we got from each company.  
We will have a lot of orders with each customer (company), and track this business, so it couldn’t be just a new field in company information.  
Thank you!

---

<div class="post-metadata">

**Author:** ![SteveHTM](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stevehtm/32/22074_2.png) [@SteveHTM](https://community.hubspot.com/u/SteveHTM)\
**Post date:** [January 13, 2025, 4:24pm UTC](https://community.hubspot.com/t/associate-company-with-deal-using-private-app/123787/2 "2025-01-13T16:24:59Z")

</div>

@AndrewT1 - I’m sure your situation is more complex that you have described here. As I read it, you want to create one or more ‘virtual deal’ objects to which you associate Company records. And then a rollup calculated field could sum revenue on the associated Company record from the associated virtual deals. Is this essentially correct?

As a challenge, it seems like might be pretty standard. The API key from thr private app might be useful for supporting custom association logic (using [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/guides/api/crm/associations/associations-v4)) but otherwise it seems you can use standard property definitions and workflow logic.

So perhaps I’m missing a key point?

Steve

---

<div class="post-metadata">

**Author:** ![AndrewT1](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@AndrewT1](https://community.hubspot.com/u/AndrewT1)\
**Post date:** [January 13, 2025, 4:46pm UTC](https://community.hubspot.com/t/associate-company-with-deal-using-private-app/123787/3 "2025-01-13T16:46:02Z")

</div>

We need to create one ‘virtual deal’ object and associate it with Company record when we make a delivery. We will simply create the deal and associate it with the Company. We don’t need to create a separate field for the sum revenue, as we will generate reports in HubSpot that include deal amounts. Thanks.

---

<div class="post-metadata">

**Author:** ![SteveHTM](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stevehtm/32/22074_2.png) [@SteveHTM](https://community.hubspot.com/u/SteveHTM)\
**Post date:** [January 13, 2025, 4:53pm UTC](https://community.hubspot.com/t/associate-company-with-deal-using-private-app/123787/4 "2025-01-13T16:53:02Z")

</div>

So, is using the associations API helpful here?

Steve
