Clean duplicate activities on entity by ID
The Clean duplicate activities on entity by ID robot finds same-titled activities in the timeline of a given lead, deal, contact or company in Bitrix24 (Alaio), keeps one by the chosen rule and completes or deletes the rest. The entity is set by type and ID, so it can run from any other entity's process. It returns the number of duplicates found and the IDs processed.
The robot removes repeated activities from the timeline of an entity addressed by type and ID — a lead, deal, contact or company. Duplicates are activities with the same title: before comparing, titles are normalised, repeated spaces collapse and case is ignored. The responsible user is not part of the comparison by default, because after a merge the same activity usually carries different responsibles on the two sides; a separate switch requires the responsible to match as well. One activity per group survives and the rest are processed. Which one survives is a parameter: "completed one, otherwise the oldest" (default), "completed one, otherwise the newest", "open one, otherwise the oldest", "open one, otherwise the newest", "the oldest" or "the newest" — the first four mean status outweighs the date, the last two look only at the date. The action on the duplicate is chosen separately: complete (default, reversible) or delete. The robot handles both universal activities and tasks: a task bound to a CRM record shows up in the timeline, and when deleting a duplicate the robot removes the task itself, not just the row in the card. Activity kinds are switched on with checkboxes — by default only universal activities and tasks, while calls, emails, open channel chats and CRM forms stay off because they record real interaction with the client. Anything not explicitly enabled is never touched. Limits on how much is scanned and how much is processed per run protect the portal from REST throttling, and a report-only mode lets you review the list before any change. To clean the entity whose business process the robot itself runs in, use Clean duplicate activities on current entity.
What input parameters does the robot accept?
| Parameter | Type | Required? | Default |
|---|---|---|---|
| Entity type | select | yes | deal |
| Entity ID | int | yes | |
| Universal activities | bool | — | Y |
| Tasks | bool | — | Y |
| Calls | bool | — | N |
| Emails | bool | — | N |
| Open channel chats | bool | — | N |
| CRM forms | bool | — | N |
| Which activity to keep | select | yes | completed_oldest |
| What to do with the duplicate | select | yes | complete |
| Treat as duplicates only when the responsible user matches | bool | — | N |
| How many activities to scan (max) | int | — | 1000 |
| How many activities to process per run (max) | int | — | 100 |
| Report only, change nothing | bool | — | N |
What does the robot return?
| Parameter | Type |
|---|---|
| Done (Y/N) | string |
| How many duplicates were found | int |
| How many activities were processed | int |
| IDs of the processed activities | string |
| IDs of the kept activities | string |
| Limit reached (Y/N) | string |
| Errors | string |
Scenario: drop duplicate activities after merging deals
- Add the Clean duplicate activities on entity by ID robot to a business process
- Set the entity type to Deal and the ID of the deal everything was merged into
- Leave universal activities and tasks enabled, choose the Delete action
- Run it once in report-only mode first and review the list in affected_ids