# How to Set Up Shopify Flow with Mercuri

### Prerequisites

Before you begin, make sure:

* You have an active **Shopify store**
* You have installed both [**Mercuri**](https://apps.shopify.com/mercuri-ai-copilot) and [**Shopify Flow**](https://apps.shopify.com/flow?search_id=a2c81b12-842a-4ca8-b705-1eb7ae4184a7\&shallow_install_type=search\&surface_detail=flows\&surface_inter_position=1\&surface_intra_position=1\&surface_type=search) from the Shopify App Store
* You have already created a **WhatsApp or SMS template** in Mercuri

***

### How to Set Up Shopify Flow

{% embed url="<https://youtu.be/d5QK90c-UDo>" %}

#### Step 1: Open Shopify Flow

<figure><img src="/files/eHEQx2l4HsAC7iroXnDk" alt=""><figcaption></figcaption></figure>

1. Log in to your **Shopify Admin Dashboard**.
2. From the left-hand navigation panel, click **Apps**.
3. Select **Flow**, or search for *Flow* using the app search bar.

### Step 2: Create a New Workflow

1. On the Flow dashboard, click **Create workflow** (top-right corner).

<figure><img src="/files/GJjIY4fjGw62EB88AuqU" alt="" width="563"><figcaption></figcaption></figure>

2. You will be prompted to either:

* Select a Trigger, or
* Browse Templates

<figure><img src="/files/BLIknAaftMFcBoTVCyeu" alt="" width="563"><figcaption></figcaption></figure>

3. Click **Select a Trigger**.

#### Step 3: Add the Trigger (eg, Abandoned Checkout)

<figure><img src="/files/jgo0z6KKwsSesm90lwUu" alt="" width="563"><figcaption></figcaption></figure>

1. In the trigger search bar, type **Customer abandoned checkout**. Select it from the list.
2. This trigger activates the workflow when a customer adds items to their cart but does not complete the checkout process.

#### Step 4: Add a Wait Condition

1. Click the **+** button below the trigger.
2. Select **Action → Wait** (under Flow actions).
3. Set the waiting time to **1 hour**. This ensures the WhatsApp or SMS reminder is sent **one hour after** the cart is abandoned, not immediately.

#### Step 5: Add Mercuri Action

<figure><img src="/files/OEjSm9NAl4wMS4tjkDQT" alt="" width="563"><figcaption></figcaption></figure>

1. Click the **+** icon below the wait step.
2. Select **Action**.
3. Choose **Mercuri AI Copilot**.
4. Based on your communication channel, select one of the following:

* **Send WhatsApp Message**, or
* **Send SMS Message**

<figure><img src="/files/RTxdQCvvOe9IOpQchq82" alt="" width="563"><figcaption></figcaption></figure>

#### Step 6: Configure the Mercuri Action (Add Template ID)

<details>

<summary><mark style="color:blue;"><strong>For WhatsApp Messages (</strong></mark><em><mark style="color:blue;"><strong>follow these steps)</strong></mark></em></summary>

To complete the setup, you need to add the **Template ID** from Mercuri.

<figure><img src="/files/OwxZFarF0w7ly5Mbjpbx" alt="" width="563"><figcaption></figcaption></figure>

**How to Copy Template ID from Mercuri**

1. Open the **Mercuri dashboard**.
2. Navigate to **Templates → WhatsApp / SMS** from the left-hand sidebar.
3. Locate the template you want to use.
4. Click the **three dots (⋮)** on the bottom-right corner of the template card.
5. Select **Copy Template ID**.
6. Next, go back to the Shopify Flow workflow dashboard and paste the copied Template ID into the **Template ID** field to complete the configuration.

<figure><img src="/files/1vYIgFVzumvqmEUJb9NV" alt="" width="563"><figcaption></figcaption></figure>

</details>

<details>

<summary><mark style="color:blue;"><strong>For SMS Messages (follow these steps)</strong></mark></summary>

To complete the setup, you need to add the **Template ID** and **Phone number ID** from Mercuri.

<figure><img src="/files/FvbX2OAZRI80tJEVUC4E" alt=""><figcaption></figcaption></figure>

**A. How to Copy Template ID from Mercuri**

<figure><img src="/files/OwxZFarF0w7ly5Mbjpbx" alt="" width="563"><figcaption></figcaption></figure>

1. Open the **Mercuri dashboard**.
2. Navigate to **Templates → WhatsApp / SMS** from the left-hand sidebar.
3. Locate the template you want to use.
4. Click the **three dots (⋮)** on the bottom-right corner of the template card.
5. Select **Copy Template ID**.
6. Next, go back to the Shopify Flow workflow dashboard and paste the copied Template ID into the **Template ID** field&#x20;

**B. How to Copy Phone Number ID from Mercuri**

<figure><img src="/files/tKpzMpoC2wlFALTUOw9m" alt=""><figcaption></figcaption></figure>

1. Navigate to **Settings → Channels** from the left-hand sidebar.
2. In the **Channel Configurations** section, select the **SMS** channel.
3. Locate your registered SMS number and click on the copy icon next to the SMS phone number.
4. Now, click on **Copy Phone Number ID**.
5. Next, go back to the Shopify Flow workflow dashboard and paste the copied **Phone Number ID** into the **Phone Number ID** field.

</details>

#### Step 7: Turn On the Workflow

1. Review the workflow steps to ensure everything is configured correctly.
2. Click **Turn on workflow**. (right-corner)

<figure><img src="/files/ECM8SuMq2qHi0ZhzVDNO" alt="" width="563"><figcaption></figcaption></figure>


---

# 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://docs.mercuri.cx/how-to-set-up-shopify-flow-with-mercuri.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.
