This is not strictly about the API, however I am using the API to work with referrals and have run into a problem.
I have setup a system to sync referral records in infusionsoft to our website’s database so we can do something with the data then upload changes to the contact or trigger campaigns based on the referrals. The syncing works well and updating / triggering works well enough. However I have discovered 2 things when it comes to referrals.
When a contact with referrals is deduplicated in infusionsoft, infusionsoft DOES change the referral’s contact id to match the deduplicated contact. This is good, however your syncing needs to take this into account in that you have to make sure you update those referral records, otherwise you get errors later if updating or triggering something based on the contact id because the old contact id no longer exists.
When a contact with referrals is deleted in infusionsoft, infusionsoft DOES NOT delete the referrals, which is a huge problem as you run into the problem from 1, that you may try to preform an action on a contact id that no longer exists.
I am able to handle when the error happens with a try/catch, however this error will re-occur ever time you do anything that involves those referrals.
Is this expected behavior in that infusionsoft is not deleting the referrals when a contact is deleted (regardless of the method)? Unfortunately the API does not allow us to remove or update referrals via the api, you can only read and add.