Set up what happens when a message comes in
A message workflow starts with the Message received trigger. It runs for SMS, WhatsApp, Web Chat and email. Every message is in the Inbox before any workflow runs, so a person can always answer it.
Before you start
- You need the Owner or Admin role.
How message workflows run
- A message comes in. Line saves it in the Inbox.
- Line runs every enabled message workflow whose trigger matches, oldest first.
- The first workflow that reaches a reply sends the reply. Other workflows still run their other steps, such as an email.
- If no custom workflow replies, the default message workflow for that number, widget or inbox runs last.
Each number, widget and inbox has a default message workflow. At first it has only a trigger, so messages wait in the Inbox. You can edit it, publish it or remove it.
Choose which messages start the workflow
Select the Message received trigger. It has two parts.
Messages
- Channel: select SMS, WhatsApp, Web Chat or Email.
- Sent to: select the numbers, widgets or inboxes.
Both must match. A level with nothing selected shows Any. With no Channel, no Sent to and no filters, the workflow runs for every message.
Filters
- Select Add filter.
- Select Keywords or Contact.
- For Keywords, select Contains or Does not contain, then type the words, for example "quote, price".
- For Contact, select Known or Unknown.
Filters in a group join with And or Or. Select Add filter group to add another group.
Steps for messages
| Step | What it does |
|---|---|
| Agent | Your agent replies. In Mode, select Act to send or Draft to save the reply for a person. |
| Time Rule | Splits the path into Open hours and Outside hours. |
| Team Availability | Splits the path by how many team members are available. |
| Send an Email | Emails a verified address with the message details. |
| Send an SMS | Texts a number, such as the sender. You must select the From number. |
| Send WhatsApp | Sends a WhatsApp reply or an approved template. The trigger must be limited to WhatsApp. |
A message workflow does not need a final step. When a path ends without a reply, the message waits in the Inbox for a person. A Time Rule or Team Availability step still needs a step on both branches.
Make your agent reply to messages
- Make sure that the agent has Messages or Email turned on, and that it is published.
- Open the message workflow for the number, widget or inbox. You can use the default message workflow.
- Add an Agent step.
- In Agent, select the agent.
- In Mode, select Act or Draft.
- Select Publish.
Web Chat without an agent
If no workflow on a Web Chat widget has an Agent step, the widget tells the visitor that the team will follow up. The chat waits in the Inbox.
Common problems
Two workflows match, but only one reply goes. This is correct. The first workflow that reaches a reply sends it. Use filters so that each workflow matches different messages.
A Send WhatsApp step shows an issue. Set Channel in the trigger to WhatsApp only.
An automatic email does not start the workflow. Line does not run workflows for automated email, such as out-of-office replies. This stops email loops.