Build your first chat workflow
This tutorial walks you through a simple chat workflow: during opening hours, customers choose from a short menu and can wait for an agent, and outside opening hours they get a closed message.
Start here → Check opening hours ─ Open ────→ Menu selection "How can we help?"
├ Talk to an agent → Queue → End conversation
└ Opening hours ───→ Send message → End conversation
├ Closed ───→ Send message "We're closed" → End conversation
└ Holiday ──→ (same as Closed)
It takes about 15 minutes. For details on any node, follow the links to the Chat workflows reference.
Before you start
- You need access to the Chat section of the Graia CCaaS Portal. Access depends on your role.
- You need a webchat channel to connect the workflow to, and a web page where its widget is embedded so you can test it. You can also use another chat channel, such as WhatsApp.
- Your channel's opening hours and holidays are set on the channel's Business hours tab. The workflow uses them in step 3.
1. Create the workflow
- In the portal, go to Chat › Workflows and click Create.
- Give the workflow a name. Include the media type and purpose, for example Chat - Website support. See the naming best practices.
- Leave the Idle timeout at its default of 1440 minutes (24 hours) for now. If neither the customer nor the agent sends a message for this long, the conversation closes. See Idle timeout.
- Click Create. The workflow designer opens with a Start here node.
2. Add your first node
Every node is added the same way: click the black dot on a node's output and drag it in any direction. A menu opens where you choose the next node. See Start Here.
3. Check the opening hours
- Drag from Start here and choose Check opening hours.
- The node has three outputs:
- Open: the channel is within business hours.
- Closed: the channel is outside business hours.
- Holiday: the channel is closed for a holiday.
You'll connect each output in the next steps. See Check opening hours.
4. Offer a menu
- Drag from the Open output and choose Menu selection.
- Enter the question, for example Hi! How can we help you today?
- Add two suggested replies: Talk to an agent and Opening hours. The customer sees them as buttons. Each reply gets its own output on the node.
If the customer types something other than one of the replies, the node keeps waiting for a valid choice. See Menu selection.
Tip
On WhatsApp, a suggested reply can be at most 20 characters long.
5. Queue the chat for an agent
- Drag from the Talk to an agent output and choose Queue.
- Set up the queue. The Queue node is the queue itself:
- Give it a name, for example Website support.
- Choose its routing mode: automatic, manual or hybrid. You can't change the routing mode later. See Queue routing.
- Optionally, enter a Connect Message that the customer gets when an agent joins, for example You're now chatting with {Agent.DisplayName}.
- Drag from the queue's AgentDisconnect output and choose End conversation. This ends the chat after the agent closes it.
AgentDisconnect is the only queue output you must connect in this workflow. Other outputs become required when you use the matching options, such as a queue timeout or a maximum queue size. See Queue outputs.
6. Answer the opening hours question
- Drag from the Opening hours output of the menu and choose Send message.
- Enter a message such as We're open 9:00 to 17:00, Monday to Friday. See Send message.
- Drag from the message's Then output and choose End conversation.
7. Handle closed hours and holidays
- Drag from the Closed output of Check opening hours and choose Send message.
- Enter a message such as Our team is offline right now. We're open 9:00 to 17:00, Monday to Friday.
- Drag from this message's Then output and choose End conversation.
- Connect the Holiday output to the same closed message. To connect an output to an existing node, select the output and use the search field to find the node. See Search for a node.
8. Save the workflow
Click Save at the top left of the designer.
If Save is disabled, a node still has a problem: look for a warning triangle in the node's header, or click the triangle in the designer toolbar at the bottom left to jump to it. Mandatory fields are marked with a red asterisk, and unconnected mandatory outputs with a red circle. See Saving a workflow.
9. Connect the workflow to a channel
A workflow only receives chats once a chat channel uses it.
- Go to Chat › Webchat.
- Open your channel, or click Create to make one.
- On the Channel details tab, select your new workflow in the workflow drop-down.
- Save the channel.
10. Test it
Open the web page where the channel's widget is embedded and start a chat:
- During opening hours, you should get the menu. Click Opening hours to get the hours message, then the chat ends. Start a new chat and click Talk to an agent: if an agent in the queue is available, the chat is offered to them.
- Outside opening hours, you should get the closed message, and then the chat ends.
Next steps
- Ask customers to rate the chat with Customer satisfaction on the queue's AgentDisconnect output.
- Let an AI bot answer questions first with Conversational bot.
- Set what customers see while they wait with chat queue treatments.
- Browse all node types in the Chat workflows reference.