AI Commerce 7 min read

Add AI Shopping Assistant to Your Store

Launch AI assistant that remembers customers, recommends products, and completes purchases.

Problem

  • Customers abandon carts when they can’t find what they need
  • Support teams answer the same product questions repeatedly
  • Generic chatbots break with complex requests
  • No personalization across customer sessions

What You’ll Build

  • AI assistant that remembers customer preferences
  • Smart product recommendations
  • Conversational checkout flow
  • Automated order tracking

Architecture

Customer Message → AI Understands → Checks Inventory → Recommends → Completes Purchase

Assistant maintains context across conversations. No customer re-explaining what they want.

Steps

1. Configure Assistant Personality

Define brand voice and behavior:

const assistant = await orangepill.agents.create({
  name: "shopping_assistant",
  persona: {
    role: "Helpful shopping assistant for fashion boutique",
    tone: "Friendly, enthusiastic, fashion-forward",
    language: "es-CO" // Colombian Spanish
  },
  knowledge: {
    catalog_url: "https://example.com/products.json",
    shipping_policy: "Free shipping over 100,000 COP",
    return_policy: "30-day returns on all items"
  }
});

2. Connect to Your Catalog

Give assistant access to inventory:

// Assistant automatically queries this when helping customers
const tools = {
  search_products: {
    endpoint: "https://api.example.com/products/search",
    auth: "Bearer your_api_key"
  },
  check_inventory: {
    endpoint: "https://api.example.com/inventory",
    auth: "Bearer your_api_key"
  },
  get_recommendations: {
    endpoint: "https://api.example.com/recommendations",
    auth: "Bearer your_api_key"
  }
};

await orangepill.agents.update(assistant.id, { tools });

3. Enable Memory

Assistant remembers past interactions:

// Customer: "I'm looking for a dress"
// [Assistant shows dresses]

// 2 days later...
// Customer: "Do you have that dress in blue?"
// [Assistant remembers which dress, checks blue availability]

const memory = {
  enabled: true,
  retention_days: 90,
  remember: ["preferences", "past_purchases", "sizes"]
};

await orangepill.agents.update(assistant.id, { memory });

4. Launch in WhatsApp

Deploy to WhatsApp Business:

await orangepill.channels.whatsapp.connect({
  agent_id: assistant.id,
  phone_number: "+573001234567",
  greeting: "¡Hola! ¿En qué puedo ayudarte hoy?"
});

// Customer messages WhatsApp → AI responds → completes purchase

5. Add Web Chat Widget

Embed on your website:

<!-- Add to your site -->
<script>
  window.orangepillConfig = {
    agent_id: "agent_abc123",
    position: "bottom-right",
    greeting: "Need help finding something?"
  };
</script>
<script src="https://cdn.orangepill.cloud/chat-widget.js"></script>

6. Handle Checkout

Assistant completes purchases:

// Customer says: "I want to buy the blue dress in size M"

// Assistant automatically:
// 1. Checks inventory
// 2. Creates payment link
// 3. Sends to customer
// 4. Confirms when paid

// You receive webhook when purchase completes:
app.post('/webhooks/orangepill', (req, res) => {
  const event = req.body;

  if (event.type === 'agent.purchase_completed') {
    const order = event.data;
    fulfillOrder(order.id);
  }

  res.sendStatus(200);
});

7. Monitor Performance

Track assistant metrics:

const analytics = await orangepill.agents.analytics(assistant.id, {
  period: "30d"
});

// Returns:
// conversations: 1,245
// purchases_completed: 387
// avg_response_time: "2.3s"
// customer_satisfaction: 4.6/5

Code Sample

Full implementation:

// Initialize AI assistant
const assistant = await orangepill.agents.create({
  name: "boutique_assistant",
  persona: {
    role: "Fashion boutique shopping assistant",
    tone: "Friendly and knowledgeable",
    language: "es-CO"
  },
  tools: {
    search_products: { url: "https://api.example.com/search" },
    create_checkout: { url: "https://api.example.com/checkout" }
  },
  memory: { enabled: true, retention_days: 90 }
});

// Deploy to WhatsApp
await orangepill.channels.whatsapp.connect({
  agent_id: assistant.id,
  phone_number: "+573001234567"
});

// Assistant now handles:
// - Product questions
// - Recommendations
// - Inventory checks
// - Order placement
// - Order tracking

Outcome

Customers get instant help 24/7. AI completes sales without human intervention. Support team focuses on complex issues.

Typical results:

  • 60% reduction in support tickets
  • 35% increase in conversion rate
  • 24/7 availability with zero staffing cost
  • 40% faster customer response time
  • 25% higher average order value from recommendations

What to read next