<?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: Crash web hooks in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Crash-web-hooks/m-p/808668#M64997</link>
    <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/569493"&gt;@VVarelaAlzate&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Thanks for your post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You've highlighted an interesting challenge with webhooks. Webhook delivery order can't be guaranteed due to the asynchronous nature of webhooks and network latency.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are a couple of strategies you can consider:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P&gt;Implement a retry mechanism in your webhook listener. If a webhook arrives referencing a ticket that doesn't yet exist in your database, you can queue it for a retry after a short delay&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Try a Two-Step Process. First, only create the ticket. Once the ticket creation webhook has been processed and the ticket is stored in your database, then you can update the ticket to associate it with the contact. This should ensure that the ticket exists in your database before the association webhook arrives&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;If an association webhook arrives and the ticket doesn't exist in your database, you could use the HubSpot Ticket API endpoints to fetch the ticket directly from HubSpot&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Have fun building! — Jaycee&lt;/P&gt;</description>
    <pubDate>Fri, 16 Jun 2023 23:05:46 GMT</pubDate>
    <dc:creator>Jaycee_Lewis</dc:creator>
    <dc:date>2023-06-16T23:05:46Z</dc:date>
    <item>
      <title>Crash web hooks</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Crash-web-hooks/m-p/807899#M64931</link>
      <description>&lt;P&gt;Hy everyone&lt;/P&gt;&lt;P&gt;Is that I have a developer account in which I implement webhooks for the creation and manipulation of contacts and tickets. This with the objective of receiving them in an internal database and keep and update the information. But I noticed a detail when creating the ticket, when a ticket is created and a contact is associated to it (in the same creation) there are occasions in which the webhook of association arrives first before the one of creation, for the same reason it is not associating in data base since when the one of association arrives because the ticket to which the contact is associated does not exist.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 14:48:26 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Crash-web-hooks/m-p/807899#M64931</guid>
      <dc:creator>VVarelaAlzate</dc:creator>
      <dc:date>2023-06-15T14:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Crash web hooks</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Crash-web-hooks/m-p/808668#M64997</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/569493"&gt;@VVarelaAlzate&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Thanks for your post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You've highlighted an interesting challenge with webhooks. Webhook delivery order can't be guaranteed due to the asynchronous nature of webhooks and network latency.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are a couple of strategies you can consider:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P&gt;Implement a retry mechanism in your webhook listener. If a webhook arrives referencing a ticket that doesn't yet exist in your database, you can queue it for a retry after a short delay&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Try a Two-Step Process. First, only create the ticket. Once the ticket creation webhook has been processed and the ticket is stored in your database, then you can update the ticket to associate it with the contact. This should ensure that the ticket exists in your database before the association webhook arrives&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;If an association webhook arrives and the ticket doesn't exist in your database, you could use the HubSpot Ticket API endpoints to fetch the ticket directly from HubSpot&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Have fun building! — Jaycee&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 23:05:46 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Crash-web-hooks/m-p/808668#M64997</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-06-16T23:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Crash web hooks</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Crash-web-hooks/m-p/809182#M65026</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074"&gt;@Jaycee_Lewis&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I did was that when the ticket creation webhook arrives, before saving it in the database call the ticket api to see if it had an associated contact and save it in the ticket record.&lt;/P&gt;&lt;P&gt;Thank you very much for the help!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 17:30:06 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Crash-web-hooks/m-p/809182#M65026</guid>
      <dc:creator>VVarelaAlzate</dc:creator>
      <dc:date>2023-06-19T17:30:06Z</dc:date>
    </item>
  </channel>
</rss>

