To do this, edit the file 'customer-redirect.sample.php' by changing the $adminpath variable to your WHMCS admin URL. Then, rename this file to customer-redirect.php.
In Xero, enter the following URL as a custom contact link;
https://www.example.com/whmcs/modules/addons/xero/customer-redirect.php?userid={!CONTACTCODE}