Macros
Returns macros used to automate ticket updates, including action, access, and restriction details.
Table-Specific Information
Select
The following queries are processed server-side while other filters are processed client-side within the provider.SELECT * FROM Macros WHERE Id = '123'
SELECT * FROM Macros WHERE Active = true
SELECT * FROM Macros ORDER BY CreatedAt
SELECT * FROM Macros ORDER BY UpdateddAt
Insert
The Title and Actions columns are required to insert. This operation is allowed for logged-in users with the "agent" role.
INSERT INTO Macros (Title, Actions) VALUES ('Roger Wilco II', '[{\"field\": \"status\", \"value": \"solved\"}]')
Update
You must specify the Id of the macro to update. Updating an action updates the containing array, clearing the other actions. Include all your actions when updating any action. This operation is allowed for logged-in users with the "agent" role.
UPDATE Macros SET Title = 'Roger Wilco III' WHERE Id = '123'
Delete
You must specify the Id of the macro to delete it. This operation is allowed for logged-in users with the "agent" role.
DELETE FROM Macros WHERE Id = '123'
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Long | False |
The unique Id automatically assigned to the macro when created. | |
| Title | String | False |
The title of the macro. | |
| Actions | String | False |
An object describing what the macro will do. | |
| Active | Boolean | False |
Indicates whether the macro is active. Returns only active macros if true, and only inactive macros if false. | |
| Description | String | False |
The description of the macro. | |
| Position | Integer | False |
The sort position of the macro in the list. | |
| Restrictions | String | False |
Specifies who may access this macro. Is null when everyone in the account can access it. | |
| CreatedAt | Datetime | False |
The time the macro was created. | |
| UpdatedAt | Datetime | False |
The time of the last update of the macro. | |
| Access | String | False |
The access level filter for macros. Possible values are personal, shared, or account. | |
| Category | String | False |
The category used to filter macros. | |
| GroupId | Long | False |
Groups.Id |
The Id of the group used to filter macros. |
| OnlyViewable | Boolean | False |
Indicates whether to return only macros that can be applied to tickets. Returns all macros the current user can manage if false. | |
| Attachments | String | False |
An array of macro attachment Ids to be associated with the macro, used during insertion. |