Set up tracking category mapping in Xero Integration:
Go to Xero Integration and click on the Setting button
At tracking categories mapping, Click IMPORT to fetch tracking categories into DDL and get all the latest EMERGE kinds (both customer invoice and supplier invoice).
Click SAVE to save the mapping
You can sort by Document and then sorting by Kind name (can be orders name or location of branches)
When exporting customer or supplier invoices to XERO, the invoice with mapped kind will auto-assign tracking category to all item lines