Home AI agent

AI agent

Speed up your support with AI
13 articles

Introduction to the AI agent

What is the AI Agent? The AI Agent is an autonomous support bot that handles customer tickets without human intervention. Built specifically for Shopify stores, it manages common support tasks that plague e-commerce stores. You can customize its tone, leverage your store data, and provide specific instructions for handling tickets. When enabled, the AI Agent is automatically assigned to new tickets and responds immediately unless configured otherwise. Human agents can remove the AI Agent from any conversation as needed. Key Features Require approval Not ready to let AI respond on its own? Enable "Require approval" and your team reviews every message and action before it reaches the customer. Approve, edit, or hand over. The safest way to get started. Playground Test the AI Agent safely by simulating conversations using your actual Shopify customer data. Shopify Actions The agent performs essential e-commerce tasks: - Order tracking and shipping updates - Address modifications - Order cancellations - Item replacements (size, color changes) - Order tagging - Standard helpdesk functions (ticket assignment, private notes) Knowledge & Guidance Train the agent using your store's products, store pages, help articles, canned responses, text snippets and custom guidances for specific support scenarios. Commslayer also auto-suggests saving knowledge when your team responds to AI handovers or edits AI drafts. Multi-Platform Support Deploy across email, live chat, direct messages, and social media comments. Ask human agent When the AI gets stuck, it can pause and ask your team for input instead of handing over the entire conversation. The answer is saved to AI knowledge so the AI learns for next time. Common Questions How do I prevent hallucinations? The agent is programmed to handover tickets when uncertain about available knowledge or guidance. The most effective prevention method is rigorous testing in the Playground using your historical tickets. Users who thoroughly test against old tickets see the best results. Can I limit which tickets the agent handles? Yes, in two ways. Start with Require approval mode so the AI drafts responses but nothing is sent without your team's review. Once you're confident, turn off approval and use "Restrict to enabled intents" so the AI only handles tickets that match your guidance scenarios. Everything else gets handed over to your team. What model powers the agent? We use multiple providers with proprietary technology for testing, evaluation, and tool execution. Our agent reliably follows complex, multi-step processes without the $1-per-ticket costs charged by other platforms. How do I add custom documents to the knowledge base? Copy your documentation into help center articles and leave them in draft status. Control which articles the AI Agent accesses through Knowledge settings. Alternatively, add text snippets to cover specific topics, FAQs, or policies directly. PDF and spreadsheet uploads are not currently supported. Does the agent work with multiple stores? The AI Agent functions across all stores connected to your account, but shares knowledge between them. For separate brands, use distinct Commslayer accounts (easily switchable via the top-left dropdown menu). Can the agent process customer images? Yes! AI agent is able to access and analyze pictures sent by customers.

Last updated on Feb 23, 2026

How to setup the AI agent

Setting up the AI agent takes about 10-15 minutes if you know your products well. 1. Add knowledge The AI agent answers questions based on what it knows. Before it can help customers, you need to give it knowledge. Navigate to AI Agent → Knowledge and add your store information: Help articles - Create articles in the Help Center with answers to common questions. The AI will reference these when responding. Good starting articles: - Shipping and delivery times - Return and refund policies - Product care instructions - Common troubleshooting steps Text snippets - Short knowledge pieces covering policies, FAQs, and specific topics. You can also save good responses from conversations directly to AI knowledge. Guidance - Give the AI specific rules and instructions. For example: "Always offer free shipping on orders over $100" or "Never promise delivery dates." The more knowledge you add, the better the AI performs. Start with your most common questions. 2. Configure actions Actions let the AI do things, not just answer questions. Navigate to AI Agent → Actions and review what's available: Shopify actions - The AI can look up orders, check tracking status, update shipping addresses, and more. These connect directly to your Shopify store. Custom actions - Create your own actions with a URL and instructions. For example, you can let the AI check a custom loyalty points system. Toggle on the actions you want the AI to use. 3. Clarifying questions When the AI doesn't have enough information to help, it can ask the customer a clarifying question. Navigate to AI Agent → Clarifying questions to set these up. For example, if a customer asks about their order but doesn't provide an order number, the AI can ask for it. Answers are automatically saved to AI knowledge, so the AI won't need to ask the same question again. 4. Set AI behavior Navigate to AI Agent → Settings and configure: Inbox assignment - Choose which inboxes the AI monitors. The AI only responds to conversations in selected inboxes. Auto-resolve - Automatically close conversations after the AI successfully helps. You can set a delay (e.g., resolve after 2 hours if no reply). Handoff rules - Define when the AI should stop and hand off to a human agent. For example, hand off when a customer mentions a refund or uses angry language. 5. Test before going live Use the Playground (AI Agent → Playground) to test the AI before it talks to real customers. Send test messages and see how the AI responds. If a response isn't right, you can: - Add or update knowledge to fill gaps - Adjust guidance to change behavior - Add a response example to show the correct approach 6. Enable the AI When you're happy with the AI's responses, go to AI Agent → Settings and toggle the AI on for your inboxes. The AI will now monitor new conversations and respond automatically. Tips for better performance Start narrow - Enable the AI for one inbox first. Learn how it performs before expanding. Review conversations - Check conversations where the AI responded. Look for gaps in knowledge or wrong answers, and fix them. Use CSAT feedback - If customers rate interactions poorly, investigate what went wrong and improve the knowledge base. Refine over time - The AI improves as you add more knowledge and examples. Regular maintenance pays off. What the AI won't do The AI is designed to be helpful and safe. It will not: - Make promises you haven't approved in guidance - Take actions you haven't enabled - Respond to inboxes you haven't selected - Continue a conversation after a human agent takes over

Last updated on Feb 23, 2026

Training the AI agent

Your AI agent learns from two sources: Knowledge and Guidance. Knowledge is the information your AI agent can look up: help articles, canned responses, products, and past support conversations. The AI searches this automatically when customers ask questions. Guidance is custom instructions you write to handle specific scenarios. Think of it like training a new teammate: you explain when a situation applies and exactly how to handle it. Where to start 1. Test in the playground Before changing anything, try your AI agent in the playground. Send it some test messages to see how it responds out of the box. This helps you understand what it can already do and where it needs guidance. Go to AI Agent → Playground to start a test conversation. 2. Add guidance for common scenarios Most support questions fall into a few categories: shipping status, returns, damaged items, order changes. Create guidance rules to handle these scenarios the way you want. Writing guidance → 3. Build knowledge over time As you handle real conversations, save great responses as text snippets. Add help articles and canned responses to give your AI more information to work with. Commslayer also helps by automatically suggesting knowledge to save. When your team responds after an AI handover or edits an AI draft, you'll see a suggestion to save that response as a text snippet. Knowledge sources → Reference AI agent capabilities and actions → Custom actions →

Last updated on Feb 23, 2026

Writing guidance

Guidance rules tell your AI agent how to handle customer scenarios. Each rule has four parts: - Title — Short name (e.g., "WISMO: Regional delivery timeframes") - Description — WHEN to trigger: the topic or customer situation - Instructions — HOW to handle it: specific scenarios and conditions - Status — disabled, testing (playground only), or enabled (live) Writing descriptions The description defines WHEN this guidance triggers. It can be broad—specific scenarios go in the instructions. Examples: - "Customer inquiries about order location, delivery status, shipping updates, tracking information, or asking 'where is my order'" - "Customer wants to return an order or item" - "Customer reports product arrived damaged, broken, or defective" Writing instructions Instructions tell the AI HOW to handle the situation. Break them into scenarios with clear conditions. Example: WISMO with regional timeframes Title: WISMO: Regional delivery timeframes Description: Customer inquiries about order location, delivery status, shipping updates, tracking information, or asking variations of 'where is my order/package/shipment.' Includes questions about delivery timing, order progress, or shipping delays. Instructions: Scenario 1: No tracking available yet Trigger: Customer asks for tracking and no tracking number is available IF order created less than 2 business days ago: - Inform tracking will be available once dispatched, usually within 24 hours - Processing can take up to 3 business days during busy periods - Advise customer to check back later IF order created more than 2 business days ago: - Apologize for the shipping delay - Escalate to an agent Scenario 2: Tracking available, not delivered Trigger: Order has tracking but not yet delivered Delivery timeframes by region: - USA: 5-9 business days - Canada: 5-9 business days - UK: 5-7 business days - Australia: 5-9 business days - Other countries: 10-15 business days Calculate expected delivery using order date plus regional timeframe. IF order is on time: - Share tracking information - Assure: "We're closely monitoring every shipment to make sure it arrives safely." IF order is behind by less than 2 business days: - Advise customer to wait an additional 2 days due to possible delays IF order is delayed by more than 2 business days: - Escalate to an agent Scenario 3: Marked delivered, not received Trigger: Customer reports order marked delivered but not received Ask customer to verify: - Neighbor, roommate, or doorman accepting package - Shipping address is correct - Carrier contacted for delivery details - Package left in discreet location Next steps: - Ask customer to wait 2 business days after posted delivery date - Share tracking info and shipping address - If verification done and 2+ days since marked delivered, escalate to agent Example: Damaged item reports Title: Damaged or defective item reports Description: Customer reports product arrived damaged, broken, defective, or not as described Instructions: Check if customer has an order - No match → Ask for order number and checkout email If multiple items: Ask which specific item was damaged Request photo(s) of damaged item(s) for assessment Review damage policy and explain options: "We stand behind the quality of our products. If your item arrived damaged: - Report within 7 days of delivery for fastest resolution - Replacement ships within 1-2 business days at no cost - Full refunds available if replacement isn't preferred - Keep the damaged item - no need to return unless requested" Example: Influencer collaboration Title: Influencer collaboration requests Description: Customer inquires about partnerships, collaborations, sponsorships, influencer opportunities, or brand partnerships Instructions: Step 1: Initial response - Thank customer for their interest in partnering - Express enthusiasm about potential partnership - Ask about collaboration details: rates, content requirements, deliverables Step 2: Assess partnership type IF customer proposes paid partnership: - Explain current partnership model available - Outline affiliate program terms: - Commission rate: [INSERT PERCENTAGE] - Product allocation: [INSERT DETAILS] - Content requirements: [INSERT DELIVERABLES] Step 3A: Customer agrees to affiliate terms IF customer agrees: - Collect: name, email, phone, shipping address - Label conversation: [INSERT LABEL] Step 3B: Customer declines IF customer declines: - Thank them for their time - Express openness to future partnerships - Label conversation: [INSERT LABEL] Key principles 1. Use scenarios for different situations Don't handle everything in one block. Break into Scenario 1, Scenario 2, etc. 2. Include specific timeframes and thresholds "2 business days", "5-9 business days", "within 7 days" — not "soon" or "quickly" 3. Define clear escalation rules Be specific: "delayed by more than 2 business days" not just "if there's a problem" 4. Tell the AI what to DO, not what to SAY - Good: "Apologize for the delay and share tracking" - Bad: "Say: Dear customer, we sincerely apologize..." 5. Reference actions naturally - "Escalate to an agent" - "Resolve the conversation" - "Leave private note about shipping damage" - "Label conversation: [tag name]" You can also trigger custom actions to send data to external systems like Zapier, n8n, or Google Sheets. 6. Include verification steps when needed - "Request photo of damaged item" - "Ask for order number and checkout email" - "Confirm with customer it's the correct order" Common mistakes Missing scenarios Not covering different situations (tracking available vs not). Fix: Break into separate scenarios with triggers. Vague thresholds Using "if delayed" instead of specific timeframes. Fix: "Delayed by more than 2 business days" No escalation rules AI doesn't know when to hand over to a human. Fix: Define specific conditions for escalation. Over-scripting Writing full customer messages instead of instructions. Fix: Write instructions, not scripts. Overriding defaults Trying to change automatic behaviors like pending status. These can't be changed via guidance. See AI agent capabilities and actions for details. Troubleshooting Wrong guidance triggering Your guidance is enabled but a different rule is matching instead—sometimes even a disabled one. Fix: Check if another guidance has overlapping or broader triggers. Either: - Adjust the triggers to be more specific - Remove or disable the guidance that's incorrectly matching For example, if you have both a general "shipping inquiries" guidance and a specific "WISMO" guidance, the broader one may match first. Consider consolidating related scenarios into one guidance rule or making triggers mutually exclusive. Testing guidance 1. Set status to "testing" (active only in playground) 2. Simulate real conversations in playground 3. Test each scenario path 4. Adjust and re-test 5. Set to "enabled" when ready

Last updated on Feb 03, 2026

Knowledge sources

Your AI agent automatically searches these sources when responding to customers. Knowledge is provided dynamically based on how well information matches the customer's request. Help articles Articles from your help center. The AI searches article titles and content to find relevant information. Tip: Write articles that answer common customer questions. The more comprehensive your help center, the better your AI agent can self-serve. Text snippets Short pieces of knowledge your AI agent references when responding to customers. Use them to document policies, FAQs, product details, or anything your AI should know. To create a text snippet: 1. Go to AI agent → Text 2. Click Add text 3. Enter a Title (e.g., "What's your warranty period?") and the Content the AI should know about this topic The AI searches your snippets to find relevant info when responding to customers. Canned responses Pre-written message templates. Create these for frequently used responses like return instructions or shipping policies. To create a canned response: 1. Go to Settings → Canned responses 2. Click Add canned response 3. Enter a short code (e.g., "feature-request") and the response content Shopify products If you've connected Shopify, your AI agent can look up product details including titles, descriptions, pricing, and availability. Shopify orders Your AI agent can retrieve order information including status, tracking numbers, and order history for identified customers. Knowledge suggestions Commslayer automatically suggests saving knowledge when your team fills in where the AI left off. Suggestions are triggered in two cases: - Human responds after AI handover. The AI didn't have the answer, so a human stepped in. That response is a good candidate for saving. - Human edits an AI draft before sending. The edit signals the AI's answer wasn't quite right. The corrected version gets suggested as a text snippet. How it appears: A card shows up in the conversation below the human's message. It contains a generated title and the option to save or dismiss. Saving a suggestion: Click Save to open a modal where you can review and edit the content before saving it to AI knowledge. Dismissing: Click Dismiss to hide the suggestion if it's not useful. Bulk management: Suggestions also appear in AI agent → Knowledge gaps → Suggestions, where you can review, save, or dismiss them in bulk.

Last updated on Feb 27, 2026

AI agent capabilities and actions

Your AI agent can perform different types of actions. Some happen automatically, some need to be enabled, and some behaviors can't be changed. The AI agent also has an optional "Require approval" mode where all messages and actions must be approved by an agent before executing. See the setup guide for details. Information lookup (automatic) The AI automatically searches when relevant: - Help articles - Your knowledge base content - Canned responses - Pre-written templates - Shopify products - Product details, pricing, availability - Shopify orders - Order status, tracking, history Conversation actions (always available) These are always available to your AI agent: - Respond to customer - Send messages to customers - Hand over to human agent - Transfer to your team - Ask human agent - Pause and ask your team for input instead of handing over entirely. Must be enabled in AI agent settings. The AI posts an internal question, a human provides the answer, and the AI uses it to respond to the customer. The answer is automatically saved to AI knowledge for future conversations. - Resolve conversation - Close completed tickets - Snooze conversation - Pause until a specific time - Assign to agent or team - Route to the right person - Add or remove labels - Categorize conversations - Add private notes - Internal documentation Shopify actions (must be enabled) The AI agent can automatically handle common customer requests by performing actions in Shopify. This eliminates delays when customers need immediate changes to their orders, especially outside business hours. These actions must be enabled in Settings → AI Agent → Actions: Cancel order Cancels an unfulfilled Shopify order completely. This will cancel all unfulfilled items, stop pending fulfillment, automatically restock products, process a full refund, and send a confirmation email. If the order is already fulfilled/shipped, the agent will explain that cancellation is no longer possible. Edit order items Replaces or swaps items in a Shopify order (e.g., different size/color). The agent will ask which item to remove and what to add, check stock availability, restock removed items, and handle payment adjustments. For price increases, creates a handover to your team for additional payment. For decreases, automatically refunds the difference. Remove items from order Removes specific items from a Shopify order when customers change their mind. The agent will confirm which items to remove, restock them in Shopify, refund the amount for removed items, and send a confirmation email. Change shipping address Updates the delivery address for a Shopify order. The agent will verify the new address with the customer before making the update. Hold order fulfillment Temporarily pauses the fulfillment process. Useful when you need to make changes, verify information, or resolve issues before shipping. Tag Shopify order Adds custom tags to orders for organization and tracking (e.g., "urgent", "gift", "review_needed"). Issue full refund Processes a complete refund for all items in a Shopify order. Use with strict guidance as this refunds the entire order value. Using actions in guidance Once enabled, reference actions naturally in your guidance instructions: 1. Check if the order is unfulfilled 2. If unfulfilled, apologize and cancel the order 3. Confirm the cancellation and explain refund timing 4. Resolve the conversation The AI recognizes action phrases and performs them automatically: - "Cancel the order" → Executes cancel - "Hold fulfillment" → Pauses shipping - "Add tag: rush-delivery" → Tags the order - "Assign to returns team" → Routes conversation - "Escalate to human" → Hands over to agent Enabling Shopify actions Navigate to AI agent → Actions to enable Shopify actions. Each action can be individually enabled or disabled. Click "Edit" to configure conditions that must be met before the AI executes each action. Setup requirements: - If you installed Commslayer before August 2025, reauthorize your Shopify connection in Settings → Shops to grant order editing permissions - Each action requires individual activation using the toggle switches Extend with custom actions Need to connect your AI agent to external systems? Custom actions let you trigger HTTP webhooks to tools like Zapier, n8n, or your own APIs. - Custom actions → - Build a shipping issues tracker → Default behaviors Some AI agent behaviors are automatic and cannot be changed via guidance. Pending on reply When the AI responds and expects the customer to reply, the conversation moves to "pending" status automatically. The AI determines whether it expects a reply based on context (e.g., asking a question vs. providing final information). You can customize what happens when a customer doesn't respond. Go to AI agent → Settings under "Use pending status" to configure: - Enable/disable pending - Turn the automatic pending behavior on or off - Timeout - How long to wait for a customer reply. Options: wait forever (default) or set a custom time in minutes, hours, or days - Post-timeout action - What happens when the timeout expires: do nothing (default), hand over to a human agent, resolve the conversation, or send a follow-up message About the follow-up option: "Send follow-up" is available for email channels only. The AI sends a brief check-in asking if the customer still needs help. If the customer doesn't reply after the follow-up, the conversation is resolved automatically. For non-email channels, the follow-up option falls back to resolving the conversation. Default settings: pending enabled, wait forever, do nothing. Order lookup and customer verification The AI agent has built-in order lookup and identity verification. You don't need to write guidance for this. How it works: - Email/SMS channels: Customer identity is automatically verified from the channel (their email address or phone number) - Chat and other channels: The AI asks for their email or phone, then verifies it against the order What happens automatically: - Customer asks about "my order" → AI finds their latest order by verified email/phone - Customer provides order number → AI verifies it belongs to them before sharing details - Customer wants to cancel/edit → AI confirms identity first, then proceeds If verification fails: - Email/phone doesn't match the order → AI does not share order details or make changes - AI asks if they used a different email or phone at checkout - If still no match → AI hands over to a human agent You cannot customize: - The verification flow or what information is required - The matching logic (email/phone to order) - When verification is triggered

Last updated on Feb 23, 2026

Testing the AI agent

The playground lets you safely test your AI agent before deploying it with real customers. You can experiment with responses, test guidance, and ensure everything works correctly without affecting actual customer interactions. What is the playground? The playground is a simulation environment where you can chat with your AI agent using real customer data from your Shopify store. Test different scenarios, validate responses, and refine your AI agent's behavior before enabling it on live conversations. You can find the playground by navigating to AI agent → Playground or simply clicking the Test button on other AI agent pages, which opens the playground on the side of the page. Good to know: The playground uses a default @playground email that doesn't exist in Shopify. This means order lookups, customer verification, and Shopify actions won't work with the default contact. To test order-related scenarios, either simulate a real customer (click the contact selector next to the channel picker) or replay an existing conversation. Testing your AI agent Chat directly Type questions and messages to see how your AI agent responds. Test various customer scenarios and language patterns to ensure appropriate responses. Replay existing conversations Import previous customer interactions using the Test button found below any customer message in your conversation history. This lets you test how your AI agent would handle real-world scenarios with real order data from your actual support tickets. Select channel Choose which channel you want to simulate - email & DMs, chat, or social media comments. The AI agent will adapt its tone and response style according to the selected channel. Simulate customers Pick specific customers to simulate by searching their name or email address. This is required for testing order lookups and Shopify actions, since the AI agent verifies the customer's identity against Shopify before sharing order details. Select a customer with recent orders to use their real order data in your test. Simulated actions Actions in the playground are simulated only - no actual changes are made to Shopify orders or conversations. This allows safe testing of order modifications, refunds, and other actions without affecting real customer data. The AI agent will show you what actions it would perform, but your Shopify store and customer conversations remain unchanged. Managing AI knowledge If you notice issues like repetitive canned responses or inappropriate knowledge sources, visit the Knowledge page. You can exclude or edit problematic knowledge sources to help your AI agent respond more naturally and effectively. Regular testing in the playground helps identify knowledge gaps and ensures your AI agent provides consistent, accurate responses across all customer interactions.

Last updated on Feb 06, 2026

Enable AI agent without blowing up your support inbox

The safest way to deploy an AI agent is to start supervised and gradually give it more autonomy. Enable the AI agent, review its work, then expand as you build confidence. New to AI agents? Read our Introduction to the AI agent guide first to understand the basics, including Knowledge sources, Guidance, and Shopify Actions. 1. Start with Require Approval Mode Turn on Require approval in AI agent → Settings before enabling the agent on any inbox. In this mode, the AI drafts messages and plans actions, but nothing reaches the customer until a human agent reviews it. For each pending item, your team can: - Approve the draft as-is - Adjust it (loads the draft into the reply editor so you can edit before sending. The AI stays on the conversation and picks back up when the customer replies.) - Hand over to take full control of the conversation Conversations waiting for review show up in AI agent → Needs approval in the sidebar. This lets your team see exactly how the AI handles real tickets without any risk of bad responses reaching customers. 2. Test in the Playground Alongside live approvals, use the AI agent → Playground to test specific scenarios safely. The Playground simulates conversations using your actual Shopify customer data: - Chat directly with your AI agent using different customer scenarios - Replay existing conversations from your ticket history - Select specific customers to test order-related scenarios with real order data - Test Shopify Actions safely (simulated only, no real changes made) Testing checklist: - Test common scenarios with 5-10 real customer messages - Use the Replay feature on historical tickets - Verify response accuracy, tone, and any automated actions - Check edge cases and unexpected customer phrasing - Use Revise answer to correct poor responses Learn more: Read our detailed Playground guide for step-by-step testing instructions. Need help writing effective guidance? Check our Knowledge & Guidance guide for detailed examples and best practices. 3. Write Guidance for Patterns You See After a few days of approving AI responses, you'll notice patterns: the same types of questions keep coming up. Write guidance rules for these scenarios so the AI handles them consistently. Start with your highest-volume, lowest-complexity requests: - "Customer asking about order status" - "Customer wants to cancel their order" - "Customer received wrong item" - "Customer asking about return policy" - "Customer reporting damaged product" Test each guidance rule in the Playground, then continue monitoring through approval mode until you're confident. 4. Turn Off Approval and Restrict to Enabled Guidance Once you have at least 5 well-tested guidance scenarios and you're confident in the AI's responses, you can turn off Require approval and let the AI respond autonomously. To stay in control, enable "Restrict to enabled intents" in AI agent settings: - When enabled: The AI only responds to tickets that match your guidance scenarios. Everything else gets handed over. - When disabled: The AI may attempt to answer any message using general knowledge, which can lead to unexpected replies. ⚠️ Minimum 5 guidance scenarios required. With fewer than 5, the AI may incorrectly match customer messages to unrelated scenarios. The AI needs enough variety to distinguish between different types of requests. Alternative: If you want the AI to handle a broader range of tickets using general knowledge, leave "Restrict to enabled intents" off. Just monitor responses closely. 5. Use Clear AI Agent Identification Configure your agent's name and signature to make it obvious that responses come from AI, not a human agent. Recommended format: - Name: "AI Assistant" or "[Your Company] Bot" - Signature: "This response was generated by AI. Need human help? Just ask!" This sets proper customer expectations and reduces confusion if the AI responds incorrectly. 6. Disable Conflicting Automations Before enabling your AI agent, turn off these features to prevent message conflicts: - Business hours settings that send automated responses - "Send message" automations such as auto-replies These can trigger unnecessary messages and create confusing customer experiences when combined with AI agents. 7. Set Up Knowledge Sources Before going live, review the knowledge sources your AI agent has access to: Essential knowledge sources: - Help articles - Your help center content (can be kept in draft status) - Canned responses - Templates your human agents use - Text snippets - Short knowledge pieces covering policies, FAQs, and specific topics - Shopify products - Your product catalog (automatically synced) - Shopify website pages - Store content and policies Knowledge management tips: - Review AI agent → Knowledge sources to see what's available - Exclude irrelevant or outdated content that might confuse responses - Add text snippets for common scenarios not covered elsewhere - Keep help articles in draft if you only want the AI to access them Detailed setup: Our Knowledge & Guidance guide explains how to configure each knowledge source. 8. Configure Shopify Actions (If Needed) If your guidance scenarios involve order changes, enable the appropriate Shopify Actions: Popular starter actions: - Get latest order information - Add order tags - Change shipping addresses - Cancel unfulfilled orders Setup requirements: - Navigate to AI agent → Actions to enable specific actions - If you installed Commslayer before August 2025, reauthorize your Shopify connection - Each action requires individual activation and condition setup Important: Actions only execute when the AI agent is confident. Uncertain situations automatically escalate to human agents. Learn more: Read our Shopify Actions guide for complete setup instructions and available actions. Rollback Plan Have a clear process for quickly disabling the AI agent if issues arise: 1. Immediately disable problematic guidance scenarios in AI agent → Guidance 2. Notify your support team of any customer confusion 3. Review and adjust guidance instructions based on issues found 4. Re-test thoroughly in the Playground before re-enabling Good to Know - AI agents include natural response delays on emails and social media comments - The AI agent is programmed to hand over tickets when uncertain. This prevents hallucinations. - The AI agent can ask your team for input instead of handing over entirely. When stuck on a question it can't answer, it pauses and asks a human agent internally. Enable this in AI agent → Settings. - Regular Playground testing helps identify knowledge gaps and improve responses Related Guides - Introduction to the AI agent - Complete overview of features and capabilities - Training the AI agent - How to train your AI agent with store information and custom instructions - AI agent actions - Automate order management with AI-powered actions - Testing the AI agent - Step-by-step testing and validation instructions Quick Start Checklist - Read the Introduction to the AI agent overview - Enable "Require approval" in AI agent settings - Enable the AI agent on your inbox - Review and approve AI responses for a few days - Write guidance for the most common ticket types you see - Test each guidance rule in the Playground - Once you have 5+ tested guidances, turn off approval and enable "Restrict to enabled intents" - Configure clear AI agent name and signature - Set up relevant Knowledge sources - Enable Shopify Actions if needed - Disable conflicting business hours and auto-reply settings - Monitor performance and expand gradually

Last updated on Feb 23, 2026

Connect AI agent to external systems with custom actions

Custom actions let your AI agent send HTTP requests to external systems during conversations. The AI can also read response data from those requests and use it in follow-up messages. Connect to Zapier, n8n, Google Sheets, or any service with an API. When to use custom actions Use custom actions when you need the AI agent to interact with systems outside Commslayer and Shopify. Examples: - 🏭 Check inventory levels in a warehouse system - 📦 Create return labels and share the tracking link with customers - 🔄 Update order status in a 3PL system - 📊 Log customer interactions to Google Sheets or your CRM - 🔔 Send notifications to Slack when specific issues arise - 🔗 Submit warranty claims and give customers their reference number Custom actions work with any system that accepts HTTP requests, including Zapier webhooks and n8n workflows. Creating a custom action 1. Go to AI agent → Actions 2. Click the Custom actions tab 3. Click + Custom action 4. Fill in the action details (see below) 5. Click Save Action settings Action name A short name for the action. The AI agent sees this when deciding what actions are available. Examples: "Check warehouse inventory", "Create return label", "Add loyalty points" When to use this action Describe when the AI should execute this action. Be specific about the conditions and triggers. The AI uses this description to decide whether to execute the action based on the conversation context. Good examples: - "When customer asks to update their shipping address after order is fulfilled" - "After order is cancelled and customer needs a refund confirmation sent to their CRM" - "When customer asks about their loyalty points balance" Bad examples: - "For customer requests" (too vague) - "When needed" (AI can't determine when) API configuration Method The HTTP method for the request: GET, POST, PUT, PATCH, or DELETE. Most integrations use POST for creating or triggering actions. URL The endpoint URL where the request will be sent. Example formats (replace with your actual URLs): - Zapier webhook: https://hooks.zapier.com/hooks/catch/123456/abcdef/ - n8n webhook: https://your-n8n.app.n8n.cloud/webhook/xyz - Custom API: https://api.example.com/v1/orders Headers Key-value pairs sent with the request. Common uses: - Authorization: Bearer your-api-key (replace with your actual API key) - Content-Type: application/json (usually set automatically) - X-API-Key: your-key (replace with your actual key) Parameters Parameters define what data gets sent with each request. You specify parameter names and descriptions, and the AI extracts the values from the conversation. Each parameter has: - Name — The key sent in the request (e.g., order_id, issue_type) - Type — Data type: string, number, boolean, or json - Description — Helps the AI understand what value to extract - Required — Whether the AI must provide this value Example parameters: - order_number (string) — "The Shopify order number being discussed" - issue_type (string) — "Category of the issue: shipping_delay, damaged_item, wrong_item, etc." - summary (string) — "Brief summary of the customer's problem" - refund_amount (number) — "The refund amount requested" The AI reads your descriptions and extracts the appropriate values from the conversation context. You can add any parameters your integration needs. Auto-populated data Some data is automatically available without defining parameters: - Customer info: email, name, phone - Conversation info: ID, status, channel Triggering custom actions reliably The "When to use this action" field helps the AI decide when to run an action, but for consistent triggering, pair your custom action with a guidance rule. In your guidance rule's Agent instructions, tell the AI to use the action: [Your instructions for handling this type of request] After replying, use "Your action name" to log the details. This ensures the action runs every time the guidance rule triggers, rather than relying on the AI to decide on its own. Testing custom actions After creating a custom action: 1. Click Test in the Actions page header 2. The AI Playground opens 3. Simulate a conversation that would trigger your action 4. Check your receiving system (Zapier, n8n, etc.) to verify the request arrived Test with real data in the playground before enabling for live conversations. Using webhook response data Your AI agent reads responses from custom action webhooks and can reference that data in follow-up messages or actions. When your webhook returns JSON, the AI picks up the response automatically. This makes custom actions two-way. The AI sends data to your system, gets something back, and acts on it. What your webhook should return Return a JSON response with the data you want the AI to reference. The AI extracts fields like: - id — A reference number (return request ID, claim number, ticket ID) - url — A link to share with the customer (return label, tracking page, portal link) - status — The result of the operation ("approved", "created", "pending") Any other fields in the response are also available. The AI reads the full response body. Example webhook response: { "id": "RET-12345", "status": "approved", "label_url": "https://labels.example.com/return/RET-12345" } Pair with guidance rules The AI will try to use response data on its own, but for consistent results, add a guidance rule that tells the AI exactly what to do with the response. Example guidance rule instruction: After creating the return label, share the label URL from the response with the customer. Include the return ID for their reference. This removes guesswork. The AI knows to pull specific fields from the response and include them in its reply. Example: Return labels with response data Scenario: Customer requests a return. The AI creates a return label via your automation platform, gets back a label URL and tracking number, and shares them in the conversation. Step 1: Set up a webhook in your automation tool Create a webhook in Make, n8n, or Zapier that: 1. Receives the order number and return reason 2. Calls your shipping provider (EasyPost, ShipStation, etc.) to create a return label 3. Returns the label URL and tracking info in the JSON response Your webhook response should look like: { "return_id": "RET-78901", "label_url": "https://labels.easypost.com/abc123.pdf", "tracking_number": "1Z999AA10123456784", "status": "created" } Step 2: Create the custom action - Action name: Create return shipping label - When to use this action: When a customer needs to return an item and the return has been approved - Method: POST - URL: Your automation webhook URL - Parameters: - order_number (string) — "The order number for the return" - reason (string) — "The customer's reason for returning the item" Step 3: Add a guidance rule Create a guidance rule for return requests with this instruction: After creating the return label, share the label URL and tracking number from the response with the customer. Include the return ID for their reference. Result: The AI sends the customer a message with their return label link, tracking number, and reference ID, all pulled directly from the webhook response. Example: Log to Google Sheets Log conversation data to a Google Sheet using Google Apps Script. Great for tracking shipping issues, refund requests, feature requests, or any data you want to collect from conversations. ⚠️ Note: Google Workspace accounts have restrictions on POST requests to Apps Script. If you're using a company Google account, use the GET method instead. For a complete step-by-step guide, see Build a shipping issues tracker with custom actions. Example: Zapier webhook for address updates Scenario: Send a notification to Zapier when a customer updates their shipping address after an order ships. Step 1: Create a Zap in Zapier 1. Go to Zapier and create a new Zap 2. Choose Webhooks by Zapier as the trigger 3. Select Catch Hook 4. Copy the webhook URL Zapier gives you 5. Add your desired action (send email, update spreadsheet, notify Slack, etc.) Learn more about Zapier webhooks → Step 2: Create the custom action in Commslayer - Action name: Notify address change post-fulfillment - When to use this action: When customer asks to update their shipping address and the order is already fulfilled or shipped - Method: POST - URL: Paste your Zapier webhook URL here - Headers: (none needed for Zapier) - Parameters: - order_number (string) — "The order being updated" - new_address (string) — "The new shipping address the customer provided" - event (string) — "Always 'address_change_post_fulfillment'" Example: n8n workflow for loyalty points Scenario: Add loyalty points in your rewards program when a customer leaves a product review. Learn more about n8n webhooks → Configuration: - Action name: Add review loyalty points - When to use this action: After customer confirms they've left a product review or provides their review rating - Method: POST - URL: Paste your n8n webhook URL here - Headers: - Authorization: Bearer your-api-key (replace with your actual key) - Parameters: - points (number) — "Points to award, e.g. 100" - reason (string) — "Always 'product_review'" Limitations Custom actions are designed for simple HTTP integrations. Not supported: - OAuth authentication — Use API keys or basic auth instead - GraphQL or SOAP — REST APIs only - Incoming webhooks — Only outbound requests from Commslayer - Multi-step workflows — Use Zapier or n8n for complex logic - File attachments — Text/JSON payloads only For complex integrations, send a webhook to Zapier or n8n and build your workflow there. Troubleshooting Action not triggering? - Check the "When to use this action" description — is it specific enough? - Add a guidance rule that explicitly tells the AI to use the action - Test in the AI Playground to see if the AI recognizes the trigger - Verify the action is enabled (toggle is on) Request failing? - Check the URL is correct and accessible from the internet - Verify authentication headers are correct - Look at your receiving system's logs for error details - If the URL points to a local or internal network address, it will be blocked for security reasons Request timing out? - The default timeout is 10 seconds — if your endpoint takes longer, it will fail - Check if your receiving system is responding slowly - For slow endpoints, consider using a webhook service like Zapier that responds immediately and processes in the background Action auto-paused? - Actions that fail repeatedly get automatically paused to prevent spam - Check the execution logs to see what's failing - Fix the underlying issue, then re-enable the action Missing data in request? - Write clear parameter descriptions so the AI knows what to extract - If you need order details, the customer needs to provide an order number first - Check the execution logs to see what data was actually sent AI not using response data? - Make sure your webhook returns a JSON response with a 200 status code - Add a guidance rule that tells the AI specifically what to do with the response - Check that the response body contains the fields you expect (test with the playground)

Last updated on Feb 06, 2026

Build a shipping issues tracker with custom actions

Use a custom action to log data from AI agent conversations to a Google Sheet. Good for tracking shipping issues, refund requests, product complaints, or anything else you want to collect. What you'll set up - 📝 A Google Sheet to receive the data - ⚡ A Google Apps Script that accepts requests - 🤖 A custom action that tells the AI agent when and what to log - 📋 A guidance rule to ensure it triggers reliably Step 1: Create the Google Sheet Create a new Google Sheet. The first row can have headers matching your parameters (e.g., "Timestamp", "Customer Name", "Order Number", "Issue Type", "Summary"), but it's optional—data will append to whatever row is next. Step 2: Create the Apps Script 1. In your Google Sheet, go to Extensions → Apps Script 2. Replace the default code with: function doGet(e) { const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); const data = e.parameter; const row = [new Date(), ...Object.values(data)]; sheet.appendRow(row); return ContentService .createTextOutput(JSON.stringify({ success: true })) .setMimeType(ContentService.MimeType.JSON); } 1. Click Save (Ctrl+S) Step 3: Deploy the script 1. Click Deploy → New deployment 2. Click the gear icon, select Web app 3. Set Execute as: Me 4. Set Who has access: Anyone 5. Click Deploy 6. Authorize the app when prompted 7. Copy the Web app URL ⚠️ Google Workspace accounts: If you're using a company Google account and "Anyone" isn't available, you may need to use a personal Gmail account instead, or ask your Workspace admin to allow external sharing for Apps Script. Step 4: Create the custom action in Commslayer 1. Go to Tools → AI agent → Actions 2. Click the Custom actions tab 3. Click + Custom action 4. Configure: - Action name: Shipping issues log - When to use: "When a customer reports a shipping problem like a delayed, lost, or damaged package, log the details" - Method: GET - URL: Paste your Apps Script Web app URL 5. Add parameters for each piece of data you want to capture: - customer_name (String) — Customer's name - customer_email (String) — Customer's email - order_number (String) — The order number if mentioned - issue_type (String) — Type of shipping issue (delayed, lost, damaged, wrong address, etc.) - summary (String) — Brief summary of the problem 6. Click Save Step 5: Create a guidance rule to trigger it You need a guidance rule that tells the AI agent when to use the custom action. Without this, the action may not trigger consistently. 1. Go to Tools → AI agent → Guidance 2. Create a new guidance rule: - Title: Shipping issues - Trigger: "Customer reports a shipping problem like delayed, lost, or damaged package" 3. In the Agent instructions, tell the AI to use the action: [Your instructions for handling shipping issues go here] After replying, use "Shipping issues log" to log the issue details. This is just an example—replace the first part with your actual guidance for how the AI should handle shipping issues (e.g., what to check, what to offer, when to escalate). The key part is the last line that tells the AI to use your custom action. Step 6: Test it Click the Test button in your custom action to verify the Google Sheet connection works. Then test the full flow in the AI Playground—send a message about a shipping problem and confirm the AI triggers the action and logs it to your sheet. Troubleshooting errors: - 401 Unauthorized — Redeploy with "Anyone" access - 404 Not Found — Create a new deployment and update the URL - 405 Method Not Allowed — Make sure you're using GET, not POST How it works When a customer mentions a shipping problem, the guidance rule fires and tells the AI agent to handle the conversation and log the details. The AI sends a GET request to your Apps Script with the parameters as query strings. The script appends them to your sheet with a timestamp. The AI agent decides what values to populate based on the conversation. Write clear parameter descriptions so it knows what to extract.

Last updated on Jan 28, 2026