Automations
Represents automations that trigger actions on tickets based on time-based conditions.
Table-Specific Information
Select
The following queries are processed server-side, while other filters are processed client-side within the provider.SELECT * FROM Automations WHERE Id = '123'
SELECT * FROM Automations ORDER BY Position
SELECT * FROM Automations ORDER BY CreatedAt
SELECT * FROM Automations ORDER BY UpdatedAt
Insert
The Title, ConditionsAll, and Actions columns are required to insert. This operation is allowed for logged-in users with the "agents" role.
INSERT INTO Automations (Title, ConditionsAll, Actions) VALUES ('Roger Wilco II', '[{ \"field\": \"status\", \"operator\": \"is\",\"value\": \"open\" }, {\"field\": \"priority\", \"operator\": \"less_than\", \"value\": \"high\" }]', '[{\"field\": \"status\", \"value": \"solved\"}]')
Update
You must specify the Id of the automation to update. The Title column is required, while the Active and Position columns are optional.
Updating an action replaces the entire actions array, clearing any other existing actions. Include all your actions when updating any action. This operation is allowed for logged-in users with the "agents" role.
UPDATE Automations SET Title = 'Roger Wilco III' WHERE Id = '123'
Delete
You must specify the Id of the automation to delete it. This operation is allowed for logged-in users with the "agents" role.
DELETE FROM Automations WHERE Id = '123'
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Long | True |
The unique Id of the automation, automatically assigned when the automation is created. | |
| Title | String | False |
The title of the automation. | |
| Active | Boolean | False |
Indicates whether the automation is active. | |
| Position | Integer | False |
The position of the automation. | |
| ConditionsAll | String | False |
An object that describes the conditions under which the automation will execute. All conditions in this object must be met. | |
| ConditionsAny | String | False |
An object that describes the conditions under which the automation will execute. Any one condition in this object must be met. | |
| Actions | String | False |
An object describing what the automation will do. | |
| CreatedAt | Datetime | True |
The date and time when the automation was created. | |
| UpdatedAt | Datetime | True |
The date and time when the automation was last updated. |