One of our customers wanted to be able to set the Xero Sales account to be used per customer and per product. You can only send one sales account code to Xero, so the logic is that if there is a sales code specified for a product, then that code is used. Otherwise, if there is a sales code specified for a customer, then that is used and finally if neither are specified, then use the default sales account code which is 200.
This allows my customer to track within Xero how much money they earn from long-term customers and also allows them to track total earned for some fixed-price services they offer.
So int their WordPress installation I added a “Xero Account Code” field under the user account (where customers are captured) and a similar field under the WooCommerce Products. Then, whenever an invoice is sent to Xero, I check whether the sales code needs to be changed for each line based on these fields and voila.
Just a biref example of how WordPress can be customised to make your life easier and give you further insight into your business.