You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to obtain all Contacts on Phone number?

Accepted answer
edited Jun 8, 2022 12:05PM in General Technical Discussions 6 comments


Hi Experts,

I am trying count of Unique Contacts who match a phone number. For eg: Assume that Contact A has phone_office = <ph_num>, Contact B has phone_home = <ph_num> and Contact C has phone_mobile = <ph_num>. So 3 contacts has same phone number but different Phone types.

So, when I run a ROQL - I get 1,1,1,0 but expected result is 3. Here is my ROQL: SELECT Count(Contact.ID) FROM Contact WHERE (Phones.Number = '<ph_num>') and Phones.PhoneType IN (1,2,3,4).

This is for CTI to match a Contact against a Phone number, I know this can be done by reports by unfortunately infrastructure of CTI vendor doesn't allow the query of report again as Customer is already into IVR and querying info might delay loading time of Workspace for Agent.

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!