arborrow / montserrat

A retreat management application written in Laravel
12 stars 4 forks source link

Person Controller: Merge Duplicate can abandon Squarespace Orders #544

Open arborrow opened 1 year ago

arborrow commented 1 year ago

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.

arborrow commented 1 year ago

Just adding a note that we should also consider the possibility of abandoned gift certificates (purchaser_id or recipient_id).