source-intercom-native: new connector #2204
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This is a new native connector for Intercom.
A few quirks I ran into when developing the connector:
/companies/scroll
returns all companies, but only a single "scroll" can be ongoing at a time./companies/list
returns at max 10,000 companies without a limit to how many "lists" can be ongoing. Due to the restrictions with/companies/scroll
that would require coordination around which stream is using a "scroll" (and the potential for some other application using a "scroll" that's not the connector), I chose to use/companies/list
. We've also yet to see a use case with >100 companies. We can re-evaluate this decision if we come across users that have 10,000+ companies in their Intercom account.contacts
andconversations
have a similar/search
endpoint, the filtering granularity between them is different./conversations/search
endpoint filters results by datetime (i.e. down to the second). The connector requests and processes results in ascending order since the first result will always be an updated record we haven't seen yet./contacts/search
endpoint filters results by date (i.e. down to the day). This means that if sorted in ascending order, the first page(s) of results will almost always contain records we've already seen. To minimize the number of API requests and immediately get any updated results, thecontacts
stream requests results in descending order.updated_at
fields. The connector processesconversation_parts
in date_windows since theconversation.updated_at
field is the latestconversation_part.updated_at
. We don't want to miss parts that were updated after the date window's start and aren't the most recent conversation part. For example, this is a validconversation
object:Note: The
updated_at
fields were left asint
timestamps instead of converting them toAwareDatetime
s. There are multiple otherint
timestamp fields in Intercom resources, so I leftupdated_at
alone so it would align with all the other timestamp fields Intercom populates.Workflow steps:
(How does one use this feature, and how has it changed)
Documentation links affected:
Documentation should be created/updated for the new connector.
Notes for reviewers:
Tested on a local stack. Confirmed:
conversation_parts
is difficult to verify without manually sending tons of API requests).conversation_parts
stream does not check every conversation in the user's Intercom account for updated parts (an issue we're seeing with the ATF connector). It only checks updated conversations for updated conversation parts, speeding the stream up significantly.Any users that want to use this new native Intercom connector instead of the existing ATF connector will need to create a new task & collections.
This change is