> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gocertify.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Via Shopify Flow

> Track orders and refunds automatically using Shopify Flow.

If your store runs on Shopify, you can track conversions without adding any code to your
site. Two ready-made Shopify Flow workflows send order and refund data to Gocertify
automatically.

> [!WARNING]
>
> With this integration you share **all** of your transactions with Gocertify, not only
> those that used a Gocertify discount code. We then classify each transaction based on
> the discount code the shopper used.

> [!NOTE]
>
> Shopify's [**Send HTTP request**](https://help.shopify.com/en/manual/shopify-flow/reference/actions/send-http-request) action is available on the Grow,
> Advanced and Plus plans. On any other plan, use [Direct Conversion Tracking](https://docs.gocertify.me/section/trackImpact/directTracking.md)
> instead.

## Before you start

Two separate steps are needed before the workflows will work:

1. **Install the Gocertify app** on your store.
2. **Connect your brand** to the store.

See the [Shopify Integration guide](https://docs.gocertify.me/section/promoteOffers/shopifyIntegration.md) for both.
Installing the app on its own is not enough — connecting your brand is what tells the
workflows which account to send data to.

You will also need your Gocertify API key. Ask your Gocertify contact for it — they will
provide the key for your account.

## Download the workflows

> [card] [Order Created](https://cdn.gocertify.me/downloads/shopify-flows/gocertify-order-created.flow)
>
> Sends every new order to Gocertify.

> [card] [Refund Created](https://cdn.gocertify.me/downloads/shopify-flows/gocertify-refund-created.flow)
>
> Sends every refund so your reporting stays accurate.

## Set up

**1. Add your API key as a secret**

In your Shopify admin, go to **Apps > Flow > Settings** and click **Add secret**.

![Shopify Flow settings page with the Add secret button](https://mintcdn.com/gocertify-db9cc6b8/LC2oqKR6NbuScsQM/images/integrations/ecommerce/shopify/flow/shopify-flow-secrets-empty.png?fit=max\&auto=format\&n=LC2oqKR6NbuScsQM\&q=85\&s=e1e6eccac4c880d6361f44ba91e57cb7)

Flow settings, where secrets are managed

| Field | Value |
| - | - |
| Handle | `gocertify_api_key` |
| Value | The API key from your Gocertify contact |

![Add secret form with the gocertify\_api\_key handle entered](https://mintcdn.com/gocertify-db9cc6b8/LC2oqKR6NbuScsQM/images/integrations/ecommerce/shopify/flow/shopify-flow-add-secret.png?fit=max\&auto=format\&n=LC2oqKR6NbuScsQM\&q=85\&s=10545c548a3ba9ead264e69d0e0768d2)

Fill in the handle and paste your API key

> [!WARNING]
>
> The handle must be exactly `gocertify_api_key`. The workflows will not
> authenticate if it differs.

**2. Import both workflows**

Go to **Apps > Flow** and click **Import** in the top-right corner. Add the
`Order Created` file and confirm, then repeat for `Refund Created`.

**3. Add the brand variable**

Each workflow needs one variable that tells it which Gocertify account to send data
to. You add it once per workflow.

Open the workflow, click the **Send HTTP request** step, then under the **URL** field
click **Add variable**.

![Add a variable panel showing the order and shop resources](https://mintcdn.com/gocertify-db9cc6b8/LC2oqKR6NbuScsQM/images/integrations/ecommerce/shopify/flow/shopify-flow-variable-select-shop.png?fit=max\&auto=format\&n=LC2oqKR6NbuScsQM\&q=85\&s=b2324c1238841610db5930e151a436c6)

Select shop from the variable list

1. Select **shop**.
2. Next to **metafield**, click the **+** icon.
3. Choose **Use an unstructured metafield**.
4. Enter `gocertify.brand_slug` as the namespace and key. The variable name fills in
   as `brandSlug` automatically — leave it as it is.
5. Click **Add**.

![Create variable panel with gocertify.brand\_slug entered as the namespace and key](https://mintcdn.com/gocertify-db9cc6b8/LC2oqKR6NbuScsQM/images/integrations/ecommerce/shopify/flow/shopify-flow-variable-namespace.png?fit=max\&auto=format\&n=LC2oqKR6NbuScsQM\&q=85\&s=1ea2816abecba6d344569db4ed2348f3)

Enter the namespace and key

The URL will now resolve to your brand automatically. Open the **Test results** tab to
confirm — you should see your brand name in the URL instead of the variable.

> [!WARNING]
>
> The variable must be named exactly `brandSlug`. Repeat this step for the second
> workflow — variables are not shared between workflows.

**4. Turn on the workflows**

Open each workflow and click **Turn on workflow** in the top-right corner. Nothing else
inside the workflow needs changing.

**5. Check it works**

Place a test order. Within a minute or two it should appear in your Gocertify
dashboard. If it does not, go to **Apps > Flow > Recent runs** to see whether the
workflow ran and what it returned.

## What gets sent

> [accordion] When an order is created
>
> Order ID and name, creation time, order value and currency, discount codes applied,
> number of products, and Shopify's own fraud risk assessment.

> [accordion] When a refund is created
>
> Refund ID, the original order it belongs to, and the refunded amount.

No customer names, email addresses or payment details are sent.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.