clickmax-webchat
Use when the user wants to create, inspect, edit, enable, or disable a Clickmax webchat bot (the embeddable chat widget channel) and its pre-chat bot flow — greetings, lead capture, clickable question
SKILL.mdskills/clickmax-webchat/SKILL.md
GitHubWhen this applies
Use this skill when the user wants a webchat bot: the chat widget embedded on their pages and the pre-chat flow that greets the visitor, captures name/email/phone, asks qualifying questions, and hands the conversation to a human attendant (LiveChat).
Not this skill:
WhatsApp/Telegram/Instagram conversations and automations →
clickmax-flowsanswering or assigning live conversations in the inbox → attendants/pipeline skills
a quiz page with scoring and result screens →
clickmax-forms-quizzes(a webchat question has no score)Read pre-chat flow whenever you author or edit
preChatFlow.steps— it has the exact step shapes and the branching rules, so you never guess a field.
Key assumptions
- One channel = one widget.
preChatFlowis ONE document ({enabled, steps});webchat_channel_updatereplaces it whole, there is no step-level upsert. enabled: falseon the CHANNEL takes the widget offline;preChatFlow.enabled: false(orsteps: []) keeps the widget up but skips the bot and opens live chat directly. They are different switches.- Every path of the flow must terminate in
handoff(a human takes over in LiveChat) orend. A path that falls off the array ends silently — the visitor is left without an answer. captureis what turns the visitor into a CRM lead; a flow without it can hand off an anonymous visitor.- Channels are created disabled. The user embeds the widget on a page; the bot only runs after
enabled: true.
Thought process
- Find or read the channel first (
webchat_channels_list→webchat_channel_get). - Draft the flow as a short script: greeting → capture → 1–3 qualifying questions → handoff/end. Keep it under ~8 steps; a widget is a conversation, not a form.
- Give every step a stable, readable id (
s_welcome,s_capture,q_goal,h_sales) and wirenextexplicitly wherever the array order is not the intended path. - Send the COMPLETE
stepsarray in onewebchat_channel_update. If it is rejected, fix that single payload against the reference shapes — do not create a second channel. - Leave
enabledas it is unless the user asks to publish; say what is pending (embed on a page, enable).
Execute guide
- Use
mcp__plugin_clickmax_clickmax__webchat_channels_listto find the channel by name/project when the user did not give an id. - Use
mcp__plugin_clickmax_clickmax__webchat_channel_getbefore any edit; keep the existing widget settings andappearanceuntouched unless asked. - Use
mcp__plugin_clickmax_clickmax__webchat_channel_updatewithpreChatFlow: { enabled: true, steps: [...] }to author the bot, and withnamewhen the channel still has a generic name. - Use
mcp__plugin_clickmax_clickmax__webchat_channel_createonly when the user asks for a NEW channel and none is open in the builder.
Build a flow from scratch
When the user says "create the webchat with AI" from the builder, the channel ALREADY EXISTS (empty, generic name). Build INTO it:
mcp__plugin_clickmax_clickmax__webchat_channel_getby the given id → readname,welcomeMessage,appearance.- Compose the steps (see pre-chat flow):
messagegreeting →capture(name + email, phone optional) →questionwith 2–4 clickable options per qualifying axis → optionalcondition/aibranching →handofffor hot paths,end(orhandoff) for the rest. mcp__plugin_clickmax_clickmax__webchat_channel_updatewith{ channelId, name: <short name from the goal>, welcomeMessage: <one-line greeting>, preChatFlow: { enabled: true, steps } }.- Report the path(s) and what is still pending (enable, embed).
Report
- Say the channel name, the number of steps, whether the flow captures the lead, and where each path ends (handoff or end).
- If the channel is disabled, say so and that enabling + embedding is the user's call.
- When offering a next-step CTA for the channel just built, point to the concrete builder route:
action="open-page"withpath="/marketing/webchat/<channelId>".
Warnings
- Do not create a second channel after a rejected update — fix the payload and retry on the same
channelId. - Do not send a partial
stepsarray:preChatFlowis replaced whole and the missing steps are gone. - Do not point
nextat an id that is not insteps(or at anything but"handoff"/"end") — the widget stalls there. - A
questionwith clickable options needs at least one option; free text isanswerMode: "text"withoptions: []. - Do not set
enabled: trueunless the user asked to publish.
Anti-patterns
- Building a 20-step interrogation; the visitor abandons the widget. Capture + 2–3 questions is the norm.
- Using a
questionfor name/email instead ofcapture— onlycaptureenriches the lead reliably. - Hard-coding an attendant in
handoff.assignTowithout a real user id — leave it out so the conversation lands in the open queue.
Clickmax skill revision: 30bc1243c2ed