# $person is an object holding a record with getters for each field. if( record_exists( $person->id() ) ) { log_change( update_record( $person ) ); } else { log_new( add_record( $person ) ); }