tap-hubspot icon indicating copy to clipboard operation
tap-hubspot copied to clipboard

Detect contact deletion

Open esetnik opened this issue 7 years ago • 4 comments

For Deals there is an isdeleted flag but for Contacts there doesn't appear to be anything similar. How are we supposed to filter out contacts which have been deleted in Hubspot?

esetnik avatar Feb 15 '18 22:02 esetnik

@esetnik After doing some further research on the HubSpot API it looks like the only way to get information about deleted contacts is via webhooks. Unfortunately, the Singer tap works via polling the REST APIs. I don't see any clear ways to get something like an isdeleted value from the REST APIs.

One solution would be to wipe out the data and periodically do a full resync of contacts. That wouldn't give you an isdeleted flag but would at least eliminate any deleted contacts from the result set.

briansloane avatar Feb 21 '18 02:02 briansloane

@briansloane I figured it wasn't possible. Since you are polling the REST APIs it looks like there's no way to do this unless you had access to the previous run of sync data. I suggest anyone else who would also like to see this feature should leave a comment on this question on Hubspot developer forums.

Additionally after further reviewing the Hubspot REST apis I found that isDeleted for deals is actually not a valid property so it won't work as intended. I suggest that we remove it from the tap to avoid confusion.

 "isDeleted": false,
  // Boolean; Whether or not the record is deleted. In practice this will always be false as deleted records will not appear in the API.

esetnik avatar Feb 23 '18 00:02 esetnik

@briansloane It hate to say it, but this is a major flaw in this tap. I know Hubspot is not making it easy for anyone to work with their api - but we need to figure out a way to get this built it in to this tap.

Does Stitch have some clout with hubspot to figure this out?

wss-chadical avatar Sep 19 '18 18:09 wss-chadical

Anyone ever figure this out?

graydonclark avatar Mar 10 '22 22:03 graydonclark