# 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="https://392978341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZtOBCP9JV8XEWJpUU4t%2Fuploads%2FA72A3syiFV0a0Y3aZpsD%2Fimage.png?alt=media&#x26;token=5064d9b1-5584-47e4-a67a-c2abdfd012ae" 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="https://392978341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZtOBCP9JV8XEWJpUU4t%2Fuploads%2F827afhujNXlSqcVDvgX4%2Fimage.png?alt=media&#x26;token=31db6ce3-09e5-4dd3-ae17-426decd0d303" alt="" width="563"><figcaption></figcaption></figure>

2. You will be prompted to either:

* Select a Trigger, or
* Browse Templates

<figure><img src="https://392978341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZtOBCP9JV8XEWJpUU4t%2Fuploads%2FRvypuYrDBlELxx7wPklk%2Fimage.png?alt=media&#x26;token=c5e8a648-7ab4-4dd9-8755-d87f46b284d9" alt="" width="563"><figcaption></figcaption></figure>

3. Click **Select a Trigger**.

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

<figure><img src="https://392978341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZtOBCP9JV8XEWJpUU4t%2Fuploads%2F6KLrAbK6NqWdy4YdN78J%2Fimage.png?alt=media&#x26;token=9da44dbb-81fb-42d9-ae25-35ea15e8d0f9" 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="https://392978341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZtOBCP9JV8XEWJpUU4t%2Fuploads%2Fe2lTL5QiMHAwJFOucD0q%2Fimage.png?alt=media&#x26;token=92674bef-bed9-408d-b45c-e4925960bb01" 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="https://392978341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZtOBCP9JV8XEWJpUU4t%2Fuploads%2FBvIoo5410nLe5PnkUpau%2Fimage.png?alt=media&#x26;token=79e8eecc-84f9-4ef1-bb16-ed4bf72a46a2" 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="https://392978341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZtOBCP9JV8XEWJpUU4t%2Fuploads%2F1IbzL2Fn5yMkdF8GHvcL%2Fimage.png?alt=media&#x26;token=defff74d-1ed5-4844-a2a6-e1c5cf7adac4" 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="https://392978341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZtOBCP9JV8XEWJpUU4t%2Fuploads%2FmWG3MTzWjs7XSdcPPwP3%2Fimage.png?alt=media&#x26;token=787c3b78-b6c6-4f9a-bbb6-4fc5b433e528" 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="https://392978341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZtOBCP9JV8XEWJpUU4t%2Fuploads%2FDbCmiMRg1K1Pzn2Y1XFY%2Fimage.png?alt=media&#x26;token=81d28bf5-7949-4f4c-906d-0d416d08910c" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://392978341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZtOBCP9JV8XEWJpUU4t%2Fuploads%2F1IbzL2Fn5yMkdF8GHvcL%2Fimage.png?alt=media&#x26;token=defff74d-1ed5-4844-a2a6-e1c5cf7adac4" 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="https://392978341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZtOBCP9JV8XEWJpUU4t%2Fuploads%2Fu1dUP18X3S2H0Hfcaam0%2Fimage.png?alt=media&#x26;token=5a6a41d1-f320-4ff6-905b-fb861ef25cec" 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="https://392978341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZtOBCP9JV8XEWJpUU4t%2Fuploads%2F9wsOPkXeXR620eg4QygT%2Fimage.png?alt=media&#x26;token=2b4531b6-d269-4b97-88e7-4d151e8a5d88" alt="" width="563"><figcaption></figcaption></figure>
