<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Primary Company in a Deal in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Primary-Company-in-a-Deal/m-p/953938#M72458</link>
    <description>&lt;P&gt;THanks Zach, I have forwarded your response to cData to determine if it is something that their dev team can incorporate into their ODBC driver.&amp;nbsp; I'll update this query in due course.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Apr 2024 11:33:57 GMT</pubDate>
    <dc:creator>SBisset</dc:creator>
    <dc:date>2024-04-03T11:33:57Z</dc:date>
    <item>
      <title>Primary Company in a Deal</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Primary-Company-in-a-Deal/m-p/949258#M72182</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;I'm using the cData ODBC driver to bring data into Excel.&amp;nbsp; But this is Hubspot issue, not a cData issue.&amp;nbsp; The cData table which deals with Deal/Company associations only contains DealID and CompanyID.&amp;nbsp; So if a deal has more than 1 company association, then there are more than 1 records in the table.&amp;nbsp; My problem is that I'm only interested in querying a list of the Primary Companies for each deal, but the Primary Company tag is not exposed via the API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wondering if you clever cookies can think of a way that I could get the Primary Company ID into a custom field in the Deal record, in an automated manner?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or perhaps there is another approach to this that I'm not aware of?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My end goal is to be able to construct a table of Deal IDs and Associated Primary Company IDs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stuart&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 12:05:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Primary-Company-in-a-Deal/m-p/949258#M72182</guid>
      <dc:creator>SBisset</dc:creator>
      <dc:date>2024-03-25T12:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Primary Company in a Deal</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Primary-Company-in-a-Deal/m-p/949534#M72203</link>
      <description>&lt;P&gt;Hey, &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/733431"&gt;@SBisset&lt;/a&gt;&lt;/SPAN&gt; &lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Welcome to our community. Thanks for your question. I'd like to invite a few community members to the conversation — hey &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/324811"&gt;@zach_threadint&lt;/a&gt;&lt;/SPAN&gt; &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/92197"&gt;@albertsg&lt;/a&gt;&lt;/SPAN&gt; do you have any recent experience you can share with &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/733431"&gt;@SBisset&lt;/a&gt;&lt;/SPAN&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you! — Jaycee&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 17:57:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Primary-Company-in-a-Deal/m-p/949534#M72203</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2024-03-25T17:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Primary Company in a Deal</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Primary-Company-in-a-Deal/m-p/949887#M72221</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/733431"&gt;@SBisset&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Would it be of any help to know that only the "Primary" associated Company record&amp;nbsp;will have the association type "deal_to_company"? For example, below is a response from the GET Deal API endpoint where I have 3 associated companies:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;5077968620: Primary (the only associated Company in the response with "type": "deal_to_company")&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;10749286389: "test" association label&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;10749296835: "test" and "test_2" association labels&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;PRE class=""&gt;&lt;CODE&gt;{
    "id": "6412188404",
    "properties": {
        "amount": "1",
        "closedate": "2023-01-31T00:01:21.510Z",
        "createdate": "2023-01-13T00:01:26.992Z",
        "dealname": "Test Deal 2",
        "dealstage": "123756779",
        "hs_lastmodifieddate": "2024-03-22T07:23:03.657Z",
        "hs_object_id": "6412188404",
        "pipeline": "46506211"
    },
    "createdAt": "2023-01-13T00:01:26.992Z",
    "updatedAt": "2024-03-22T07:23:03.657Z",
    "archived": false,
    "associations": {
        "companies": {
            "results": [
                {
                    "id": "5077968620",
                    "type": "deal_to_company"
                },
                {
                    "id": "5077968620",
                    "type": "deal_to_company_unlabeled"
                },
                {
                    "id": "10749286389",
                    "type": "deal_to_company_unlabeled"
                },
                {
                    "id": "10749296835",
                    "type": "deal_to_company_unlabeled"
                },
                {
                    "id": "10749286389",
                    "type": "test"
                },
                {
                    "id": "10749296835",
                    "type": "test"
                },
                {
                    "id": "10749296835",
                    "type": "test_2"
                }
            ]
        }
    }
}&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;I hope that proves helpful. Please let me know if you have any follow-up questions.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 26 Mar 2024 08:46:30 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Primary-Company-in-a-Deal/m-p/949887#M72221</guid>
      <dc:creator>zach_threadint</dc:creator>
      <dc:date>2024-03-26T08:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: Primary Company in a Deal</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Primary-Company-in-a-Deal/m-p/953938#M72458</link>
      <description>&lt;P&gt;THanks Zach, I have forwarded your response to cData to determine if it is something that their dev team can incorporate into their ODBC driver.&amp;nbsp; I'll update this query in due course.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 11:33:57 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Primary-Company-in-a-Deal/m-p/953938#M72458</guid>
      <dc:creator>SBisset</dc:creator>
      <dc:date>2024-04-03T11:33:57Z</dc:date>
    </item>
  </channel>
</rss>

