So if you want to sync Sage Line 50 and Trackvia, you essentially have to set up database replication between these two stores. Essentially what this means is that you're going to have to determine one as a master db and another as a slave. The reason you want to do this is to maintain coherence of your data between your two different stores. The links I provided define what the concept of replication is, however implementing replication in your case is going to require creating a little bit of middleware because no current software exists to create a replication between two different stores.
As explained in the articles, your middleware is going to have to ensure that you write to your slave database (you could choose which one this is) and that you have implemented software that will keep this in sync with your master. Essentially what you will be doing is making sure your CRUD operations are maintaing consistency throughout your data store.
Please let me know if you have any questions!