Creating tickets for the right team with workflows

Different chats need different people. A visitor who asks about prices needs your sales team. A customer with a broken order needs your support team.

This workflow sorts your chats for you. When a chat ends, AI reads it and decides which team needs it. The workflow then creates a ticket with a summary and the full transcript, and emails it to that team. Chats that no team needs are skipped.

It takes about 15 minutes to set up.

Do you want to send live chats to the right team while the chat is still open? Use departments, not a workflow. See Creating and managing departments.

What each team gets

Each team gets an email, and you get a ticket in Inbox > Tickets. The email starts with a one-line summary, for example INTENT=HOT | Sam runs a café and wants a price for 20 units. The full chat transcript follows.

The ticket's requester is your team, not the customer. That is how the ticket reaches the team's inbox: the Create ticket step has no field for a department or an agent. So when your team replies to the customer, they reply in the original chat or email the customer directly. A reply inside the ticket goes to your own team.

Before you start

You need:
  • The property admin role. Only property admins can create and manage workflows.
  • AI Assist turned on, the add-on active and AI credits available. See Getting started with AI Assist. The AI step runs once for each chat, also for chats that it skips.
  • An email address for each team, for example sales@yourcompany.com and support@yourcompany.com.

How it works

  1. Chat transcript created starts the workflow when a chat ends.
  2. Fetch conversation reads the chat.
  3. An AI step decides which team needs the chat and copies the transcript.
  4. A Condition sends the run to the branch for that team.
  5. Create ticket creates the ticket and emails it to the team's address.
You do not build this from an empty page. The Chat to qualified deal template already has steps 1 to 4. Normally it turns chats into deals, as in Creating deals from chats with workflows. Here you swap its deal steps for tickets.

Step 1: Start from the template

  1. Go to Automations > Workflows.
  2. Click Browse templates (or Start from a template if you have no workflows yet).
  3. Click Chat to qualified deal.
  4. Under IF Hot, click the trash icon of Create card.
  5. Under IF Hot, click the trash icon of Send Slack notification.
  6. Under ELSE IF Warm, click the trash icon of Create activity.
The checklist items for these steps go away.

Important: Do not change a template step to a different action. The checklist keeps asking for the old fields, and you cannot click Create. Delete the step and add a new one.

Step 2: Tell the AI how to sort your chats

  1. Click AI step.
  2. Replace the Instruction with your own rules. Keep the codes INTENT=HOT and INTENT=WARM, because the Condition checks for them.
In this guide, IF Hot is your sales team and ELSE IF Warm is your support team. The branch names come from the template, and you cannot change them. Chats coded INTENT=COLD go to ELSE, and the run ends there.

For example:

You route website chats. The chat transcript is in nodes.fetch_chat.output. Start your reply with INTENT=HOT when the visitor wants to buy, asks about prices or asks for a quote. Use INTENT=WARM when the visitor is a customer with a problem, for example with an order, an account or a service. Use INTENT=COLD for all other chats, for example general questions that the chat already answered, or spam. Then write " | " and one sentence about who they are and what they need. Include their name and email address if they gave them. Then add a line that says Transcript: and copy the full chat transcript below it, word for word, with who said each message.

Why the AI copies the transcript: a ticket cannot show the visitor's name, email address or messages directly, and it cannot show the output of Fetch conversation. The AI step can read all of them, so it copies them into its answer, and the ticket shows that answer. See Using runtime data in workflows.

Step 3: Create a ticket for each team

  1. Under IF Hot, click Add step.
  2. Click Action.
  3. In Category, select Communication.
  4. In Action, select Create ticket.
  5. In Requester name, type the team name, for example Sales team.
  6. In Requester email, type the team's address, for example sales@yourcompany.com.
  7. In Subject, type a subject, for example Sales chat from your website.
  8. In Message, type {{nodes.classify.output}}.
  9. Keep Notify requester by email on. This sends the ticket to the team's address.
  10. Do steps 1 to 9 again under ELSE IF Warm, with your support team's name, address and subject.
Do you need a third team? In the Condition, click Add branch. Give the new branch its own code, for example INTENT=BILLING, and add the code to your instruction. See Building workflow steps: actions, conditions, waits and AI steps.

Step 4: Save and turn it on

  1. Click the Settings tab.
  2. Type a Name, for example Tickets for the right team.
  3. Click Create.
  4. Turn on Enabled.
  5. Click Save.

Test it

  1. Open your website as a visitor and start a chat. Write a message for one team, for example "How much is it for 20 units?"
  2. Close the website tab.
  3. Wait a few minutes. A chat ends about 3 minutes after the visitor leaves, and then Chat transcript created starts the workflow.
  4. Open the Runs tab, and click the new run to see which branch it took.
  5. Check the team's inbox for the email, and Inbox > Tickets for the ticket.
Do one test for each team, and one with a chat that no team needs. For more about runs and errors, see Testing, monitoring and troubleshooting workflow runs.

Fit it to your business

Change the rules in the instruction so that they describe your own chats. Most businesses split sales chats from support chats:
BusinessSales chatsSupport chats
Online storeProduct questions before a purchase, bulk or wholesale ordersOrder status, returns, damaged items
Agency or professional servicesNew projects, quotesQuestions from existing clients
Home and trade servicesQuotes and new jobsChanges to a booked job, complaints
Clinic, dentist or salonNew patients or clients, pricesQuestions from existing patients, bills
Hotel, restaurant or tour operatorNew bookings and group requestsChanges to a booking
Software or IT servicesDemos, plans and pricesProblems, account and billing questions
School or trainingNew student questions, enrollmentCurrent student questions
Real estateBuyers and tenants who want a viewingQuestions from current landlords or tenants
Manufacturer or wholesalerQuotes and distributor questionsOrders, deliveries and spare parts

Other ways to tell a team

You can use these steps in each branch instead of Create ticket, or with it:
StepWhat the team getsGood to know
Send emailAn email to the team's address, with no ticket.You must first connect an email inbox (Gmail, Outlook or IMAP/SMTP) in your Omnichannel Inbox. The email is sent from that inbox.
Send Slack notificationA message in the team's Slack channel.Use a different Slack webhook in each branch. See Sending Slack alerts with workflows.
Create activityA task for one person, with an Assignee.The task goes to a person, not a department. Put the summary in the description: {{nodes.classify.output}}.

Limits and good to know

  • No assignment: a workflow cannot assign a ticket to a department or an agent. The team's email address as requester is the workaround in this guide.
  • AI credits: the AI step runs once for each chat that ends, also for chats that it skips.
  • Long chats: the AI copies the transcript. For a very long chat, check that the copy is complete before you rely on it.
  • Your agents' notifications: a new ticket also notifies your tawk.to team, as set in Administration > Settings > Mail Notifications. See Adjusting mail notifications.
  • Escalations from an AI agent: if an AI agent answers your chats, the Escalate to a human template lets it create a ticket during the chat, with the customer as the requester. See Letting your AI agent run workflows.

Related guides


Have a question we haven't covered or need support?

Was this article helpful?

0 out of 0 liked this article

Still need help? Message Us