<?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: Hubspot Addon - to many request based on form submission in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Hubspot-Addon-to-many-request-based-on-form-submission/m-p/359675#M35369</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/66274"&gt;@WendyGoh&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the reply!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry if I was not clear on my post. Let's clarify:&lt;/P&gt;&lt;P&gt;1. Observing the "Monitor" tool at the Hubspot app interface, I'm receiving only the 3 requests. In theory, it's the expected result when a new contact is created. Considering that the two others properties of the scope has been fullfill by the user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Observing again my app, I'm realising that, in some cases, a "race condition" may happening. I need to fix this!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the main reason that I'm posting here is that, every test that I made creating new contacts, clicking only once on the submit button, the result in Hubspot was the expected one. But every new contact created by clicking more than once on the submit button, duplicates or triplicates the associanted deal. Dispite the fact that the monitor tool always shows only the 3 requests.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. There are layers that determine when create or update the deal. This application in specific doesn't have a data base to store the Hubspot data. I'll try to synthetize the process:&lt;/P&gt;&lt;P&gt;a) For each index of the Hubspot request array, the app gets the "objectId" and consume the Hubspot API (V3) to get the contact information, using the method "Read".&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;b) If the contact exists, the app checks if the properties that is need exists. If exists, the process goes on, otherwise returns false.&lt;/P&gt;&lt;P&gt;c) If the conditions is satisfied, the API is consumed again, to check if there a deal associated with this contact object.&lt;/P&gt;&lt;P&gt;d) If the contact doesn't have any associeted deal object, the API is consumed again to create a new deal object,&amp;nbsp; and than consumed again to associate this new deal to the contact.&lt;/P&gt;&lt;P&gt;e) If there is already a deal or deals associated, the API is consumed again to get every deal informations, from the associated deal or deals.&lt;/P&gt;&lt;P&gt;f) The app checks if any of those deals matches&amp;nbsp;with the requested data. If match, the deal is updated, otherwise a new deal is created.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is how the plugin works. I don't know if I'm doing something wrong, but that's how I managed to make it work.&lt;/P&gt;&lt;P&gt;I hope it clarifies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Aug 2020 14:55:47 GMT</pubDate>
    <dc:creator>hilton22</dc:creator>
    <dc:date>2020-08-05T14:55:47Z</dc:date>
  </channel>
</rss>

