Integration / page popup directly by using phone number / UUID of client

Originally posted by Bilal Muhammad

Hi Team,
We are running telephone business and our client require integration of your CRM with phone system.
My question is is there a way to open a client / company page directly from phone number / UUID

Thanks,

Hi Bilal,

If you already have a Job UUID, you can send users straight to that job in ServiceM8 (web) using https://go.servicem8.com/openjob/{uuid}.

If you just need to bring the user back into the ServiceM8 iOS app, you can use https://go.servicem8.com/app/launch.

For phone-number based matching, you can query Company Contacts (companycontact) and filter on the phone/mobile fields, then use the returned company_uuid to identify the client.

Once you have the company UUID, you can retrieve the client record via /company/{uuid}.json.

We don’t currently provide a go.servicem8.com/opencompany or go.servicem8.com/openclient redirect endpoint (both URLs return “404 Page Not Found”), so there isn’t an equivalent “open client by UUID” deep link like openjob.

Thanks,
Cody

Keen to know if this is in the roadmap, as I’m also developing a telephony integration. My clients would like to be able to display the caller’s details on receiving a call.

Hi Richard,

If your clients are on iPhone, ServiceM8’s Caller ID feature can automatically identify incoming calls from clients and display the client details on the phone. Setup instructions are in the Caller ID guide: https://support.servicem8.com/hc/en-us/articles/360000929695-How-do-I-set-up-Caller-ID-with-ServiceM8. If anything looks mismatched, make sure ServiceM8 Caller ID is enabled on the iPhone (Settings > Phone > Call Blocking & Identification), and note changes may take up to 24 hours to reflect.

If you’re building a third-party telephony integration and want to pop your own caller-details screen, you can match the inbound number against Company Contacts via GET /companycontact.json. Filtering uses the $filter syntax GET /api_1.0/{resource}.json?$filter={field} {operator} {value}. Because the API filter only supports and (no or), you’d typically run separate lookups for phone and mobile values. Once you’ve got the company_uuid from the matching Company Contact, you can fetch the client via GET /company/{uuid}.json.

For handing off into ServiceM8 itself, our developer docs describe https://go.servicem8.com/app/launch (to return to the iOS app) and https://go.servicem8.com/openjob/{uuid} (to open a job in the browser). When openjob/{uuid} is opened in a browser where the user is already logged in, it takes them straight to that job’s details page. If your clients use ServiceM8 Phone, it also matches the inbound caller’s number against contacts in current Quotes and Work Orders to determine which job the call should be attached to.

Reply here with whether you need to open a job in ServiceM8 or just display the caller details in your telephony UI, and we’ll align the best approach.

Thanks,
Cody

Hi Cody, thanks heaps for your response! I’ve got contact and client lookups working and displaying in our UI, and can also automatically add a note to the client with calling details.

The client for our PBX can open a URL automatically when a call is answered. While I could design a flow that checks for open jobs for the company that the caller is a contact of, it would likely be more powerful to open the client details and display all open jobs for that client. I understand that this is not possible right now.

Hi Richard,

You’re right that, based on what we currently document, the supported web deep link is job-based (via https://go.servicem8.com/openjob/{uuid}), rather than a client/company “open by UUID” link.

If your PBX can only open a URL, the usual workaround is to pick the “best” current job for that company (for example, an active Work Order) via the Jobs endpoint and filtering, then send the user into ServiceM8 using https://go.servicem8.com/openjob/{job_uuid}. For example, you can filter jobs by company_uuid, status, and active using the documented $filter syntax.

Because the API filter only supports and (no or/grouping), if you want to consider both Quotes and Work Orders you’d typically do separate requests (or pick one status as the priority for the pop).

If you’re doing this on iPhone and just need to bring the user back into the ServiceM8 iOS app, https://go.servicem8.com/app/launch is the documented universal link for that.

Reply here with which job status you want to prioritise for the pop (Quote vs Work Order) when a client has multiple active jobs.

Thanks,
Cody