Skip to main content
The Shopify integration connects your store to Ansa, enabling AI-powered customer support that understands your products, orders, and policies. Answer customer questions, handle refund requests, and display products directly in chat.

Features

Knowledge Sync

Auto-import products, orders, and customers. Your agent learns your entire catalog.

One-Click Widget

Install the chat widget on your storefront instantly. No code required.

Smart Q&A

AI answers questions using your store data—order status, products, shipping.

Refund Handling

Customers request refunds via chat. Review and approve from your dashboard.

Auto-Approve

Set thresholds to automatically approve small refunds.

Product Display

Show products beautifully in chat with images, prices, and variants.

Getting Started

Prerequisites

  • A Shopify store (any plan)
  • A Ansa account (Starter plan or higher)
  • Admin access to your Shopify store

Step 1: Connect Your Store

  1. Go to IntegrationsShopify
  2. Click Connect Shopify Store
  3. Enter your store URL (e.g., mystore.myshopify.com)
  4. Click Install App
  5. Authorize Ansa in Shopify
  1. After connecting, click Link Agent
  2. Select an existing agent or create new
  3. Configure sync settings
  4. Click Save

Step 3: Install Widget

  1. Click Install Widget
  2. Ansa adds the chat widget to your storefront
  3. Widget appears on all pages automatically
No theme editing required—it’s automatic!

Knowledge Sync

Ansa syncs your store data to power intelligent responses.

What Gets Synced

DataUsed For
ProductsAnswer product questions, show recommendations
CollectionsCategory-based queries
PoliciesReturns, shipping, privacy questions
Store infoContact, hours, about us

Manual Sync

Trigger a sync anytime:
  1. Go to IntegrationsShopify
  2. Find your store
  3. Click Sync Now

Automatic Sync

Data syncs automatically:
  • When you first connect
  • When products are updated in Shopify (via webhooks)
  • Daily refresh to catch any changes

Product Display

Show products beautifully in chat conversations.

How It Works

When your agent mentions products, they can display:
  • Product image
  • Title and description
  • Price (with sale price if applicable)
  • Variants (size, color, etc.)
  • Add to cart button

Example Conversation

Customer: Do you have running shoes? Agent: Yes! Here are our most popular running shoes: [Product Card: Nike Air Zoom - 129.99][ProductCard:AdidasUltraboost129.99] [Product Card: Adidas Ultraboost - 189.99] Would you like details on any of these?

Configuring Products

Products are automatically available through the synced knowledge base. Train your agent to recommend products:
When a customer asks about products, search the product catalog
and display up to 3 relevant products with the product_display tool.

Refund Handling

Let customers request refunds through chat, then manage them in your dashboard.

Customer Experience

  1. Customer asks about refund
  2. Agent collects order number and reason
  3. Agent submits refund request
  4. Customer receives confirmation

Managing Refunds

  1. Go to IntegrationsShopifyRefunds
  2. View pending refund requests
  3. For each request, see:
    • Order details
    • Items to refund
    • Customer reason
    • Conversation link
  4. Click Approve or Reject

Auto-Approve

Save time on small refunds:
  1. Go to store settings in Shopify integration
  2. Enable Auto-Approve Refunds
  3. Set maximum amount (e.g., $25)
  4. Refunds under threshold are approved automatically
Auto-approved refunds are processed immediately and cannot be undone. Start with a low threshold.

Widget Installation

Automatic Installation

Ansa installs the widget via Shopify’s Script Tag API:
  1. Click Install Widget in the integration
  2. Widget is added to your store’s <head>
  3. Appears on all storefront pages

Customization

Widget appearance syncs with your Ansa settings:
  1. Go to SettingsWidget
  2. Customize colors, position, launcher
  3. Changes apply to Shopify automatically

Removal

To remove the widget:
  1. Go to IntegrationsShopify
  2. Click store menu (⋯)
  3. Select Uninstall Widget
Or disconnect the store entirely.

Customer Identification

Ansa automatically identifies logged-in Shopify customers to personalize conversations and pre-fill forms.

How It Works

When a customer is logged into your Shopify store, Ansa automatically:
  • Identifies them by their Shopify customer ID
  • Loads their profile information
  • Pre-fills forms with their details
  • Enriches agent context with order history
This happens transparently on every page load—no action required from customers.

What Data Is Captured

FieldUsed ForExample
EmailIdentity, form pre-fill[email protected]
NamePersonalization, greetingsJane Smith
Order CountConversation context5 orders
Total SpentVIP treatment, tiering$499.50
Customer TagsSegmentation, routingvip, wholesale
Customer SinceRelationship context2023-01-15
Marketing StatusComplianceOpted in

Benefits

Personalized Greetings
Agent: "Hi Jane! Welcome back. I see you've ordered from us 5 times!"
Automatic Form Pre-fill When customers submit forms (contact, returns, etc.), their email and name are automatically filled in—no typing required. Contextual Support Your agent can see:
  • Past order history
  • Total customer value
  • Customer tags (VIP, wholesale, etc.)
  • Whether they’ve had issues before
This enables agents to provide more personalized, informed responses.

Privacy & Data Handling

All customer data is handled in accordance with Shopify’s customer privacy policies and your store’s privacy policy. Data is only used to enhance the support experience.
What’s Stored:
  • Customer information is encrypted in transit and at rest
  • Data is only accessible to your agents during conversations
  • No sensitive payment or password information is ever captured
Customer Control:
  • Identification only works when customers are logged in
  • Logging out clears all identification data
  • Customers can request data deletion per your store’s privacy policy

Guest Customers

For customers who aren’t logged in (guests):
  • No identification occurs
  • Forms are shown blank for manual entry
  • Agent provides standard (non-personalized) support
Guest customers can still receive excellent support—they just won’t have the convenience of automatic identification.

Technical Details

The identification system uses:
  • Shopify Liquid templates to access customer data
  • The widget’s .identify() method to pass data
  • Automatic cleanup on logout via .resetUser()
This all happens client-side in the browser, keeping the implementation simple and fast.

Order Lookups

Your agent can look up order information for customers.

What Customers Can Ask

  • “Where is my order?”
  • “What’s the status of order #1234?”
  • “When will my package arrive?”
  • “What did I order last month?”

Required Information

For order lookups, agents ask for:
  • Order number, OR
  • Email address used for order

Response Example

Customer: Where is my order #1234? Agent: I found your order! Here’s the status: Order #1234
  • Status: Shipped
  • Carrier: UPS
  • Tracking: 1Z999AA10123456784
  • Estimated delivery: December 28
[Track Package →]

Store Settings

Configure per-store settings in the integration.

Agent Settings

SettingDescription
Linked AgentWhich agent handles this store
Knowledge SyncWhat data to sync
Widget EnabledShow widget on storefront

Refund Settings

SettingDescription
Allow RefundsEnable refund requests via chat
Auto-ApproveAutomatically approve small refunds
Max Auto AmountMaximum amount for auto-approval

Multi-Store Support

Connect multiple Shopify stores to one Ansa account.

Setup

  1. Connect first store normally
  2. Return to IntegrationsShopify
  3. Click Connect Another Store
  4. Repeat setup process

Agent Assignment

Each store can have:
  • Same agent — Unified support experience
  • Different agents — Customized per brand

Considerations

  • Each store counts toward your agent limit
  • Knowledge bases are separate per store
  • Billing is per account, not per store

Troubleshooting

Widget Not Appearing

Check:
  • Widget is installed (green indicator)
  • No JavaScript errors on page
  • Theme isn’t blocking third-party scripts
Solution:
  1. Click Reinstall Widget
  2. Clear Shopify cache
  3. Check browser console for errors

Products Not Syncing

Check:
  • Products are published
  • App has required permissions
  • Last sync wasn’t too long ago
Solution:
  1. Click Sync Now
  2. Check sync status
  3. Verify permissions in Shopify admin

Refund Requests Missing

Check:
  • Refund tool is enabled
  • Agent is trained to use refund flow
  • Customer provided order details
Solution: Review conversation to see where flow stopped.

Disconnected Store

If store shows as disconnected:
  1. Click Reconnect
  2. Re-authorize in Shopify
  3. Widget and settings are preserved

API Access

Access Shopify integration via API for custom workflows.

Get Connected Stores

curl "https://api.ansa.so/shopify/shops" \
  -H "Authorization: Bearer $ANSA_API_KEY"

Sync Store

curl -X POST "https://api.ansa.so/shopify/shops/{shopId}/sync" \
  -H "Authorization: Bearer $ANSA_API_KEY"

List Refund Requests

curl "https://api.ansa.so/shopify/refunds?shopId=xxx" \
  -H "Authorization: Bearer $ANSA_API_KEY"

Best Practices

Start with common questions. Sync your store, then review what customers actually ask before building complex flows.
  1. Keep policies updated — Sync after changing return/shipping policies
  2. Test the widget — Place test orders and try the customer experience
  3. Monitor refunds — Review auto-approved refunds weekly
  4. Train specifically — Add Shopify-specific instructions to your agent

Next Steps