Open url in background

My app has a relatively complex method of communicating with Filemaker: The app sends an AppleScript which executes a Filemaker script. The Filemaker script is done async so that I needed a method to signal back to my app. I used to send a raw AppleEvent back to my app which somehow broke. As alternative solution I have made an url handler so that Filemaker opens an url which gets caught by my app. This has the unfortunate side effect that my app always comes to the foreground and I can’t do anything else while my app is working.

Can I open an url in the background? And this needs to be done in Filemaker. Or is there a better method for Filemaker to signal that the data import is finished? I also need the id of the imported record.

Can you tell your app to go to the background once triggered? Not a permanent fix, but just for now…

This might have worked when the import was slower. Nowadays, data is imported really fast and the UpenURL is done really often.