Roboteka
Roboteka · Robots · Find company by phone or email

Find company by phone or email

The Find company robot searches the Bitrix24 (Alaio) CRM for a company by phone number or email address. The phone can be matched in any format: with brackets, spaces and dashes. It returns the ID and name of the first match, all matching IDs, and a Found flag (Y/N). Works in Bitrix24 business processes and robots.

The robot searches the Bitrix24 (Alaio) CRM for a company by phone number or email address: fill in one of the two fields; if both are filled, phone takes priority. The phone is matched in any format or exactly as stored in the card, as set in the robot settings. Typical use cases: link a web form request to an existing company by phone, or check for a duplicate before creating a company. The robot returns the ID and name of the first company found, the full list of matching IDs, and a Found flag (Y/N). Build a condition on the flag in the workflow designer and pass the ID to a binding field or to another robot.

What gap it closes

A web form brings in the customer's phone number, but the company card stores it in a different spelling: the form sends "+1 (212) 555-0147", the CRM holds "+12125550147". A plain field search compares the strings literally, misses the company, and the workflow creates a duplicate. The stock robots cannot find a company by phone or email. This robot returns the company's ID, its name, all matching IDs and a Found flag (Y/N).

How to set it up

Fill in "Phone (leave empty if searching by email)" or "Email (leave empty if searching by phone)". If both are filled, the robot searches by phone. In "Phone matching" pick the mode:

  1. "Any format (8…, +7…, brackets, spaces)" is the default. The robot uses the Bitrix24 (Alaio) duplicate index, so brackets, dashes and spaces do not prevent a match.
  2. "Exactly as stored in the card" needs the number to match the stored value character by character. Use it when all numbers in the CRM already share one format.

Email is compared case-insensitively in both modes.

A typical workflow: a request creates a lead, the robot looks up the company by the lead's phone, and a condition on "Found (Y/N)" links the lead to the company on Y or creates a new company on N.

If the robot returns an error

"Company not found" for a company that does exist usually means:

  • the number has no country code, which is not found in either mode;
  • the mode is "Exactly as stored in the card" and the number is stored differently;
  • the employee the workflow runs as cannot access that company.

"Error: provide a phone or email" means both fields were empty when the robot ran.

If several companies share the number, the robot returns the first and lists all in "All found IDs".

Works together with

What input parameters does the robot accept?

Parameter Type Required? Default
Phone (leave empty if searching by email) string —
Email (leave empty if searching by phone) string —
Phone matching select Exactly as stored in the card, Any format (8…, +7…, brackets, spaces) — any_format

What does the robot return?

Parameter Type
Company ID int
Company name string
All found IDs int
Found (Y/N) string

What errors can the robot return?

The robot writes these messages to the business process log when it cannot complete a step. The text tells you what to fix in the settings or the data.

  • Error: provide a phone or email
  • API error
  • Company not found

Scenario: find a company by the phone from a request

  1. A web form creates a lead with a phone number written in a different format
  2. The robot searches for a company with that number in any format
  3. If found, the company ID is used to link the request and avoid a duplicate

Related robots