From 67213ed7454b0ed818ce7492413a08431b1b5649 Mon Sep 17 00:00:00 2001 From: Courtney Garcia <97773072+courtneyga@users.noreply.github.com> Date: Mon, 18 Mar 2024 10:33:54 -0500 Subject: [PATCH 1/4] Update index.md --- .../destinations/catalog/actions-hubspot-cloud/index.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/connections/destinations/catalog/actions-hubspot-cloud/index.md b/src/connections/destinations/catalog/actions-hubspot-cloud/index.md index 8571b21895..030282040c 100644 --- a/src/connections/destinations/catalog/actions-hubspot-cloud/index.md +++ b/src/connections/destinations/catalog/actions-hubspot-cloud/index.md @@ -67,6 +67,9 @@ Association Label | Select an association label between both the object types. F ## FAQ and troubleshooting +### Why am I receiving a, "Contact already exists" error? +Based on the logic in the Upsert Contact action, an attempt is first made to update an existing contact, if a contact is not found, then another attempt will be made to create the contact. This may result in three requests being made to the HubSpot API. For exmaple, the Expired Authentication error, is because the token was expired on the first request, we refreshed the token and then made the request again. The next error message may say, "resource not found". On this request, the contact was not found, so we then proceeded with the second request to attempt to create the contact. This final request failed because of a `Conflict` error stating that the contact already exists. Since there is another mapping that is triggered, by the time the Upsert Contact Action gets to the final request to create the contact, the contact has already been created as a result of the Custom Behavioral Event Action being triggered as well. And thus, the Error gets surfaced in the event delivery tab in Segment's UI. + ### How do I send other standard objects to HubSpot? Segment provides prebuilt mappings for contacts and companies. If there are other standard objects you would like to create records in, please use the **Create Custom Object Record** action. For example, to create a deal in HubSpot, add a mapping for Create Custom Object Record, set up your Event Trigger criteria, and input a literal string of "deals" as the Object Type. You can use the Properties object to add fields that are in the [deals object](https://developers.hubspot.com/docs/api/crm/deals){:target="_blank"}, such as `dealname` and `dealstage`. The same can be done with other object types (for example, tickets, quotes, etc). Ending fields that are to go to HubSpot outside of the properties object isn't supported. This includes sending [associations](https://developers.hubspot.com/docs/api/crm/associations){:target="_blank"}. Please note, Segment only supports creating new records in these cases; updates to existing records are only supported for contacts and companies. From fb45031a40eefc1a103c5e2fd6959c067f6ca92e Mon Sep 17 00:00:00 2001 From: Courtney Garcia <97773072+courtneyga@users.noreply.github.com> Date: Sat, 6 Apr 2024 21:00:07 -0500 Subject: [PATCH 2/4] Update index.md --- .../destinations/catalog/actions-hubspot-cloud/index.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/connections/destinations/catalog/actions-hubspot-cloud/index.md b/src/connections/destinations/catalog/actions-hubspot-cloud/index.md index 030282040c..bbc6210896 100644 --- a/src/connections/destinations/catalog/actions-hubspot-cloud/index.md +++ b/src/connections/destinations/catalog/actions-hubspot-cloud/index.md @@ -68,7 +68,11 @@ Association Label | Select an association label between both the object types. F ## FAQ and troubleshooting ### Why am I receiving a, "Contact already exists" error? -Based on the logic in the Upsert Contact action, an attempt is first made to update an existing contact, if a contact is not found, then another attempt will be made to create the contact. This may result in three requests being made to the HubSpot API. For exmaple, the Expired Authentication error, is because the token was expired on the first request, we refreshed the token and then made the request again. The next error message may say, "resource not found". On this request, the contact was not found, so we then proceeded with the second request to attempt to create the contact. This final request failed because of a `Conflict` error stating that the contact already exists. Since there is another mapping that is triggered, by the time the Upsert Contact Action gets to the final request to create the contact, the contact has already been created as a result of the Custom Behavioral Event Action being triggered as well. And thus, the Error gets surfaced in the event delivery tab in Segment's UI. +This will only apply to integrations with two mappings that could create profiles in HubSpot. +1. Initially, the Upsert Contact action seeks to update an existing contact. +2. If no contact is found, a subsequent attempt is made to create a new contact, potentially leading to three separate HubSpot API requests. For instance, an 'Expired Authentication' error may occur if the token expires on the initial request, prompting a token refresh and a subsequent request. +3. If the next error indicates 'resource not found', it means the contact wasn't located, leading to a second attempt to create the contact. However, this attempt might fail due to a 'Conflict' error, suggesting the contact already exists. This situation can arise if another mapping is activated, causing the contact to be created by the time the Upsert Contact Action attempts its final contact creation request, due to the Custom Behavioral Event Action being triggered as well. +Consequently, this error is displayed in the event delivery tab within Segment's UI. ### How do I send other standard objects to HubSpot? Segment provides prebuilt mappings for contacts and companies. If there are other standard objects you would like to create records in, please use the **Create Custom Object Record** action. For example, to create a deal in HubSpot, add a mapping for Create Custom Object Record, set up your Event Trigger criteria, and input a literal string of "deals" as the Object Type. You can use the Properties object to add fields that are in the [deals object](https://developers.hubspot.com/docs/api/crm/deals){:target="_blank"}, such as `dealname` and `dealstage`. The same can be done with other object types (for example, tickets, quotes, etc). Ending fields that are to go to HubSpot outside of the properties object isn't supported. This includes sending [associations](https://developers.hubspot.com/docs/api/crm/associations){:target="_blank"}. Please note, Segment only supports creating new records in these cases; updates to existing records are only supported for contacts and companies. From 971acdb1f6cfd1bd86ef2b3045ca0fff823c44a4 Mon Sep 17 00:00:00 2001 From: stayseesong <83784848+stayseesong@users.noreply.github.com> Date: Mon, 2 Dec 2024 10:57:01 -0800 Subject: [PATCH 3/4] Apply suggestions from code review --- .../catalog/actions-hubspot-cloud/index.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/connections/destinations/catalog/actions-hubspot-cloud/index.md b/src/connections/destinations/catalog/actions-hubspot-cloud/index.md index bbc6210896..80dbaf05df 100644 --- a/src/connections/destinations/catalog/actions-hubspot-cloud/index.md +++ b/src/connections/destinations/catalog/actions-hubspot-cloud/index.md @@ -65,14 +65,10 @@ Search Fields to associate | This finds a unique record of custom object based ObjectType to associate | To associate the newly created and updated custom object record with another object type, select the object type you want it to be associated with. Association Label | Select an association label between both the object types. From the HubSpot Dashboard, you can create associations between any type of object. To create an association label:
1. Log in to the [HubSpot Dashboard](https://app.hubspot.com/){:target="_blank"}.
2. Go to **Data Management > Objects > Custom Objects**.
3. Go to the **Associations** tab and click **Create association label**. -## FAQ and troubleshooting - -### Why am I receiving a, "Contact already exists" error? -This will only apply to integrations with two mappings that could create profiles in HubSpot. -1. Initially, the Upsert Contact action seeks to update an existing contact. -2. If no contact is found, a subsequent attempt is made to create a new contact, potentially leading to three separate HubSpot API requests. For instance, an 'Expired Authentication' error may occur if the token expires on the initial request, prompting a token refresh and a subsequent request. -3. If the next error indicates 'resource not found', it means the contact wasn't located, leading to a second attempt to create the contact. However, this attempt might fail due to a 'Conflict' error, suggesting the contact already exists. This situation can arise if another mapping is activated, causing the contact to be created by the time the Upsert Contact Action attempts its final contact creation request, due to the Custom Behavioral Event Action being triggered as well. -Consequently, this error is displayed in the event delivery tab within Segment's UI. +## FAQs and troubleshooting + +### Why am I receiving a `Contact already exists` error? +This error only applies to integrations with 2 mappings that can create profiles in HubSpot. Initially, the Upsert Contact action seeks to update an existing contact. If no contact is found, a subsequent attempt is made to create a new contact, potentially leading to 3 separate HubSpot API requests. For example, an `Expired Authentication` error may occur if the token expires on the initial request, prompting a token refresh and a subsequent request. If the next error indicates `resource not found`, it means the contact wasn't located, leading to a second attempt to create the contact. However, this attempt might fail due to a `Conflict` error, suggesting the contact already exists. This situation can arise if another mapping is activated, which causes the contact to be created by the time the Upsert Contact Action attempts its final contact creation request, due to the Custom Behavioral Event Action being triggered as well. ### How do I send other standard objects to HubSpot? Segment provides prebuilt mappings for contacts and companies. If there are other standard objects you would like to create records in, please use the **Create Custom Object Record** action. For example, to create a deal in HubSpot, add a mapping for Create Custom Object Record, set up your Event Trigger criteria, and input a literal string of "deals" as the Object Type. You can use the Properties object to add fields that are in the [deals object](https://developers.hubspot.com/docs/api/crm/deals){:target="_blank"}, such as `dealname` and `dealstage`. The same can be done with other object types (for example, tickets, quotes, etc). Ending fields that are to go to HubSpot outside of the properties object isn't supported. This includes sending [associations](https://developers.hubspot.com/docs/api/crm/associations){:target="_blank"}. Please note, Segment only supports creating new records in these cases; updates to existing records are only supported for contacts and companies. From eae2dde1479610b72524e061ebdcacf6108e6f7b Mon Sep 17 00:00:00 2001 From: stayseesong <83784848+stayseesong@users.noreply.github.com> Date: Mon, 2 Dec 2024 13:20:11 -0800 Subject: [PATCH 4/4] Update src/connections/destinations/catalog/actions-hubspot-cloud/index.md --- .../destinations/catalog/actions-hubspot-cloud/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connections/destinations/catalog/actions-hubspot-cloud/index.md b/src/connections/destinations/catalog/actions-hubspot-cloud/index.md index 80dbaf05df..a12a8dd512 100644 --- a/src/connections/destinations/catalog/actions-hubspot-cloud/index.md +++ b/src/connections/destinations/catalog/actions-hubspot-cloud/index.md @@ -68,7 +68,7 @@ Association Label | Select an association label between both the object types. F ## FAQs and troubleshooting ### Why am I receiving a `Contact already exists` error? -This error only applies to integrations with 2 mappings that can create profiles in HubSpot. Initially, the Upsert Contact action seeks to update an existing contact. If no contact is found, a subsequent attempt is made to create a new contact, potentially leading to 3 separate HubSpot API requests. For example, an `Expired Authentication` error may occur if the token expires on the initial request, prompting a token refresh and a subsequent request. If the next error indicates `resource not found`, it means the contact wasn't located, leading to a second attempt to create the contact. However, this attempt might fail due to a `Conflict` error, suggesting the contact already exists. This situation can arise if another mapping is activated, which causes the contact to be created by the time the Upsert Contact Action attempts its final contact creation request, due to the Custom Behavioral Event Action being triggered as well. +This error only applies to integrations with 2 mappings that can create profiles in HubSpot. Initially, the Upsert Contact action seeks to update an existing contact. If no contact is found, a subsequent attempt is made to create a new contact, potentially leading to 3 separate HubSpot API requests. For example, an `Expired Authentication` error may occur if the token expires on the initial request, prompting a token refresh and a subsequent request. If the next error indicates `resource not found`, it means the contact wasn't located, leading to a second attempt to create the contact. However, this attempt might fail due to a `Conflict` error, suggesting the contact already exists. This situation can arise if you activate another mapping, which causes the contact to be created by the time the Upsert Contact Action attempts its final contact creation request, due to the Custom Behavioral Event Action being triggered as well. ### How do I send other standard objects to HubSpot? Segment provides prebuilt mappings for contacts and companies. If there are other standard objects you would like to create records in, please use the **Create Custom Object Record** action. For example, to create a deal in HubSpot, add a mapping for Create Custom Object Record, set up your Event Trigger criteria, and input a literal string of "deals" as the Object Type. You can use the Properties object to add fields that are in the [deals object](https://developers.hubspot.com/docs/api/crm/deals){:target="_blank"}, such as `dealname` and `dealstage`. The same can be done with other object types (for example, tickets, quotes, etc). Ending fields that are to go to HubSpot outside of the properties object isn't supported. This includes sending [associations](https://developers.hubspot.com/docs/api/crm/associations){:target="_blank"}. Please note, Segment only supports creating new records in these cases; updates to existing records are only supported for contacts and companies.