Yes, the automation works like this:
During normal daily operation, the water is pumped from the pool, and returned to the pool and spa, with the spa spilling into the pool.
During spa operation (only when it's in use) the water is pumped from and returned to the spa only. Automated 3-way valves...