scenario: a customer shops and creates an e-commerce order. there is a customer db table, and a shipping table. a customer can have more then shipping address. if the customer logs in to do another order, the shipping address(es) are pulled from the shipping table based on customer id.
the shipment is boxed, the store admin orders a shipping label and the address is sent to be "verified". when the shipping address is Verified, a new version of the shipping address is returned. There are 4 possibilities here:
1) there is no change at all to the Verified address except the letters might have been changed to upper case.
2) there is some slight change to the Verified address that doesn't affect the original version. maybe Ave was added to a street name field or a 5 digit zip code is updated to the 9 digit version.
3) the original submitted shipping address had a minor error - but the Verification was able to correct it. for example the zip code had a wrong digit.
4) the original submitted address has a major error that cannot be resolved by the Verification. either it can be figured out by the admin and resubmitted or the customer must be contacted.
so the questions are:
A) do we always update shipping tables with the (new) Verified address?
B) or do we do some kind of check and compare the original and verified to see if there is a change and then only update if the address has been changed?
C) or should we update the address AND keep a backup copy of the original address?
choice A seems like the simplest but am curious how people are dealing with this. note that this is probably most relevant for shipping with USPS postal in terms of the rigor of their verification.
====== edit
validating the shipping to address when the customer enters it in is obviously the most optimal but e-commerce merchants can get orders from different "channels" that the merchant has no control over. so validation at the time of creating the shipping label is still required.