add_filter('salesking_assign_automatically_agent_id', function($agent_id){ $agent_id = 1234; // assign agent here. return $agent_id; }, 10, 1);