Added getNewKey logic to inserts of Customer and Contact on the device