<?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: How to check for updated deal ID in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-check-for-updated-deal-ID/m-p/882409#M69198</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/583833"&gt;@LNail&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the Object (Deal) there is a Property called "hs_merged_object_ids" this will contain any old Object IDs from before the merge.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hopefully this will solve your sync issue (with a bit more code ;o)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have fun&lt;/P&gt;
&lt;P&gt;Mike&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="font-size: 0.8rem;"&gt;Here to learn more about HubSpot and share my HubSpot Knowledge. I'm the founder of &lt;A href="https://www.webalite.com?utm_campaign=community-forum&amp;amp;utm_source=community&amp;amp;utm_content=signature" target="_blank"&gt;Webalite&lt;/A&gt; a HubSpot Partner Agency based in Wellington, New Zealand and the founder of &lt;STRONG&gt;Portal-iQ&lt;/STRONG&gt; the world's first automated &lt;A href="https://portal-iq.com?utm_campaign=community-forum&amp;amp;utm_source=community-forum&amp;amp;utm_content=signature" target="_blank"&gt;HubSpot Portal Audit&lt;/A&gt; that helps you work smarter with HubSpot.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Nov 2023 00:21:55 GMT</pubDate>
    <dc:creator>Mike_Eastwood</dc:creator>
    <dc:date>2023-11-21T00:21:55Z</dc:date>
    <item>
      <title>How to check for updated deal ID</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-check-for-updated-deal-ID/m-p/882394#M69197</link>
      <description>&lt;P&gt;&lt;STRONG&gt;TLDR:&lt;/STRONG&gt; Syncing deal data to a merged deal does not result in error, nor does it update the merged deal. How can we program for this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our customer support team works in HubSpot all day. We sync our application user info to Contacts and their respective businesses to Companies regularly to keep the data consistent. Additionally, we store the Deal ID in our application to easily link from our app to the deal in HS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are times when an end user may create a new Business and User account within our application, creating duplicates. To correct, we merge the accounts within our application and within HubSpot.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When merging on HubSpot, the result of the merge sometimes changes the Deal ID. When this happens, the link within our application continues to work, forwarding the user to the updated newly-merged deal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The issue is when we sync our Deal data to the old ID, we do not receive any errors or warnings.&lt;/STRONG&gt; However, the data is &lt;EM&gt;not&lt;/EM&gt; updated on the newly-merged Deal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To avoid the errors that manually updating can create, how can we programmatically catch for this change in order to update the correct Deal?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 23:15:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-check-for-updated-deal-ID/m-p/882394#M69197</guid>
      <dc:creator>LNail</dc:creator>
      <dc:date>2023-11-20T23:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to check for updated deal ID</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-check-for-updated-deal-ID/m-p/882409#M69198</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/583833"&gt;@LNail&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the Object (Deal) there is a Property called "hs_merged_object_ids" this will contain any old Object IDs from before the merge.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hopefully this will solve your sync issue (with a bit more code ;o)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have fun&lt;/P&gt;
&lt;P&gt;Mike&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="font-size: 0.8rem;"&gt;Here to learn more about HubSpot and share my HubSpot Knowledge. I'm the founder of &lt;A href="https://www.webalite.com?utm_campaign=community-forum&amp;amp;utm_source=community&amp;amp;utm_content=signature" target="_blank"&gt;Webalite&lt;/A&gt; a HubSpot Partner Agency based in Wellington, New Zealand and the founder of &lt;STRONG&gt;Portal-iQ&lt;/STRONG&gt; the world's first automated &lt;A href="https://portal-iq.com?utm_campaign=community-forum&amp;amp;utm_source=community-forum&amp;amp;utm_content=signature" target="_blank"&gt;HubSpot Portal Audit&lt;/A&gt; that helps you work smarter with HubSpot.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 00:21:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-check-for-updated-deal-ID/m-p/882409#M69198</guid>
      <dc:creator>Mike_Eastwood</dc:creator>
      <dc:date>2023-11-21T00:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to check for updated deal ID</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-check-for-updated-deal-ID/m-p/882691#M69213</link>
      <description>&lt;P&gt;Thanks Mike. That does help.&lt;/P&gt;&lt;P&gt;Does it contain the&amp;nbsp;&lt;EM&gt;new&lt;/EM&gt; object ids, as I will only have the old ID and am looking for the new ID?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 16:10:33 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-check-for-updated-deal-ID/m-p/882691#M69213</guid>
      <dc:creator>LNail</dc:creator>
      <dc:date>2023-11-21T16:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to check for updated deal ID</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-check-for-updated-deal-ID/m-p/883003#M69235</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/583833"&gt;@LNail&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As far as I know you can't filter on the Merged Deal IDs (I haven't tried with the &lt;A href="https://developers.hubspot.com/docs/api/crm/search" target="_blank" rel="noopener"&gt;Search API&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What if you took a different approach and added your other system's Deal ID – as a Custom Property – in the HubSpot Deal. Then, even if a Deal is merged you can search the Custom property for the deal you want to update.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would that work?&lt;/P&gt;
&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 01:45:27 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-check-for-updated-deal-ID/m-p/883003#M69235</guid>
      <dc:creator>Mike_Eastwood</dc:creator>
      <dc:date>2023-11-22T01:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to check for updated deal ID</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-check-for-updated-deal-ID/m-p/883277#M69254</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/9259"&gt;@Mike_Eastwood&lt;/a&gt;&amp;nbsp;that's a great idea but I'm not sure how it would work considering my current circumstance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already use the Search API and have a secondary issue where I can't seem to return any property that isn't already &lt;A href="https://developers.hubspot.com/docs/api/crm/search#crm-objects" target="_blank" rel="noopener"&gt;returned by default&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.hubspot.com/docs/api/crm/search#specify-returned-properties" target="_blank" rel="noopener"&gt;Specifying the properties&lt;/A&gt; I want returned, i.e. "hs_merged_ids", results in only three properties being returned.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;$response = $this-&amp;gt;request-&amp;gt;post(
            "/crm/v3/objects/deals/search",
            [
                "filterGroups" =&amp;gt; [
                    [
                        "filters" =&amp;gt; [
                            [
                                "value" =&amp;gt; $id,
                                "propertyName" =&amp;gt; "hs_object_id",
                                "operator" =&amp;gt; "EQ"
                            ]
                        ],
                    ],
                ],
                // 'properties' =&amp;gt; [ // doesn't work
                //     'hs_merged_ids'
                // ],
                "limit" =&amp;gt; '1',
                "after" =&amp;gt; '0'
            ]
        );&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without the properties attribute:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;[ // Response when not including properties attribute
    [
      "id" =&amp;gt; "xxxxxxxxxxxx",
      "properties" =&amp;gt; [
        "amount" =&amp;gt; null,
        "closedate" =&amp;gt; null,
        "createdate" =&amp;gt; "2023-06-02T20:10:12.421Z",
        "dealname" =&amp;gt; "xxxxxxxxxxxxxxxx",
        "dealstage" =&amp;gt; null,
        "hs_lastmodifieddate" =&amp;gt; "2023-11-21T21:04:44.734Z",
        "hs_object_id" =&amp;gt; "xxxxxxxxxxxxxxxx",
        "pipeline" =&amp;gt; null,
      ],
      "createdAt" =&amp;gt; "2023-06-02T20:10:12.421Z",
      "updatedAt" =&amp;gt; "2023-11-21T21:04:44.734Z",
      "archived" =&amp;gt; false,
    ],
  ]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the properties attribute (shown commented out in first set of code):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[ // Response when including properties attribute
    [
      "id" =&amp;gt; "xxxxxxxxxxxxxxxx",
      "properties" =&amp;gt; [
        "createdate" =&amp;gt; "2023-06-02T20:10:12.421Z",
        "hs_lastmodifieddate" =&amp;gt; "2023-11-21T21:04:44.734Z",
        "hs_object_id" =&amp;gt; "xxxxxxxxxxxxxxxx",
      ],
      "createdAt" =&amp;gt; "2023-06-02T20:10:12.421Z",
      "updatedAt" =&amp;gt; "2023-11-21T21:04:44.734Z",
      "archived" =&amp;gt; false,
    ],
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above responses are on the new ID assigned to two recently-merged deals. Searching for the old id's of the merged deals returns null on the Search API.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/9259"&gt;@Mike_Eastwood&lt;/a&gt;&amp;nbsp;any suggestions?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 14:30:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-check-for-updated-deal-ID/m-p/883277#M69254</guid>
      <dc:creator>LNail</dc:creator>
      <dc:date>2023-11-22T14:30:17Z</dc:date>
    </item>
  </channel>
</rss>

