Hello,
I'm looking forward to search for a specific phone number in Accounts. I get this phone number from PBX as we are call. But they are not in same format. PBX delivers for example +49832112340 an espoCRM Accout has a number like (08321) 1234-0. As the data in espoCRM is imported daily from another system I can't be sure it as always the same format. So it is no solution to bring the PBX number to this format. I would like to strip down all phone numbers in espoCRM to just digits.
After some research I found out this is done in sql with the REPLACE function. But is there a chance to call this within an API Query string?
The aim is to search successfully for 0832112340 although database contains (08321) 1234-0
I'm looking forward to search for a specific phone number in Accounts. I get this phone number from PBX as we are call. But they are not in same format. PBX delivers for example +49832112340 an espoCRM Accout has a number like (08321) 1234-0. As the data in espoCRM is imported daily from another system I can't be sure it as always the same format. So it is no solution to bring the PBX number to this format. I would like to strip down all phone numbers in espoCRM to just digits.
After some research I found out this is done in sql with the REPLACE function. But is there a chance to call this within an API Query string?
The aim is to search successfully for 0832112340 although database contains (08321) 1234-0
Code:
from espo_api_client import EspoAPI client = EspoAPI('http://espocrm', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx) # Get accounts with search params params = { "select": "id,phoneNumber", "where": [ { "type": "equals", "attribute": "phoneNumber", "value": '(08321) 1234-0', }, ], } print(client.request('GET', 'Account', params))
Comment