Skip to content
QwryAI
Documentation
Pages

Helpdesk

Automate the Helpdesk with triggers

Rules that run the moment a ticket is created or updated: set its status, route it, tag it, or tell someone about it

A trigger is a rule for your Helpdesk tickets. Each time a ticket is created or updated, QwryAI checks it against the trigger's conditions and, if they match, runs the trigger's actions: set a status or priority, assign a team or an agent, add or remove tags, add an internal note, or send an email, a Slack message or a webhook. Triggers belong to one AI agent and act on that agent's tickets.

Think of each one as When this ticket matches, Then do these things.

Triggers run in order, top to bottom, and every trigger that matches runs. You can stack them: one routes billing questions, another raises the priority of refund requests, and both apply to the same ticket in the order you set.

You manage them under Settings › Helpdesk › Triggers. For tickets where nothing happens, such as a customer who stopped replying, use Automations, which check open tickets once an hour.

Settings › Helpdesk › Triggers.

How a trigger works

Every trigger has four parts:

Example: flag refund requests

PartSetting
NameTag refund requests
Match ALL ofTicket is Created
Match ANY ofSubject contains any of refund, charged twice
ThenAdd tags refund-request; Set priority High; Add internal note "Check the payment in Stripe before replying."

How triggers run

When a ticket is created or updated, QwryAI goes through your active triggers once, from the top of the list to the bottom:

  1. Start at the top

    The first active trigger is checked against the ticket.

  2. Run each trigger that matches

    If it matches, its actions run before the next trigger is checked.

  3. Pass the changed ticket down

    The next trigger sees the ticket as the previous one left it. A trigger that sets the priority to High lets a later trigger match on priority High in the same pass.

  4. Stop at the bottom

    Each trigger is checked once per create or update.

The default team trigger

Every agent starts with a trigger called Route to default team: When a new ticket still has no team, assign it to your default team. It runs on Ticket is Created when Team is any of No team, and its action is Assign team › Default team (current), which always follows whichever team is your default at the time. You can edit, reorder, pause or delete it like any other trigger.

Creating a trigger

  1. Open Triggers

    Go to Settings › Helpdesk › Triggers and select New trigger.

    A new trigger starts with Ticket is Created.
  2. Name your trigger

    Type a Name that says what the trigger does, such as Tag refund requests, and add a Description if your team will want the reason later. Names must be unique among an agent's triggers.

    Name it after what it does.
  3. Set the conditions under When

    A new trigger starts with Ticket is Created under Match ALL of. Change it to Updated, or remove it to run on both. Then select Add condition in either group and pick the field.

    Pick the field for the new condition.

Pick the operator, such as contains any of, and type the value. For a list, separate the words with commas.

Choose contains any of.
Every condition under ALL must match; at least one under ANY.
  1. Add the actions under Then

    A new trigger starts with one action. Pick its Action type, such as Add tags, and fill in its details. Select Add action for more; they run in the order listed.

    Change the first action to Add tags.
Add a second action and set it to Set priority.
Actions run top to bottom.
  1. Choose Active, then create it

    Leave Active on to start using the trigger straight away, or turn it off to save it paused. Select Create trigger.

    Save it active or paused.

Conditions

Conditions sit in two groups:

  • Match ALL of: Every condition must match.
  • Match ANY of: At least one must match. Optional.

A ticket matches when everything under Match ALL of is true and, if Match ANY of has conditions, at least one of those is true too.

When does a trigger run?

How it's set upWhen it runs
Ticket is CreatedOnce, when the ticket is created
Ticket is UpdatedEvery time the ticket changes, including a new message
New message is From customer or From agentEvery time a message arrives from that side
A changed condition, such as Status category changed to ClosedEvery time that change happens
None of the aboveOnce per ticket, the first time it matches on a create or an update

The list shows each trigger's timing as a badge: On create, On update or On create or update. A trigger that runs once per ticket starts over when you change its conditions, so it can act again on tickets it already handled.

Ticket condition fields

FieldWhat it checksOperators
TicketWhether the ticket was just Created or Updatedis
New messageWhether this update added a message From customer or From agentis
Status categoryNew, On you, On hold, On customer, Closed or Cancelledis any of, is none of, and the changed operators
StatusOne of your ticket statusesis any of, is none of, and the changed operators
ChannelWhere the ticket came from, such as Chat, Email, WhatsApp, Instagram, Facebook, Help page, API or Manualis any of, is none of
Ticket typeTicket, Live chat, Outbound or Consultationis any of, is none of
AssigneeWho has the ticket, including Unassignedis any of, is none of, and the changed operators
TeamWhich team has the ticket, including No teamis any of, is none of, and the changed operators
PriorityUrgent, High, Medium or Lowis any of, is none of, and the changed operators
Last messageWho wrote the latest message: Customer, Agent, AI or No messages yetis any of, is none of
Agent has repliedWhether a teammate has replied to the customeris True or False
TagsThe ticket's tagscontains any of, contains none of
SubjectWords in the ticket subjectcontains, contains any of, does not contain, is, is not
DescriptionWords in the ticket descriptioncontains, contains any of, does not contain, is, is not

The changed operators are changed, not changed, changed to, not changed to, changed from and not changed from. Text matching ignores upper and lower case. For contains any of, separate the words with commas.

Contact condition fields

FieldWhat it checksOperators
Name, Email, Phone number, External IDThe requester's details on the ticketcontains, contains any of, does not contain, is, is not, is set, is not set

Routing condition fields

FieldWhat it checksOperators
Recipient addressWhich of your support addresses an email ticket was sent tois any of, domain is any of, contains any of

For domain is any of, enter a bare domain, like company.com.

Actions

ActionWhat it does
Set statusMoves the ticket to one of your ticket statuses.
Set status categoryMoves the ticket to a category's default status.
Assign teamAssigns a team, or Default team (current). If nobody has the ticket yet, the team's assignment method picks a member.
Assign agentAssigns a specific teammate.
UnassignRemoves the ticket's assignee. Its team stays.
Set prioritySets Urgent, High, Medium or Low.
Add internal noteAdds a note only your team sees.
Add tagsAdds tags; tags already on the ticket stay.
Remove tagsRemoves the listed tags.
Set tagsReplaces the ticket's tags with exactly these.
Remove all tagsRemoves every tag from the ticket.
Send emailEmails the requester, the assigned agent, a team, a teammate or any address. See Send email.
Send Slack messagePosts to a Slack channel. See Send Slack message.
Start Slack threadPosts one card per ticket in a Slack channel whose thread replies reach the customer. See Slack ticket threads.
Send webhookSends the ticket to one of your saved webhooks. See Send webhook.

Status changes don't apply to a ticket that's already closed or cancelled.

Send webhook

Send webhook posts the ticket to an endpoint you saved under Settings › Webhooks. Pick it from the Webhook list; if you have none yet, the hint says Create a webhook in Settings → Webhooks.

Webhooks come from Settings › Webhooks.

The request body names the event, helpdesk.trigger, and carries the ticket and the rule that sent it. It's signed with the webhook's secret in the x-qwryai-signature header, the same as your other webhooks.

JSON
{
  "eventType": "helpdesk.trigger",
  "chatbotId": "…",
  "payload": {
    "ticketId": "TKT-13",
    "rule": { "id": "…", "name": "Tag refund requests" },
    "ticket": {
      "id": "TKT-13",
      "subject": "Charged twice for my subscription",
      "status": "open",
      "statusId": "…",
      "priority": "high",
      "channel": "email",
      "ticketType": "ticket",
      "teamId": null,
      "assigneeId": null,
      "tags": ["refund-request"],
      "requester": { "name": "Priya Shah", "email": "priya.shah@example.com" },
      "conversationId": null,
      "url": "https://www.qwryai.com/…/tickets?ticketId=TKT-13"
    }
  }
}

Send email

Send email sends a plain email built from the ticket.

Pick a recipient, then write the subject and body.

Recipient

RecipientWho gets it
RequesterThe customer on the ticket
Assigned agentThe teammate who has the ticket; skipped when it's unassigned
Specific teamEvery member of the team you pick
Specific agentThe teammate you pick
Custom addressAny full email address you type

Emails to anyone other than the requester end with a link to the ticket.

Subject and body

Both accept these placeholders:

PlaceholderBecomes
{{ticket.id}}The ticket number, such as TKT-13
{{ticket.subject}}The ticket subject
{{ticket.requester_name}}The customer's name
{{ticket.requester_email}}The customer's email
{{ticket.status}}The ticket's status category
{{ticket.priority}}The ticket's priority

Send Slack message

Send Slack message posts to a channel in the Slack workspace connected under Integrations. Type the channel, such as #support, and the message; the same placeholders work, and a link to the ticket is added at the end.

A link to the ticket is added to every message.

Checking what a trigger did

Each time a trigger runs on a ticket, the ticket's conversation shows a line such as Trigger Tag refund requests ran. Changes it made, such as a new priority or tags, appear in the ticket's history, and notes it added show with the other internal notes.

Managing triggers

Ordering

Drag a trigger by its handle to move it up or down; the number beside each one is its place in the run order. With the keyboard, focus the handle and press the up or down arrow.

Activate or pause

Use the switch on a trigger's row. A paused trigger shows Paused and doesn't run until you switch it back on.

Paused triggers keep their settings.

Edit or delete

Select the pencil to edit a trigger, or the bin to delete it. Deleting asks you to confirm: This trigger stops running. Changes it already made to tickets stay.

Needs attention

A trigger that points at something that no longer exists, such as a deleted team, an archived status, a removed teammate or a deleted webhook, shows a Needs attention badge with the reason, for example References a team that no longer exists. Edit this rule to fix it.

Good to know

  • Only teammates who can manage Helpdesk settings can create, edit, reorder or delete triggers; others see them read-only.
  • Changes made by triggers and automations don't start the triggers again. Only teammates, customers and the system do.
  • Triggers don't time anything. For "no reply after 24 hours", use Automations.

Limits

LimitValue
Triggers per AI agent100
Conditions per group30
Actions per trigger20
Values in one list condition100
Words in one contains any of condition50
Name100 characters
Description280 characters
Tags in one tag action20
Email subject / body200 / 10,000 characters
Slack message3,000 characters

Frequently asked questions

Can a trigger fire when a ticket has had no reply for 24 hours?

No. Triggers only run when a ticket is created or updated. Use an automation with Time since last customer message instead.

How do I run a trigger when a customer replies?

Add New message is From customer under Match ALL of.

Can triggers use priority and tags as conditions?

Yes. Use Priority and Tags. Custom fields aren't available as trigger conditions.

How do I email an agent when a ticket is assigned to them?

Add Assignee changed under Match ALL of, then Send email with Assigned agent as the recipient.

How do I tag every ticket from one company's email domain?

Add Ticket is Created and Email contains the domain, such as @acme.com, then Add tags.

Do triggers run on tickets created by a takeover?

A takeover ticket is created already assigned to you, so routing on Ticket is Created usually has nothing to do. Triggers on Ticket is Updated run as the ticket changes.

Can two triggers loop forever?

No. Each create or update runs the list once, top to bottom, so one trigger's change can't start the list again.

Next steps

Explore the documentation