Added referral logic to customer record