Make interaction between multisites Well look I have a multisite.

The main site that uses the sites/all folder for its modules and libreries
and another subdomain that uses sites/subdomain for its modules, themes, etc...

they are in separate databases but share the same drupal instance

In the main site I have an inventory app for a local store they manage their inventory and their invoices there.

In the subdomain I did a ecommerce store so they will sell their products through that subdomain, I need that when an user buys a product in the ecommerce store ten automatically I need that purchase to be registered in the inventory that is in the other site.

How to do this connection betweed the 2 sites in a multisite config?

Thanks for your help
The "standard" way of creating multiple sites with some interaction between them using Drupal is to use the Domain Access module rather than multisites.

However, there is great write-up about using interacting multisites at Drupal Redesign: Domain Access vs. Multisite.

The gist of it is that you set up a multi-site as you normally do. Then you create a custom module to take care of interaction and sharing data between the sites.

Drupal can handle multiple databases, but you can avoid the complexity of managing multiple databases by using a single database and use a database table prefix to avoid namespace collisions.  If you already have created the databases as separate databases, you need to use hook_update_N (or SQL operations outside of Drupal) to refactor the schemas.