Action tickets_create_v2
System ID:
action_tickets_create_v2
Description
Improved ticket creation: the same capabilities as tickets_create, plus better queue handling when no operators are available. Collects custom fields, creates a chat of type ticket, connects to an operator, and saves the ticket.
During creation it calls connect-to-operator; therefore banned and limit branches are possible. If limit is returned and queue-based distribution is enabled — the chat may be created and placed in the queue.
Events (scenario branches)
| Event | When it occurs |
|---|---|
| success | Ticket created successfully |
| banned | User is under an active ban (from connect-to-operator) |
| limit | No free operator; with a queue strategy the chat may be queued |
| error | No subject, connect / ticket creation / queue handling failure |
| select_custom_field | A custom field value must be selected from a list |
| required_custom_field | A required custom field is not filled yet |
| optional_custom_field | An optional custom field can be filled or skipped |
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
subject_alias | string | yes | — | Ticket subject alias (placeholders) |
additional_fields | object | no | {} | Extra custom fields (placeholders in values) |
keep_original_message | boolean | no | false | true — keep the original message text |
resolved | boolean | no | false | true — create as resolved and close the chat |
assignee_id | string / number | no | null | Operator ID to assign (placeholders) |
unassigned | string | no | false | "true" — do not assign, even if assignee_id is set |
auto_assignee | boolean | no | false | true — automatic assignment (round-robin) |
reporter_id | string / number | no | null | Reporter operator ID (placeholders) |
watchers | array | no | [] | Watcher operator IDs (placeholders) |
status_name | string | no | null | Custom chat status (placeholders) |
type | string | no | "ticket" | Chat type; "ticket" ensures a ticket room is created |
Ticket description: the ticket_description parameter (if passed) or the ticket_description constant.
Configuration example
{
"subject_alias": "support",
"auto_assignee": true,
"type": "ticket"
}