<?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: Need API to know letest associated contact to a deal in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Need-API-to-know-letest-associated-contact-to-a-deal/m-p/1021985#M75557</link>
    <description>&lt;P&gt;Thanks, Jaycee for the help and tagging people who can help .&lt;/P&gt;</description>
    <pubDate>Mon, 05 Aug 2024 06:11:30 GMT</pubDate>
    <dc:creator>Rakesh1003</dc:creator>
    <dc:date>2024-08-05T06:11:30Z</dc:date>
    <item>
      <title>Need API to know letest associated contact to a deal</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Need-API-to-know-letest-associated-contact-to-a-deal/m-p/1019954#M75496</link>
      <description>&lt;P&gt;We are looking for an API that provides the contact record ID associated with a deal in sequential order. For example, if Deal D1 was initially associated with Contact C1 and later also associated with Contact C2, we need the contacts to be returned in the order they were associated. The current API returns the associated contacts in a random sequence. We specifically need the contact IDs in the order they were associated, with the most recent contact either first or last.&lt;/P&gt;&lt;P&gt;Current API we are using:&lt;BR /&gt;&lt;A href="https://api.hubapi.com/crm/v3/objects/deals/deal_id?associations=0-1&amp;amp;archived=false" target="_new" rel="noreferrer"&gt;https://api.hubapi.com/crm/v3/objects/deals/deal_id?associations=0-1&amp;amp;archived=false&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 10:04:47 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Need-API-to-know-letest-associated-contact-to-a-deal/m-p/1019954#M75496</guid>
      <dc:creator>Rakesh1003</dc:creator>
      <dc:date>2024-08-01T10:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Need API to know letest associated contact to a deal</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Need-API-to-know-letest-associated-contact-to-a-deal/m-p/1020221#M75508</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/803449"&gt;@Rakesh1003&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Thanks for your question. This one is challenging due to the lack of filters or sorting options for this endpoint. Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/101258"&gt;@Teun&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/293284"&gt;@dsmarion&lt;/a&gt;&amp;nbsp;do you have any suggestions or other ways that&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/803449"&gt;@Rakesh1003&lt;/a&gt;&amp;nbsp;might tackle this challenge?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Jaycee&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 17:38:21 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Need-API-to-know-letest-associated-contact-to-a-deal/m-p/1020221#M75508</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2024-08-01T17:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Need API to know letest associated contact to a deal</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Need-API-to-know-letest-associated-contact-to-a-deal/m-p/1020395#M75519</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/803449"&gt;@Rakesh1003&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I could be wrong, but I dont think there is or will be an API endpoint for that.&lt;/P&gt;
&lt;P&gt;In a situation like this I might use association labels to designate Initial Contact and Secondary contact associated. Finally I'd use the graphql api endpoint to request those records separated by association label. And to get those association labels set I would use a workflow that triggers on the Deal "Number of Associated Contacts" is known, then set the association label based on 2 calculated properties. You'll want to use a custom code workflow action, an App, or the New Workflow Association Actions beta to do the association:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KevinC_4-1722558278878.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/123795i38F92FA5C1796277/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KevinC_4-1722558278878.png" alt="KevinC_4-1722558278878.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That might look something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Association Labels:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KevinC_0-1722557305186.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/123791i8AA4ED92F3646DE3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KevinC_0-1722557305186.png" alt="KevinC_0-1722557305186.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Custom calculated Deal properties:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KevinC_1-1722557755869.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/123792iEB8BA350039E6AB7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KevinC_1-1722557755869.png" alt="KevinC_1-1722557755869.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KevinC_5-1722558365740.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/123796i6792788ABC50AD81/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KevinC_5-1722558365740.png" alt="KevinC_5-1722558365740.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Workflow trigger:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KevinC_2-1722558109199.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/123793i42D2C5B60617A47C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KevinC_2-1722558109199.png" alt="KevinC_2-1722558109199.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Worklfow logic:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KevinC_3-1722558154242.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/123794iD548978C19D69BBE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KevinC_3-1722558154242.png" alt="KevinC_3-1722558154242.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this gets you going!&lt;/P&gt;
&lt;P&gt;If you have any questions please dont hesistate to reach out!&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2024 00:30:27 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Need-API-to-know-letest-associated-contact-to-a-deal/m-p/1020395#M75519</guid>
      <dc:creator>Kevin-C</dc:creator>
      <dc:date>2024-08-02T00:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Need API to know letest associated contact to a deal</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Need-API-to-know-letest-associated-contact-to-a-deal/m-p/1021984#M75556</link>
      <description>&lt;P&gt;Hi Kevin-C,&lt;/P&gt;&lt;P&gt;Thanks for help. But provided solution will not work for our use case. As many as contact can be associated to a deal (As sales person will contact to all the contact related to that deal). Hubspot provides the associated contact(Using API / On association history UI) in the sequence of the contact was created on Hubspot and not in the sequence of the contact was associated to the deal.&lt;/P&gt;&lt;P&gt;To produce this case you can create 3 contact C1,C2,C3 in the given sequence and create a deal for C3 and than associate C2 to the created deal and after this associate C1 to the created deal. When you check the association history of deal on Hubspot UI or using API, it will show the associated contact on order of their creation not in order of their assocciate time.&lt;/P&gt;&lt;P&gt;Our chellange is when a sales person assocciate contacts to the deal we not getting information in API response which contact was added first and which later.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 06:08:43 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Need-API-to-know-letest-associated-contact-to-a-deal/m-p/1021984#M75556</guid>
      <dc:creator>Rakesh1003</dc:creator>
      <dc:date>2024-08-05T06:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need API to know letest associated contact to a deal</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Need-API-to-know-letest-associated-contact-to-a-deal/m-p/1021985#M75557</link>
      <description>&lt;P&gt;Thanks, Jaycee for the help and tagging people who can help .&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2024 06:11:30 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Need-API-to-know-letest-associated-contact-to-a-deal/m-p/1021985#M75557</guid>
      <dc:creator>Rakesh1003</dc:creator>
      <dc:date>2024-08-05T06:11:30Z</dc:date>
    </item>
  </channel>
</rss>

