case study hero

An AI Chat Agent That Sells, Supports, and Hands Off to Humans, Seamlessly

Incredible Visibility designed and built a fully automated AI chat support system for SandCloud, a D2C lifestyle ecommerce brand. The solution combines an n8n-powered AI backend with a zero-dependency custom widget deployed on Shopify, complete with live human handover through Kustomer.

Industry

Commerce / D2C Lifestyle

Partnership Length

Ongoing

Scale

Shopify storefront · Automated chat + human handover · Zero runtime dependencies

Overview

SandCloud is a mission-driven D2C lifestyle brand selling towels, apparel, and accessories through their Shopify storefront. As the brand scaled, their customer support volume grew with it, order status inquiries, product questions, returns, and shipping issues flooding in around the clock.

They needed a support solution that could handle the bulk of conversations autonomously while preserving the personal, brand-aligned experience their customers expected. Off-the-shelf chatbots felt generic and couldn't integrate deeply enough with their Shopify operations or their existing Kustomer support desk.

sandcloud-chatbot-overview

The Challenge

SandCloud's support team was stretched thin handling repetitive queries that didn't require human judgment, order tracking, product availability, and return policies.


But the brand couldn't afford a robotic chatbot experience that would erode customer trust. They needed an AI agent intelligent enough to resolve common issues end-to-end using live Shopify data, yet graceful enough to hand conversations to human agents when the situation called for it.


The solution also had to integrate with their existing Kustomer CRM without disrupting established support workflows, and deploy cleanly on their Shopify theme without introducing framework bloat or third-party script risks.

Our Approach

We approached this as an integration architecture problem, not just a chatbot build. The AI needed to sit between Shopify (for commerce data), Kustomer (for human support), and the storefront (for the customer experience), orchestrating all three without coupling them.


We chose n8n as the automation backbone because it gave us visual workflow design with webhook-native execution, letting us iterate on conversation logic without redeploying code. For the frontend, we deliberately avoided React or any framework. A single vanilla JavaScript class meant zero runtime dependencies, a sub-50KB payload, and no version conflicts with Shopify's theme stack.


Security was designed in from day one: Cloudflare Workers as auth proxies meant the n8n backend was never exposed to the browser.

What We Built

AI Chat Engine on n8n

The core conversation engine runs as an n8n workflow triggered by webhooks. Customer messages are routed through an LLM that has access to Shopify tools for real-time order lookup, product search, and inventory checks. The workflow handles session management through n8n datatables, maintaining conversation context across multiple exchanges without any external database.

Zero-Dependency Chat Widget

A custom-built chat widget in vanilla JavaScript (ES6): 1,722 lines of source code with zero runtime dependencies. It supports file uploads, emoji input, Markdown rendering (via vendored marked.js and DOMPurify), multi-stage typing indicators, transcript downloads, and full iOS Safari compatibility. Deployed to Shopify via a single script tag with SRI integrity hashes.

Kustomer Human Handover

When the AI determines it can't resolve a query, it triggers a seamless handover to a human agent in Kustomer. The widget switches to a long-polling listener, displays the agent's name with a live connection indicator, and routes all subsequent messages through Kustomer's conversation thread. A two-factor validation system (Cloudflare Worker + cryptographic session IDs) prevents conversation spoofing.

Cloudflare Workers Security Layer

Two Cloudflare Workers serve as the security perimeter. The outbound proxy authenticates widget requests and forwards them to n8n, validating origins and enforcing rate limits. The inbound webhook validator checks Kustomer agent replies against active sessions before allowing them through, preventing n8n from processing spoofed or stale webhooks and saving execution credits.

Shopify-Native Deployment

The entire system deploys as four static files on Shopify's CDN with SHA-384 SRI hashes. Path-based visibility rules show the widget on product and collection pages while hiding it on checkout and account pages. The build pipeline (terser + clean-css + archiver) produces a deployment-ready ZIP with auto-generated SRI snippet for the Liquid theme.

The Impact

The SandCloud Smart Chat Bot transformed customer support from a bottleneck into a scalable, always-on operation, handling routine queries autonomously while preserving human touch for complex issues.


  • Fully automated AI chat support deployed on the Shopify storefront, handling order inquiries, product questions, and returns without human intervention.
  • Seamless human handover to Kustomer agents with zero conversation context loss, customers never have to repeat themselves.
  • Zero runtime dependencies and sub-50KB widget payload, ensuring no performance impact on storefront load times.
  • Enterprise-grade security architecture: Cloudflare Workers as auth proxies, SRI asset integrity, cryptographic session IDs, and origin validation on every request.
  • Path-aware deployment that intelligently shows the widget only where customers need help, product pages, collections, and hides it during checkout to avoid friction.
  • Complete build-to-deploy pipeline producing deployment-ready artifacts with auto-generated SRI hashes and Shopify Liquid snippets.


Incredible Visibility delivered an AI support system that feels native to SandCloud's brand while running on a security-first, zero-dependency architecture built to scale.

sandcloud-chatbot-impact

Technologies

JavaScript (ES6+)
n8n
Cloudflare Workers
Shopify
Kustomer
Node JS
marked.js
DOMPurify
Terser
CSS Custom Properties

Industry Relevance

This project demonstrates Incredible Visibility's ability to build production AI systems that integrate deeply with existing ecommerce and CRM infrastructure. Rather than deploying a generic chatbot, IV architected a solution that respects SandCloud's existing tool choices (Shopify, Kustomer) and enhances them with AI, proving that intelligent automation doesn't require ripping out established workflows. The zero-dependency frontend approach and Cloudflare Workers security layer reflect IV's emphasis on lean, secure, maintainable systems that D2C brands can operate without dedicated engineering teams.

Incredible Visibility Logo

Need an AI support agent that actually understands your ecommerce stack? Let's talk.

We build AI chat systems that integrate with your existing tools, Shopify, Kustomer, or whatever you're running, so your support scales without losing the human touch.