Creating your first workflow, step by step

In this guide, we'll build a workflow that turns sales chats into deals. When an agent tags a chat lead, the workflow adds a deal to your pipeline, creates a follow-up task and emails your sales team. Your agents tag the chat, and the rest happens by itself.

New to Workflows? Getting started with Workflows explains how a workflow works.

What we'll build:
  • Trigger: Chat tagged, so the workflow starts each time an agent tags a chat.
  • Condition: checks that the tags include lead. Other tags end the run.
  • Create card: adds the deal to your pipeline, linked to the chat.
  • Create activity: creates a follow-up task for your sales team.
  • Send email: tells your sales team that a new lead is waiting.
Time: about 15 minutes.

Before you start

  • You must be a property admin. Only admins can create and manage workflows.
  • You need a pipeline for your deals. The deal goes into a stage that you choose.
  • To send the email, you need a connected email inbox. The email is sent from that inbox. If you have none, leave out step 6.

Step 1: Create a workflow

  1. Go to Automations > Workflows.
  2. Click Create workflow.
The builder opens. The outline on the left shows the trigger at the top and the steps below it. The panel on the right shows the settings of the item that you select.

Step 2: Start the workflow when a chat is tagged

The trigger decides when the workflow starts. For every trigger and its options, see Choosing what triggers a workflow.

1. Click Choose a trigger.

2. Click Conversations.
3. Click Chat tagged.
The trigger now shows under When any of. The workflow starts each time an agent adds a tag to a chat. A tag on the contact does not start it.

You can't pick a tag in the trigger itself. Its filter offers only Conversation ID, Event and Occurred at. So the next step checks the tag.

Step 3: Continue only for the lead tag

A Condition step checks your data and decides which steps run next. For all step types, see Building workflow steps: actions, conditions, waits and AI steps.
  1. Under the trigger, in Add your first step, click Condition.
  2. In the IF branch, in Select a field, select Chat · Tags.
  3. In the operator list, select contains.
  4. In the value box, type lead.
In the outline, the Condition step now has an IF branch and an ELSE branch. You add the actions under IF. Leave ELSE empty, so that a chat with other tags ends the run there.

Step 4: Add the deal to your pipeline

  1. In the outline, under IF, click Add step.
  2. Click Action.
  3. In Category, select Pipeline.
  4. In Action, select Create card.
  5. In Pipeline, select your sales pipeline.
  6. In Stage, select the stage for new leads.
  7. In Card title, type New lead from chat.
  8. In Link ticket or conversation, select Conversation ID.
The link puts the chat on the deal, so your sales team can read what the customer asked. The other fields, such as Priority, Value and Assignee, are optional.

Tip: Above each text field is a list. Keep Enter a custom value to type your own text, or select a data field to fill in the value for you, such as a detail from the chat. See Using runtime data in workflows.

Step 5: Create the follow-up task

  1. Below the Create card step, click Add step.
  2. Click Action.
  3. In Category, select Activities.
  4. In Action, select Create activity.
  5. In Activity type, select Task.
  6. In Activity title, type Follow up on new lead.
  7. In Priority, select High.
  8. In Assignee, select the person who follows up. This is optional.

Step 6: Email your sales team

  1. Below the Create activity step, click Add step.
  2. Click Action.
  3. In Category, select Communication.
  4. In Action, select Send email.
  5. In Inbox, select the inbox that sends the email.
  6. In To (email addresses), type your sales team's address, for example sales@yourcompany.com. Separate more than one address with commas.
  7. In Subject, type New lead from chat.
  8. In Message, type A chat was tagged lead. The deal and a follow-up task are in your pipeline.

Step 7: Name and save the workflow

  1. Click the Settings tab.
  2. In Name, type Chat leads to pipeline.
  3. In Description, type a short description. Your team sees it on the Workflows page.
  4. Keep Email property admins when a run fails selected, so that you hear about failed runs.
  5. Click Create.
The workflow is saved, and the Runs tab appears. The workflow is still Disabled, so it does not run yet.

Step 8: Turn the workflow on

  1. In the Settings tab, turn on Enabled.
  2. Click Save.
The workflow now runs each time an agent tags a chat. Only Enabled turns the whole workflow on or off. The switch on the trigger card turns only that trigger on or off.

Step 9: Test the workflow

The surest test is a real chat. Every step of the run is real, so use a chat of your own, not a customer's.
  1. Start a chat with your own website, for example in a private browser window.
  2. In your dashboard, add the tag lead to that chat.
  3. Go back to the workflow and click the Runs tab.
  4. Click the new run to see its status and each step.
Then check your pipeline for the new deal and your activities for the follow-up task, and check your sales inbox for the email.

If the run failed, the step trace shows which step stopped and why. See Testing, monitoring and troubleshooting workflow runs.

Good to know

  • The workflow runs again each time an agent adds a tag to the chat. If a chat already has lead and an agent adds another tag, the workflow creates a second deal and task.
  • For other ways to turn chats into deals, for example with AI that decides which chats are leads, see Creating deals from chats with 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