# Duplicates Created Because First Request Doesn't Complete Fast Enough

**URL:** <https://community.hubspot.com/t/duplicates-created-because-first-request-doesnt-complete-fast-enough/90598>\
**Category:** APIs & Integrations\
**Tags:** object\
**Created:** [September 27, 2023, 3:10pm UTC](https://community.hubspot.com/t/duplicates-created-because-first-request-doesnt-complete-fast-enough/90598 "2023-09-27T15:10:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eibach-cv](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/eibach-cv/32/52876_2.png) [@eibach-cv](https://community.hubspot.com/u/eibach-cv)\
**Post date:** [September 27, 2023, 3:10pm UTC](https://community.hubspot.com/t/duplicates-created-because-first-request-doesnt-complete-fast-enough/90598/1 "2023-09-27T15:10:22Z")

</div>

Whenever a customer visits the cart and checkout page on our website, I have set up workflows to create or update a deal in HubSpot.

However, there’s a particular scenario that’s causing headaches: when a customer proceeds to checkout very quickly after visiting the cart page, it results in the creation of a duplicate deal. This happens because the first request to create a deal hasn’t completed, and the search API the looks for a deal to decide if it should create one or update one doesn’t find the one created from visiting the cart page, so it creates one.

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [September 28, 2023, 9:56pm UTC](https://community.hubspot.com/t/duplicates-created-because-first-request-doesnt-complete-fast-enough/90598/2 "2023-09-28T21:56:48Z")

</div>

Hi, @eibach-cv 👋 Thanks for the interesting question. It sounds like some form of race condition is happening. Hey @himanshurauthan, have you run into anything similar in your recent projects?

Best,

Jaycee
