> For the complete documentation index, see [llms.txt](https://alhena.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alhena.gitbook.io/docs/integrations/ecommerce/platforms/integrating-alhena-ai-with-shopify.md).

# Shopify

Integrate Alhena with Shopify to provide AI-powered customer support with real-time order and product information.

## Prerequisites

* A Shopify store with admin access

## Setup

### Option 1: Install from Shopify App Store

1. Visit the [Alhena AI app on the Shopify App Store](https://apps.shopify.com/gleen-ai)
2. Click **Install** and authorize Alhena to access your store
3. You'll be brought to the Alhena dashboard to complete setup

### Option 2: Install from Alhena Dashboard

1. In Alhena, go to **Settings > Integrations**
2. Find **Shopify** and toggle it on
3. Follow the prompts to connect your Shopify store

***

## Enabled Agents

When you connect your Shopify store, the following agents are enabled:

| Agent                      | Description                                                                |
| -------------------------- | -------------------------------------------------------------------------- |
| **Order management agent** | Handles order inquiries, tracking, and order-related customer support      |
| **Product expert agent**   | Provides detailed product information, specifications, and recommendations |

You can configure these agents in **AI Settings > Agents**.

***

## Order Lookup

Before Alhena shares order details such as status, items, or tracking, the customer has to identify the order. **Order lookup** lets you choose what they must provide.

1. In Alhena, go to **Settings > Integrations > Shopify**
2. Find the **Order lookup** card
3. Choose an option. It saves as soon as you select it.

| Option                                      | What the customer provides                                                                                                                                            | When to use it                                                                                                                  |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| **Order number or email address** (default) | Either one. With just an email address, Alhena can find all the orders placed with it.                                                                                | The quickest experience for shoppers.                                                                                           |
| **Order number and email address**          | Both, and the email address must be the one used to place that order. If they don't match, Alhena asks the customer to double-check both instead of sharing anything. | Stronger protection. Someone who only knows a customer's order number or email address can't see that customer's order details. |

{% hint style="info" %}
The setting applies only to order lookups. It doesn't turn the order management agent on or off.
{% endhint %}

***

## Auto-refunds

Two settings let Alhena issue refunds itself when a customer asks in chat. Both are **off** by default.

Alhena only refunds when the customer's email matches the order's email. Refunds go to the original payment method, and nothing is refunded twice.

### Turning an auto-refund on

1. In Alhena, go to **Settings > Integrations > Shopify**
2. Switch on the **Auto-refund overdue returns** or **Auto-refund late express delivery** card
3. If prompted, click **Continue to Shopify** and approve the extra permission (returns access or order updates)

{% hint style="info" %}
If a card shows a permission warning, switch it off and on again to re-grant access.
{% endhint %}

### Auto-refund overdue returns

When a customer says a return refund hasn't arrived, Alhena refunds the returned items if the return has gone unrefunded longer than your **Refund window (days)** (default **14**, from 1 to 365), counted from when the return was filed. Requires the **Return Management Agent**.

Returns you haven't approved yet and exchanges are never refunded automatically.

### Auto-refund late express delivery

When a customer says a paid express delivery arrived after the promised day, Alhena refunds the delivery fee. Requires the **Order Management Agent**.

Describe your delivery promise in a [guideline](/docs/ai-configuration/tuning/guidelines.md): which paid options carry a promise, how many days each promises, and any holidays that don't count. Alhena won't refund options your guideline doesn't cover, cancelled orders, or free delivery.

***

## Recommended: Add Your Store to Training

After connecting, we recommend adding your Shopify store's domain to your training URLs so Alhena can learn from your product pages and help articles. See [Training on Websites](/docs/ai-configuration/data-sources/websites.md) for more information.

***

## More you can do on Shopify

Once your store is connected, these Shopify-specific features become available:

* [**Publishing FAQs to Shopify**](/docs/features/ai-visibility/content-ai-visibility/content-recommendations/publish-faqs-to-shopify.md) — put the FAQs [AI Visibility](/docs/features/ai-visibility.md) generates for a product straight onto its product page, structured data included, and keep them in sync as you edit or dismiss them.
* [**Product FAQs**](/docs/features/product-faqs/shopify-setup.md) — add the Product FAQs block to your product pages. New products don't have to wait for your next training: if a product isn't in Alhena's catalog yet when its Product FAQs are first generated, Alhena adds it from your store on the spot.
* [**Tagging Alhena Orders**](/docs/integrations/ecommerce/platforms/integrating-alhena-ai-with-shopify/shopify-order-tagging.md) — tag the orders Alhena influenced with `alhena_interacted`, plus a conversation tag linking back to the chat, so you can filter and export them in your Shopify admin.
* [**Shopify Checkout Extension**](/docs/integrations/ecommerce/platforms/integrating-alhena-ai-with-shopify/shopify-checkout-extension.md) — put Alhena on your checkout pages so shoppers can ask questions without leaving checkout.

***

## Disconnecting

To disconnect your Shopify store:

1. Go to **Settings > Integrations > Shopify**
2. Click **Disconnect**
3. Confirm the disconnection

This will disable the Shopify-connected agents and revoke access to your store data.
