# Shopify

## Introduction

Aissist is capable of connecting with Shopify, enabling it to handle order, shipping, return, and inventory. Currently, Aissist can read your store's data, which includes customer details, orders, inventory, fulfillment processes, shipping, and returns. Aissist can also write orders including update order address and cancel order.

<details>

<summary>🚀 Create Shopify Integration</summary>

#### Step 1: Start the Integration

1. Log into your **Aissist** dashboard.
2. From the sidebar, go to **Workspace** → **Integrations**.
3. Click **Add Integration** then choose **Shopify** from the available integration options.
4. In the setup page, enter:
   * A **name** for your integration.
   * Your **Shopify store details** (make sure the shop URL is correct).

👉 You can either **log into your Shopify account** or use a **Shopify access token** to connect.\
⚠️ *Note: Login-based integration is currently pending Shopify approval. For now, you must use a **token** to complete the setup.*

***

#### Step 2: Important Note About Shopify Basic Plan

If you are using the **Shopify Basic Plan**, please be aware:\
➔ Aissistant **cannot access personal customer information** (such as names, addresses, phone numbers, or emails) due to Shopify's data restrictions.

***

#### Step 3: Create an Access Token in Shopify

To generate your access token:

1. Log in to your **Shopify dashboard**.
2. Navigate to **Settings** → **Apps and Sales Channels** → **Develop Apps**.
3. Enable **Custom App Development** by selecting *"Allow custom app development."*
4. Click **Create an app**, give it a name.
5. Open the app you created, go to **API Credentials**, and then click **Configure Admin API Scopes**.
6. Set the following required permissions:
   * `read_shipping`
   * `read_fulfillments`
   * `read_merchant_managed_fulfillments`
   * `read_customers`
   * `read_inventory`
   * `read_orders`
   * `read_returns`
   * `read_products`
   * `read_product_listings`
   * `write_orders`
7. Click **Install App** to generate your **Admin API Access Token**.
8. Copy the token — you’ll use it for integration with Aissist.

🔗 [See Shopify’s official guide for more details.](https://shopify.dev/docs/apps/auth/admin-app-access-tokens)

✅ **Important**: Make sure you select **at least** these permissions when setting up the access token:

* `read_customers`
* `read_fulfillments`
* `read_merchant_managed_fulfillments`
* `read_inventory`
* `read_return`
* `read_shipping`
* `read_orders`
* `read_products`
* `read_product_listings`
* `write_orders`

<figure><img src="https://301624521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKHM836KGDAfAWvw6XL6%2Fuploads%2F8p1DrODoyrgtdsQSzErr%2FScreenshot%202024-09-17%20at%2011.17.32%20PM.png?alt=media&#x26;token=883f9a30-604f-4cff-b2f9-56e9b20eda27" alt=""><figcaption></figcaption></figure>

***

#### Step 4: Complete the Integration in Aissist.io

1. Go back to your **Aissist.io** console and fill in the **access token** for the Shopify integration.
2. Click **"Test"** to make sure the token and url are working correctly.

🔵 **Example Setup:**

* Name: Aissistant Shopify
* Shop: aissistant
* Shop URL: <https://aissistant.myshopify.com>
* Access Token: (Paste the token you generated)

<figure><img src="https://301624521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKHM836KGDAfAWvw6XL6%2Fuploads%2FR1vEzUmD17jWTQxpuwfB%2FScreenshot%202025-04-26%20at%2012.09.41%20PM.png?alt=media&#x26;token=2d07f91a-a456-4f38-bd78-c52440ebf832" alt=""><figcaption><p>Shopify integration builder</p></figcaption></figure>

***

With this setup, your Shopify store will be successfully connected to Aissist, allowing Smart Actions like order lookups, customer searches, and more!

</details>

<details>

<summary>🧠 Default Smart Actions</summary>

When you set up the Shopify integration, several **Smart Actions** are automatically included for you.\
You can customize **when** these actions are triggered based on your needs.

* You can choose to have an action **run at the start of a session**, **during a user interaction**, or **both** — whichever works best for your workflow.

Each default Smart Action comes with **predefined descriptions and parameters** to get you started quickly.\
If you need to adjust these settings, you can **customize them** just like you would when creating a custom Smart Action.

<figure><img src="https://301624521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKHM836KGDAfAWvw6XL6%2Fuploads%2FrJzWZSf6FiQZ266t8Dbd%2FScreenshot%202025-04-26%20at%2012.14.14%20PM.png?alt=media&#x26;token=5e58f7df-d0bc-499a-ac42-528e4fee3da5" alt=""><figcaption><p>Actions of Shopify integration</p></figcaption></figure>

</details>

<details>

<summary>🛠️ Customized Smart Action</summary>

#### 📦 Customizing Shopify Smart Actions in Aissistant

The Shopify integration comes with **default Smart Actions** that cover most common needs. However, if you have specific requirements, you can easily **create your own custom Smart Actions**. If you create customized actions, please turn off the default actions to avoid conflicts.

Here’s how:

1. Go to **Workspace → Action**.
2. Click **"Add Action"** and select the Shopify integration you previously set up.
3. On the create action page:
   * Choose a method from the list.
   * Give your action a **name** and **description**.

✅ **Available methods include:**\
`getOrder`, `getCustomer`, `getCustomerOrders`, `sendOrderInvoice`, `cancelOrder`, `updateOrderAddress`, and `unsubscribeMarketingEmail`.

***

#### ⚙️ Action Settings

* **Associate with Sub-Agents:**\
  You can link the action to a Sub-Agent for specific scenarios.
* **Decide When to Run:**\
  Choose to run the action **at the beginning of a session** or **during the interaction** — or even enable both.
* Select **Action Trigger** to be inbound, outbound or both
  * Inbound means a user's input message triggers this action
  * Outbound means Aissistant's reply triggers this action
  * Both means both direction can trigger this action
* **Customize Parameters:**\
  You can add specific details about your shop’s setup. You can also remove the parameters that is not needed.\
  Example parameter descriptions:

  > order\_id: order IDs start with an 'E' followed by 8 digits
  >
  > warranty\_days: warranty period in days, use constant 730
  >
  > match\_email: only return the order if the email matches the order email, use constant True
  >
  > order\_in\_last\_n\_days: retrieve orders placed in the last n days, use constant 180

This helps Aissistant understand and process your data correctly!

***

#### 📝 Returning and Summarizing Information

You can also add instructions to explain the type of information the action returns.\
If the response contains a lot of data, you can guide Aissistant to **summarize it** and extract only the important details needed for user responses.

***

<figure><img src="https://301624521-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKHM836KGDAfAWvw6XL6%2Fuploads%2FHCrH710l2SfTfudgMota%2Fscreencapture-console-aissist-io-workspace-actions-2869482a-30eb-47c8-bb56-a5d5edb6dec8-2025-04-26-12_16_47.png?alt=media&#x26;token=f69cb9d8-08c0-4edd-addb-4f7b92048624" alt=""><figcaption><p>Example getCustomer action</p></figcaption></figure>

By setting up custom Smart Actions, you make Aissistant even smarter — ensuring faster, more accurate help for your customers!

</details>

After setting up the Shopify integration and actions, you can use the [**Action Debugger**](https://doc.aissist.io/integrations/action-debugger) to test and verify that everything is working correctly.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.aissist.io/integrations/shopify.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
