<@U04S8PLJWMT> I am syncing Intercom with Airbyte,...
# ask-ai
r
@kapa.ai I am syncing Intercom with Airbyte, for the streams conversations and conversation parts. One attempt failed. Does the next attempt start from where the previous sync left off? Or does it start again from scratch?
k
When syncing Intercom streams (such as conversations and conversation_parts) with Airbyte, if a sync attempt fails, Airbyte is designed to resume from where the previous sync left off, not start from scratch. This is achieved through Airbyte’s resumability and checkpointing mechanisms. Airbyte checkpoints the sync’s progress and, upon failure, will retry and continue from the last successful checkpoint, ensuring that already committed records are not re-synced unnecessarily. However, due to Airbyte’s “at-least-once” delivery guarantee, some records may be delivered more than once if the failure occurs between checkpoints, so deduplication on the destination side is recommended if unique records are required. Specifically, Airbyte only advances the sync state when both the source has emitted the record and the destination has confirmed it was committed. If a failure happens before the destination confirms, those records will be resent in the next attempt. This applies to all sync modes, including incremental and full refresh. The sync does not start from scratch unless no records were committed before the failure. For more details, see the explanation of state and checkpointing in the Airbyte protocol documentation [State & the Whole Sync](https://docs.airbyte.com/platform/understanding-airbyte/airbyte-protocol#state--the-whole-sync) and the section on [Resumability](https://docs.airbyte.com/platform/understanding-airbyte/resumability). However, please note that there have been some specific issues reported with the Intercom connector, particularly around state management between parent (conversations) and child (conversation_parts) streams. If you are experiencing missing data or inconsistent syncs, it may be related to these known issues, and a full refresh of the affected stream may be required as a temporary workaround [[source-intercom] Missing parts in conversation_parts sync](https://github.com/airbytehq/airbyte/issues/39463).
r
@kapa.ai So when Airbyte says "1,715,083 loaded", that means 1,715,083 records have been committed to the destination?
k
A message from kapa.ai
Yes, when Airbyte shows "1,715,083 loaded," it means that 1,715,083 records have been confirmed as received and committed by the destination. The "loaded" count specifically refers to the number of records the destination has acknowledged as successfully written, not just extracted from the source. This distinction is important because Airbyte only advances the sync state after the destination confirms the records are committed, ensuring data integrity even in the event of failures or retries [Review the Connection Timeline](https://docs.airbyte.com/platform/cloud/managing-airbyte-cloud/review-connection-timeline#syncs-refreshes-and-clears).
r
@kapa.ai The sync keeps failing, and more conversation_parts records are being loaded than expected. As I understand it, the conversation_parts stream is a child stream of conversations. Could this mean that records are being reloaded on subsequent attempts?
k
A message from kapa.ai
Yes, if your sync is failing and you are seeing more conversation_parts records being loaded than expected, it is likely that records are being reloaded on subsequent attempts. This behavior is consistent with how Airbyte handles partial failures: when a sync fails, some records may have already been committed to the destination, but the sync state is only advanced after both the source emits and the destination confirms the records. If a failure occurs before the state is checkpointed, Airbyte will resend those records in the next attempt, which can result in duplicate records being loaded in the destination [Failed attempts leading to duplicates](https://discuss.airbyte.io/t/744). This is especially relevant for parent-child stream relationships like conversations and conversation_parts. There have been reports that, in some cases, the state management between these streams can lead to missing or duplicated records if the sync fails or if there are issues with how the state is handled between parent and child streams [[source-intercom] Missing parts in conversation_parts sync](https://github.com/airbytehq/airbyte/issues/39463). To mitigate this, it is recommended to use deduplication strategies in your destination or to use Airbyte's "Incremental Deduped" sync mode if available. If you continue to see unexpected duplicates or missing records, you may need to perform a full refresh or review your sync configuration.
r
@kapa.ai For one of the failed attempts I got this error: Exception while syncing stream conversation_parts: cannot access local variable 'headers' where it is not associated with a value What does this mean?
k
A message from kapa.ai
I'm sorry, but the knowledge sources provided do not contain specific information about the error message: > Exception while syncing stream conversation_parts: cannot access local variable 'headers' where it is not associated with a value This error appears to be a Python-related issue, possibly indicating that the variable
headers
was referenced before it was properly initialized in the connector code. However, there is no explicit mention or discussion of this exact error in the available Airbyte documentation or GitHub issues related to the Intercom connector. If this error persists, it may be helpful to open a new issue on the Airbyte GitHub repository with detailed logs for further investigation.