It is hit and miss, I added one to one of my tanks and they were sleeping together that night, another pair is still discussing the details a year later after a three week protected courtship.
I got a clear hard plastic q-tip container and drilled some holes. Put it near the established fish with the new comer inside. First case the fish didn't care so I released it, second case I was hoping the plastic was strong enough. After three weeks the fish grew accustomed to the intruder. With an established fish I think the smaller the better, less of a threat. Also, the more likely it is sexually immature or neutral.