APIs & Integrations

udayapitchika
Member | Diamond Partner
Member | Diamond Partner

Cannot delete and re-sync the same contact/deal

Hi Team,

I have a couple of questions and a comment.

I'll first start with the comment :

  1. If I delete a contact or a deal created using eComm bridge API, I'm not able to re-sync the same entity unless I change the integratorObjectId. It seems "technically" correct but not a great experience for developers. We should be able to send the same sync-message to recreate a deleted contact/deal.

Question on line item sync :
2. Currently we are experiencing issues with associate line items to a deal. Even though we send a sync-message to associate line items, we are not able to see them on the deal record in HubSpot. This is for portal ID : 672818

    [
       {
          "integratorObjectId": "LL21052018309",
          "action": "UPSERT",
          "changeOccurredTimestamp": 1526898273,
          "propertyNameToValues": {
          "deal_id": "o21052018335",
          "quantity": "2",
          "product_id": "P21052018334"
          }
       }
    ]

This feature was working last week, we are currently investigating this issue on our end. Do you know if there are any known issues around line items sync ?

Question on sync message validation :
3. Say, the property mappings for my contact/deal is as below

      "contactSyncSettings": {
        "properties": [
          {
            "propertyName": "field1",
            "dataType": "STRING",
            "targetHubspotProperty": "name"
          },
          {
            "propertyName": "field2",
            "dataType": "DATE",
            "targetHubspotProperty": "contacted_date"
          },
          {
            "propertyName": "field3",
            "dataType": "STRING",
            "targetHubspotProperty": "city"
          }
        ]
      }

What happens if I send a sync-message as below

   "propertyNameToValues": {
      "field1": "Udaya",
      "field2": "some text instead of date",
      "field3": "more text",
    } 

Should this message be rejected as soon as I do a PUT request to /sync-messages endpoint ?

0 Upvotes
1 Reply 1
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Cannot delete and re-sync the same contact/deal

Hi @udayapitchika,

Thanks for your patience here. I'll try to address your questions separately, and in order:

  1. You're correct that this is the expected behavior. The idea is that if a user deletes an object in HubSpot, they aren't going to want it to be re-synced and re-created in HubSpot. While I can definitely understand how this can be tricky when developing, we decided to keep the behavior since that's how the sync functions "in the wild".
  2. After checking out your portal, I saw a few sync errors that seemed related but none with the specific object IDs in your example. I can jump in and take another look if you had some specific examples; could you give me the internal HubSpot deal ID and product ID of some example records?
  3. The message won't be rejected immediately. Instead, you'll see a sync error related to that request. The sync pipeline intentionally produces sync errors instead of validating immediately for efficiency reasons.
0 Upvotes