QuickBooks Online sync error: Error; Invalid entity data. name: Maximum length cannot be greater than 40 characters

Why the sync error occurs

This error occurs when a location in Bill.com is trying to sync to QuickBooks Online, but the location name is greater than 40 characters. QuickBooks Online has a location name limit of 40 characters.

How to fix the sync error

Update the location name in Bill.com to 40 or fewer characters, and sync.