How can I get a list of users who have the same phone number in Zendesk?

536 views Asked by At

I have a setup for Zendesk where tickets are created using multiple methods. One of these methods is via MyFusion Notes, and with this method, a new ticket and a new user is created in the database, with nothing more than the phone number, in this format: +1 (555) 555-5555.

Now, when the same customer calls, the same happens, but the phone number comes up like this: +15555555555

The problem is that when the customer called again, that new phone number format is not recognized as already in the system, and a new user is created.

What I want to do, is to first get a list of users where this happened. In database querying terms, I want something similar to SELECT * FROM users GROUP BY phone having count(*) >= 2. Then I can figure out how to merge these users or just delete the empty ones.

Is this even possible?

1

There are 1 answers

2
Jimmy Long On

Have you tried using the Search API in Zendesk? https://developer.zendesk.com/rest_api/docs/core/search