How to Write Your First AI Workflow in Ensoras (WISMO Example)
Build your first Ensoras workflow in plain English. Walk through trigger strategy, confidence threshold, AI instructions, tools, and actions using WISMO as the example.
This guide walks through creating your first workflow in Ensoras. We'll use WISMO ("Where is my order?") as the example because it's the canonical first workflow and one of the highest-volume support categories on most ecommerce stores.
Before you start
You'll need:
- An active Ensoras project
- Shopify or another order-data integration connected (so the AI has order data to look up). The Shopify connection guide walks through that.
- A knowledge base with at least your shipping policy uploaded. The knowledge base guide covers that.
- 10 minutes
Step 1: Open the Workflows page
In your Ensoras admin panel, go to Automation > Workflows. You'll see your existing workflows (the Shopify integration creates several by default if you've connected) and a button to create a new one. Click New workflow.
Step 2: Fill in the basic information
The form opens with a Basic Information section:
- Workflow Name, be specific. "WISMO, Where is my order" is better than "Order status." The name is internal-only; customers never see it.
- Priority, High, Medium, or Low. Priority decides which workflow wins when two workflows could both match a message. WISMO is usually Medium because it's not an urgent escalation but it should match before generic catch-all workflows.
- Description, internal notes for your team. Useful when you have many workflows; not customer-facing.
Step 3: Set the trigger strategy
The Trigger Configuration section is where you tell Ensoras when to fire this workflow. The dropdown gives you five options:
- Ensoras Analysis (recommended) — the AI reads each incoming message and decides whether it matches your workflow's intent based on plain-English instructions you write. Most flexible.
- Keywords — fires when specific words appear in the message. You set the keywords and pick
match_type: anyorall. Fast but brittle (customers don't always use the words you predict). - Phrases — fires when specific phrases appear, optionally requiring word-for-word matching. Slightly more precise than keywords; still brittle.
- Regex Pattern — fires when the message matches a regex. Powerful for structured patterns (order numbers, tracking IDs); overkill for natural language.
- Intent Detection — uses the intent classifier service to detect a customer intent, falling back to keyword matching. Useful when you want layered detection.
Pick Ensoras Analysis for your first workflow. The other strategies are useful for specific cases later.
Step 4: Write the AI instructions for the trigger
When you pick Ensoras Analysis, the form shows two fields:
- Ensoras Instructions, plain-English description of when this workflow should fire. For WISMO: "Trigger when a customer is asking about the status, location, or delivery time of an order they've already placed. This includes questions like 'where is my order', 'has my package shipped', 'when will it arrive', 'tracking link broken', and similar phrasings. Do not trigger for pre-purchase questions about shipping rates or delivery times."
- Confidence Threshold, a slider from 0.0 to 1.0. Start at 0.70 for a first workflow. Lower values fire more aggressively (more matches, more false positives); higher values fire more conservatively (fewer matches, fewer false positives but more escalations).
The threshold is the most important tuning knob you'll touch. After your workflow runs on a few hundred real tickets, look at the matches: if the AI is firing the workflow on tickets it shouldn't have, raise the threshold. If the AI is escalating tickets that obviously should have matched, lower it.
Step 5: Write the AI instructions for what to do
The Ensoras Instructions section (different from the trigger one) is where you describe what the AI should actually do once the workflow fires. For WISMO, something like:
"When this workflow runs, look up the customer's most recent order using the Shopify Order Retrieve tool. If the order has a tracking number, reply with the carrier name, tracking link, current status, and estimated delivery date in a friendly tone. If the order has no tracking number yet but is still inside our standard processing window, explain that it's still being processed and give the expected ship date. If it's been longer than that with no tracking, escalate to a human and let the customer know someone will follow up shortly."
Notice the structure: it tells the AI what to do, how to handle the main case, and what to do in edge cases. The clearer this instruction, the more predictable the AI's behavior.
Step 6: Pick available tools
The Ensoras Tools Configuration section is a multi-select listing every tool currently set up in your project. Pick only the tools the AI needs for this workflow.
For WISMO, the typical set:
- The Shopify order lookup tool (matches what the workflow's instructions reference)
- The Shopify customer lookup tool (so the AI can identify the customer when needed)
- A knowledge base search tool (for policy questions that come up alongside order status)
Don't pick tools you don't need. If WISMO has access to the refund tool, the AI might use it inappropriately. Tight tool scope keeps each workflow focused.
Step 7: Pick available actions
The Available Actions section is similar but covers the discrete operations the AI can take after responding (tagging the ticket, changing status, sending a Slack notification, etc.). For WISMO, useful actions:
- Tag ticket as "wismo-resolved" so you can track WISMO volume in your reports
- Change ticket status to closed if the AI's reply fully answered the question
You can leave actions empty for a first workflow and add them later.
Step 8: Set the active channels
The Channel Configuration section controls which channels this workflow runs on. For most workflows, leave it blank (which means "all channels"). Use it when:
- You want a workflow to run only on email but not chat (or vice versa)
- You have channel-specific behavior, for example, a workflow that handles legal-language escalations might only need to run on email since live chat already has different escalation rules
For WISMO, leaving it blank is right.
Step 9: Add behavior instructions
The Response Personality & Guidelines section is for tone and style. For most workflows, you can leave this blank if you've set a project-wide AI configuration (in Automation > Configuration). For WISMO specifically, useful additions:
"Keep replies under three short paragraphs. If the customer's order is delayed, lead with sympathy before getting to the data. Never use phrases like 'kindly note' or 'please be advised', they sound robotic."
Step 10: Save and test
Save the workflow. It's now live for the active channels. Send yourself a test message that should match: "Hi, can you check on my recent order?"
In your Ensoras admin panel, find the resulting ticket and check the conversation log. You should see:
- The message arriving as a new ticket
- Ensoras matching this workflow (look for the workflow name in the tool execution log)
- The AI invoking the order lookup tool
- The AI sending a reply with the order data
If the workflow doesn't match, check your trigger instructions and threshold. If it matches but the reply is wrong, check the tool list and the AI instructions for the action.
A more careful rollout
If you'd rather review the AI's behavior before customers see it, turn on Require approval for AI replies in your project's AI settings. The AI drafts every reply and the ticket sits in Awaiting approval for a human to review. You see exactly what the AI would have sent, edit if needed, and click send. Turn approval off when you're ready for the AI to send autonomously.
The approval flow is also useful for spotting trigger or instruction tweaks you want to make before the AI runs unattended.
Common issues
The workflow doesn't fire on messages that obviously match. Either the trigger instructions are too narrow (rewrite them with more variations) or the confidence threshold is too high (lower from 0.70 to 0.60 and try again).
The workflow fires on messages it shouldn't. Either the trigger instructions are too broad (rewrite to exclude the cases that shouldn't match, explicitly call them out, e.g., "do not trigger for pre-purchase shipping questions") or the threshold is too low (raise from 0.70 to 0.80).
The AI replies but doesn't use the right tool. The tool isn't in the Available Tools list for this workflow, or the AI Instructions for the workflow don't reference the tool by name. Both fixes are quick.
The reply tone is off. Add specific guidance to the Response Personality section. The AI inherits your project-wide configuration but workflow-specific tweaks override.
What this unlocks
A working WISMO workflow handles 40–60% of typical ecommerce inbound volume autonomously. The AI runs the lookup, builds the reply, sends it. Your team stops typing the same five-line response over and over and starts spending their time on the actually-hard tickets.
After WISMO is solid, the natural next workflows: returns initiation, address changes, subscription edits. The What to Automate First tier list covers the order to attack categories in.
What to do next
- Install Ensoras free — Shopify App Store, WordPress plugin, or direct sign-up. 10 minutes. 30 tickets/month free, no credit card.
- Build your first workflow following the steps above (use WISMO if you're starting fresh).
- Send yourself a test message that should match. Watch the AI invoke the right tool and reply correctly.
- Configure refund automation when you're ready to graduate from "AI answers questions" to "AI takes actions."
For the deeper take on writing rules that hold up in production, see the When/If/Then framework.
Sources
- Anthropic, Building effective agents, model-provider research on the structured-trigger / bounded-action pattern that workflow design relies on.
- OpenAI, Function calling documentation, official documentation on the tool-calling behavior that workflows use under the hood.
Frequently asked questions
Do I need to know how to code to write a workflow?
No. Ensoras workflows are described in plain English. You write what should trigger the workflow, what the AI should do, which tools and actions are available, and which channels apply. The AI handles the technical execution.
What's the difference between a workflow and a tool?
A tool is a single capability (look up an order, process a refund, search the knowledge base). A workflow is the higher-level rule that decides when the AI is allowed to use a set of tools. You can think of tools as verbs and workflows as the policies that say which verbs apply when.
Should I create one big workflow or many small ones?
Many small ones. One workflow per ticket category gives you cleaner control, easier debugging, and per-category confidence thresholds. The default Shopify integration creates separate workflows for WISMO, returns, refunds, and so on for exactly this reason.
What does the confidence threshold actually do?
When a customer message comes in, Ensoras assesses how confidently it can match the message to your workflow's intent. If the confidence score is at or above your threshold, the workflow runs. Below the threshold, the workflow doesn't run and the AI either tries another workflow or escalates to a human.
How do I know if the workflow is working after I save it?
Send a test message that should match the workflow's trigger and watch what happens in the conversation log. If the AI invokes the right tools and replies correctly, you're done. If it doesn't, the most common cause is a misspelled tool name in the workflow's Available Tools list or a confidence threshold set too high for the test message.