> For the complete documentation index, see [llms.txt](https://docs.getmesa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getmesa.com/connect/shopify-flow.md).

# Shopify Flow

## Connection

If you don't already have a Shopify Flow connection created, enter your Shopify Store ID and click Authorize in Shopify.

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

## Configure <a href="#flow" id="flow"></a>

### Start a MESA Workflow From Shopify Flow <a href="#flow" id="flow"></a>

MESA can receive Customer, Order, and Product data from Shopify Flow.

1\. In MESA, create a new workflow using a **Shopify Flow** trigger.

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

2\. In Shopify Flow, create a workflow with the **Add action** button. Then, select the corresponding MESA action from Step 1.

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

If you select the **Send to Mesa** action in Shopify Flow, you can copy the **Workflow Key** from your MESA workflow's **Dashboard** tab.

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

### Start a Shopify Flow Workflow From MESA <a href="#flow" id="flow"></a>

1\. Add a Shopify Flow action in MESA.

2\. Complete any required fields referencing an ID. In most cases, you want to use [MESA's Variables feature](https://docs.getmesa.com/workflow-builder/fields/variables) and locate the variable that represents the entity's ID (e.g. Product ID, Customer ID, Order ID).

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

{% hint style="info" %}
To send custom data to your Shopify Flow, select the [**Send Custom Data to Shopify Flow**](#send-custom-data-to-shopify-flow-step) step.
{% endhint %}

3\. Create a new workflow in Shopify Flow.

4\. Within Shopify Flow's "**Start When**" block, select a **MESA Action**.

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

## Technical Notes

### **Send Custom Data to Shopify Flow step**

Use this step to send unstructured or custom data to your Shopify Flow. This will allow you to define a key-value pair array (similar to the Line Items properties), and you can read this in your Shopify Flow.

For example, we want to send a Shopify Order's Name and ID to our Flow. We can set this up by doing the following.

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

In Shopify Flow, we can reference the data as `{{ custom_data.data[0].value }}` and this will represent the Order's Name.

### Send Custom Data from Shopify Flow to MESA

To send custom data from Shopify Flow to MESA, create a workflow in Shopify Flow with a **Send to Mesa** action.

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

Next, open the Send to Mesa action, enter the desired key, then select **Add a variable** to see the available data.

For example, this Send to Mesa action will send the contact email from Shopify Flow to MESA.

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

Your payload should follow a similar structure to the one shown above.

### How to use Data from Shopify Flow

When sending Orders, Customers, and Products from Shopify Flow, there must be a previous step to designate the object's ID.

This Shopify Flow workflow will send the Order ID to MESA when an order is created.

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

{% hint style="info" %}
View Shopify Flow templates and tutorials [here](https://www.getmesa.com/apps/shopify-flow/integrate)!
{% endhint %}
