Find smart process item
The Find Smart Process Item robot searches Bitrix24 (Alaio) smart process items by filter: stage, assigned user or a custom JSON filter. It returns the ID and title of the first item found, the list of all IDs, the number of items found and a found flag (Y/N) for further branching of the business process.
The robot searches for smart process items in Bitrix24 (Alaio) CRM via the crm.item.list method and is used in business processes and robots. You provide the smart process type ID (required) plus any of these conditions: stage (stageId), assigned user ID and a custom JSON filter for non-standard fields. Sorting is set by the id, createdTime or updatedTime field (default updatedTime descending), and the number of results is capped by the limit parameter (default 5, maximum 50). Use the robot when you need to find a related smart process item by a deal or contact, check whether an open item exists at a given stage, or collect a list of IDs for batch processing. It returns the ID and title of the first item, an array of all found IDs, their count and a found flag (Y/N) — use it in the condition of the next step.
What input parameters does the robot accept?
| Parameter | Type | Required? | Default |
|---|---|---|---|
| Smart process type ID (find it in CRM → Smart Processes → settings) | int | yes | |
| Stage (e.g. DT{entityTypeId}:{stageCode}) | string | — | |
| Assigned user ID | int | — | |
| Custom filter (JSON, e.g. {"contactId":"123"}) | string | — | |
| Sort by: id / createdTime / updatedTime (default updatedTime DESC) | string | — | |
| Maximum results (default 5) | int | — |
What does the robot return?
| Parameter | Type |
|---|---|
| ID of the first item found | int |
| Title of the first item | string |
| All found IDs | int |
| Number of items found | int |
| Found (Y/N) | string |
Scenario: find an active request by contact
- A deal moves to the In progress stage
- The robot searches smart process items by type ID and a filter with the contact ID
- When found = Y the process takes the found item ID and updates it, on N it creates a new one