Integration API: Records Deleted Using Edit Fields to Sync

I’m not sure if I’m not doing something correctly with the Integration API, but wanted to describe this situation that could possibly result in someone losing data unexpectedly.

  • Setup
    • Setup an integration that can sync multiple object types
    • Do not toggle “Do not delete Fibery entities even if they are deleted in ”. In other words, I only want items that exist in the external system.
    • Sync one of the object types
    • Add a field that only exists in fibery on that type called “fibery data”. Add some data to it
    • Click on the integration and choose “Configure”. Add one more of the types to sync
    • The objects then sync and things look ok
    • Click on the integration and choose “Edit Fields to Sync”
    • Hit save without making any changes
  • Issue
    • For me, now it seems to try to do an incremental sync, but seems to treat it as a full sync. All records disappear at this point
    • You can get the records back by forcing a full sync
    • However, any of the data you added to the “fibery data” field has been lost
    • This could be a significant issue if have numerous fields that only exist in fibery

I did try setting synchronizationType="delta" and that seems to avoid losing the data. I’m just not fully following why this was the only action I’ve come across in configuring an existing integration that caused the loss of data (when not using the delta synchronization type).

It seems like I might just need to leverage the “Do not delete Fibery entities even if they are deleted in ” toggle and filtering on the fibery side to exclude the deleted items through a status to be safe.

1 Like

It would be great to see a full, detailed explanation of how Custom Integration Sync works under the hood, including how all the options (and optional things like added Fibery-only fields) could affect sync behavior.

Related: Updating a custom Integration app - what happens to existing and deleted entities? - #2 by Matt_Blais

Yeah, the happy path makes sense based on what is described here. Where things get murky is when you have an existing integration configured and start to make changes. I was surprised that in this scenario adding a new thing to sync caused no problems, but even making no changes on the edit fields to sync dialog caused the loss of data.

I think maybe I’m just not handling that sequence correctly, but it takes digging through logs to infer what is happening.