> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bubblav.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Shopify

> Connect your online store for order tracking, product search, AI product recommendations, and abandoned cart recovery

Transform your chatbot into a powerful e-commerce assistant. Customers can track orders, search products, and get instant answers about your store — while BubblaV quietly recovers abandoned carts on your behalf.

## Why Connect Shopify?

<CardGroup cols={2}>
  <Card title="Order Tracking" icon="truck">
    Customers check order status using order numbers
  </Card>

  <Card title="Product Search" icon="magnifying-glass">
    Interactive product discovery with filters and pricing
  </Card>

  <Card title="Product Recommendations" icon="sparkles">
    Curated suggestions blending bestsellers, new arrivals, and visitor context
  </Card>

  <Card title="Visitor Insights" icon="chart-user">
    Support agents see order history and customer value in real-time
  </Card>

  <Card title="Abandoned Cart Recovery" icon="shopping-cart">
    AI-written chat and email messages bring shoppers back to finish checkout
  </Card>

  <Card title="24/7 Automation" icon="clock">
    Reduce support workload with accurate, instant info
  </Card>
</CardGroup>

## Visitor Insights for Support Agents

The Shopify integration enriches the **Visitor Insight** panel in your BubblaV dashboard, providing support agents with critical customer context during live chats:

<Frame>
  <img src="https://mintcdn.com/bubblav-e553cf80/R3ckwS1UlR0o66Bf/images/shopify/shopify-visitor-insight.png?fit=max&auto=format&n=R3ckwS1UlR0o66Bf&q=85&s=9e8a1d365d8b3b3e977928977ac5db9b" alt="Shopify Visitor Insight" width="1048" height="1194" data-path="images/shopify/shopify-visitor-insight.png" />
</Frame>

* **Order History**: A detailed list of current and past orders with fulfillment and payment status.
* **Order Tracking**: Real-time tracking information including carrier, tracking numbers, and delivery status.
* **Product Details**: View exactly which products were ordered, including images and itemized prices.
* **Admin Access**: Direct links to view orders in your Shopify Admin for quick management.
* **Refunds & Returns**: View refunded amounts and the status of any active return requests.

By having this information at their fingertips, support agents can resolve order-related questions faster and provide a more personalized experience.

## Prerequisites

* Active Shopify store
* Store owner or staff permissions

## Setup Steps

<Steps>
  <Step title="Install from Shopify App Store">
    Go to the [BubblaV Shopify App listing](https://apps.shopify.com/bubblav) and click **Install app**.
  </Step>

  <Step title="Select Your Store">
    If you have multiple stores, select the store where you want to install BubblaV.
  </Step>

  <Step title="Authorize">
    Review the permissions and click **Install app** to authorize BubblaV.
  </Step>

  <Step title="Verify Connection">
    You'll be redirected to your dashboard. The Shopify card should now show **Connected**.
  </Step>
</Steps>

***

## AI Abandoned Cart Recovery

When shoppers add items, enter their email, but don't complete checkout, BubblaV can bring them back — automatically.

<Note>
  Abandoned Cart Recovery requires a connected Shopify store. It's available on every plan — the **Cart Recovery** menu only appears in your dashboard after the store is connected.
</Note>

### How it works

1. BubblaV syncs your store's abandoned checkouts every 15 minutes.
2. After a delay you choose (default: 1 hour), the AI writes a short, friendly recovery message and sends it **in the chat widget** if the visitor is still around — otherwise by **email** with a one-click "Complete your checkout" link.
3. Optional follow-up emails (0–3, default 1) go out on your schedule, each with a one-click unsubscribe.
4. When the customer completes the purchase, the cart is marked **recovered** — with the revenue attributed on your dashboard.

### Configuring recovery

1. Go to **Dashboard** → your website → **Cart Recovery** (sidebar, Chatbot section).
2. Toggle **Enable cart recovery** and set your timing: first-touch delay, number of follow-ups, follow-up spacing, and how old a cart may be before it's ignored.
3. Optionally add **AI tone & instructions** (e.g. "Friendly and casual, mention free shipping over \$50") and a **discount code** the AI may offer — the code itself is created in Shopify.
4. Optionally set **quiet hours** (UTC) during which no messages are sent.
5. Use **Preview AI message** to see a sample before enabling.

The page also shows every abandoned cart with its recovery timeline, plus 30-day stats: carts abandoned, touches sent, carts recovered, revenue recovered, and recovery rate.

<Tip>
  Every recovery email includes sender identification and a one-click unsubscribe link, keeping you aligned with CAN-SPAM/GDPR expectations for reminder emails.
</Tip>

<AccordionGroup>
  <Accordion title="The page says 'Shopify sync problem'">
    The BubblaV app needs the `read_checkouts` permission to see abandoned carts. Reconnect your Shopify store from **Dashboard** → **Integrations** → **Shopify** to grant the updated permissions.
  </Accordion>

  <Accordion title="A customer unsubscribed by mistake">
    Remove their email from the suppression list by contacting support — unsubscribes are honored until manually cleared.
  </Accordion>
</AccordionGroup>

***

## In-Chat Shopping: Add to Cart & Order Cards

When your Shopify store is connected, the AI Agent can close the sale inside the chat widget — visitors no longer need to leave the conversation to buy.

### Add to cart

Product cards shown in chat include an **Add** button and a **View** button that opens the full product detail:

* **On your Shopify store**: the item is added to the visitor's real storefront cart instantly (no page reload) — the button shows a spinner while adding, then flips to a checkmark and **View cart** so they can jump to their cart page whenever they're ready.
* **On any other website** where your widget is embedded: clicking opens your store's cart with the item pre-loaded in a new tab.

On the product detail screen inside the widget, visitors can also pick a variant (size, color — out-of-stock options are struck through) and a quantity before adding. On mobile, the browser's back button returns from the product detail to the chat.

### Sales-agent product search

The AI Agent searches your catalog like a knowledgeable salesperson. For broad, needs-based questions — "I need gear to stay warm on the mountain" — it runs several targeted searches at once (base layers, jackets, gloves…) and answers with one labeled product-card group per need, then recommends the best combination. Each group's cards have **Add** and **View** buttons, so visitors can act on the recommendation immediately.

### Order status cards

When a visitor asks "where is my order?" (with their order number and email, or just their email), the answer renders as a rich order card: payment and fulfillment status badges, the items with thumbnails, a **Track shipment** button, and a **Buy again** button that re-adds the entire order to the cart in one tap.

<Tip>
  The "Buy again" button makes reorder flows effortless for returning customers — ask the AI Agent to promote it in conversations like "want to reorder your last purchase?".
</Tip>

***

## AI Product Recommendations

Beyond answering "what do you have?", your chatbot can proactively recommend products as one curated, ranked product-card group — powered by the `shopify_recommend_products` tool.

### What goes into a recommendation

The AI blends every available signal into a single group (default up to 6 products, max 12):

* **Sales data from your store**: products that pair naturally with what the visitor is viewing (related), accessories and add-ons (complementary), and close alternatives (similar).
* **Bestsellers and new arrivals**: your proven performers and fresh drops.
* **The visitor's live context**: the page they're on, products they've recently viewed, and what's already in their open cart.
* **What the visitor asks for**: need-matching in their own words ("waterproof jacket under 1000 SEK") plus stated budgets via price ranges.

The AI can also seed recommendations from the product the visitor is currently looking at, and it automatically excludes products already shown or rejected in the conversation so it never repeats itself.

### Merchant controls

Go to **Dashboard** → your website → **Integrations** → **Shopify** and find the **Product Recommendations** section:

* **Enable or disable** recommendations per website.
* **Group size**: cap how many products appear in a recommendation group (1–12, default 6).
* **Ranking signals**: toggle whether bestsellers and new arrivals influence suggestions.
* **Pinned products**: add product handles that should always be featured in recommendations.
* **Excluded products**: add product handles that should never be recommended.

### Performance stats

The same section shows rolling 7-day stats for recommendation clicks: impressions, clicks, click-through rate (CTR), and your top clicked products — so you can see which recommendations actually convert.

<Tip>
  Pin your high-margin products and watch the CTR stats for a week — if a pinned product isn't clicked, swap it. Recommendations render as regular product cards with **Add** and **View** buttons, so visitors can act on a suggestion in one tap.
</Tip>

***

## Return Policy Configuration

After connecting Shopify, you can configure the return policy settings for the **Initiate Return** tool. These settings control when customers can request returns.

### Return Window

The **Return Window** specifies the maximum number of days after order placement that customers can request a return.

* **Default**: 30 days
* **Range**: 1-365 days
* **Location**: In the Shopify integration settings, find the **Return Policy Configuration** section

**Example**: If set to 30 days, customers can only request returns for orders placed within the last 30 days.

### Minimum Order Age

The **Minimum Order Age** specifies how many hours must pass after an order is placed before a return can be requested. This prevents immediate returns right after purchase.

* **Default**: 0 hours (immediate returns allowed)
* **Range**: 0-168 hours (0-7 days)
* **Location**: In the Shopify integration settings, find the **Return Policy Configuration** section

**Examples**:

* **0 hours**: Returns can be requested immediately after order placement
* **24 hours**: Customers must wait 24 hours after placing an order before requesting a return
* **48 hours**: Customers must wait 2 days before requesting a return

<Tip>
  Setting a minimum order age (e.g., 24-48 hours) can help prevent impulse returns and give customers time to receive and evaluate their purchase.
</Tip>

### How to Configure

1. Go to **Dashboard** → **Integrations** → **Shopify**
2. Scroll to the **Return Policy Configuration** section
3. Set **Return Window (days)** - Maximum days after order placement to allow returns
4. Set **Minimum Order Age (hours)** - Minimum hours after order before returns allowed (0 = immediate)
5. Click **Save Return Configuration**

***

## Available Tools After Connection

| Tool                                 | What It Does                                                                                                                                         | Example Query                                                         |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `shopify_track_order`                | Track orders by number/ID                                                                                                                            | "Track order #1001"                                                   |
| `shopify_search_products`            | Advanced product search with filters (price range, availability, color/size variants, collection, tags, brand, sort)                                 | "Blue winter jacket under \$150, size M, in stock"                    |
| `shopify_recommend_products`         | Curated recommendation group blending related products, bestsellers, new arrivals, and the visitor's live context (page, recently viewed, open cart) | "What goes with this tee?" / "Any suggestions for a gift under \$50?" |
| `shopify_get_product`                | Get product details                                                                                                                                  | "Tell me about this product"                                          |
| `shopify_customer_orders`            | Customer order history                                                                                                                               | "My orders for [john@example.com](mailto:john@example.com)"           |
| `shopify_initiate_return`            | Start a return request                                                                                                                               | "I want to return my order"                                           |
| `shopify_create_return`              | Process return authorization                                                                                                                         | "Process my return"                                                   |
| `shopify_search_pages`               | Search store content pages                                                                                                                           | "What's your return policy?"                                          |
| `shopify_check_gift_card_balance`    | Check gift card balance                                                                                                                              | "Check my gift card ending in 1234"                                   |
| `shopify_validate_discount_code`     | Validate promo codes                                                                                                                                 | "Is code SUMMER25 valid?"                                             |
| `shopify_check_product_availability` | Check stock levels                                                                                                                                   | "Is this available in size Large?"                                    |
| `shopify_get_store_locations`        | List store locations                                                                                                                                 | "Where are your stores?"                                              |
| `shopify_get_shipping_rates`         | Calculate shipping costs                                                                                                                             | "How much is shipping to New York?"                                   |
| `shopify_get_collections`            | Browse product categories                                                                                                                            | "What product categories do you have?"                                |
| `shopify_cancel_order`               | Cancel unfulfilled orders                                                                                                                            | "Cancel my order #1001"                                               |

## Test Your Integration

Try these queries on your website:

<Frame>
  <img src="https://mintcdn.com/bubblav-e553cf80/R3ckwS1UlR0o66Bf/images/shopify/shopify-live-chat.png?fit=max&auto=format&n=R3ckwS1UlR0o66Bf&q=85&s=bbd8e69844f5d034e8941643402b107d" alt="Shopify Live Chat" width="2210" height="1036" data-path="images/shopify/shopify-live-chat.png" />
</Frame>

* "Track order #1001" (use a real order number)
* "Show me your products"
* "What running shoes do you have?"
* "I need a gift under \$50 — any suggestions?"

## Troubleshooting

<AccordionGroup>
  <Accordion title="Store domain not found">
    * Verify you're using `.myshopify.com` format
    * Check store is active at `https://your-store.myshopify.com`
  </Accordion>

  <Accordion title="Authorization fails">
    * Clear browser cache and try incognito mode
    * Ensure you have app installation permissions
  </Accordion>

  <Accordion title="Tools not working">
    * Wait a few minutes for activation
    * Verify store has orders/products data
  </Accordion>

  <Accordion title="Recommendations don't appear in chat">
    * Check that **Product Recommendations** are enabled under **Dashboard** → **Integrations** → **Shopify**
    * Verify the products aren't on your excluded list and your store has sales or catalog data to draw from
  </Accordion>
</AccordionGroup>

<Info>
  **Security**: We only request read-only permissions. Your store data remains secure.
</Info>
