handle automatic persistence of customer id