Consider the scenario when a new order comes in and a duplicate is accidentally created. The order is processed with a new id number which is stored as the contact_id. Then, it is discovered it is a duplicated and the contacts are merged into the older (existing) contact. The contact_id in the squarespace order table is currently not updated.
It would probably be good to define the relationship between contacts and squarespace orders. When merging, the contact_id field should be updated so as not to leave the Squarespace order with an abandoned contact. We could also add a database health check to make sure there are no abandoned squarespace orders.
Consider the scenario when a new order comes in and a duplicate is accidentally created. The order is processed with a new id number which is stored as the contact_id. Then, it is discovered it is a duplicated and the contacts are merged into the older (existing) contact. The contact_id in the squarespace order table is currently not updated.
It would probably be good to define the relationship between contacts and squarespace orders. When merging, the contact_id field should be updated so as not to leave the Squarespace order with an abandoned contact. We could also add a database health check to make sure there are no abandoned squarespace orders.