Hi ServiceM8,
I have a phone system and when an operator answers a call, I would like to open a pop up with two buttons - 1st button creates a job with the data from the phone system and the second button to open the client information(if there is a client associated with this phone number or open the Create Client wizard with the data from the phone system).
At the moment, using the ServiceM8 API, I can check if a client exists with this phone number and get its data. Also I can create a job and a client. But I am not able to create this popup asynchronously(when the call is answered). Can you please help me with that?
Thanks in advance for the info.
In ServiceM8’s Add-on SDK, popups (modal windows) are something that get shown when a user clicks an Add-on Action (in a Job/Client card) or an Add-on Menu Item, since those are the supported UI extension points.
Webhook events are triggered by changes to ServiceM8 records, and webhook invocations don’t render any UI (any return value is ignored), so they can’t be used to display an on-screen popup to staff.
Because Add-on SDK events are invoked in response to events that happen in ServiceM8 (webhooks or UI clicks), an external “call answered” event from a third-party phone system can’t asynchronously force a modal to open inside the ServiceM8 UI.
If you’re aiming for the operator to launch your workflow from inside ServiceM8, you can add an Action or Menu Item and have it open either as a popup inside ServiceM8 (location: modal) or open your own web UI in a new browser tab/window (location: window).
Reply here with whether your operators are taking calls in the ServiceM8 web platform or in the mobile app, and whether you want this as a Job Action, Client Action, or Menu Item.