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

# Shopify Flow

Utilize our Shopify Flow Integration

Zigpoll adds three triggers and one action to Shopify Flow.

### Triggers

#### Zigpoll Survey Completed

Fires for every response to any Zigpoll survey. Includes a **Survey** object:

| Field       | What it holds                                                                                                             |
| ----------- | ------------------------------------------------------------------------------------------------------------------------- |
| `ID`        | The survey's ID                                                                                                           |
| `Title`     | The survey's title                                                                                                        |
| `URL`       | A link to this response in your Zigpoll dashboard                                                                         |
| `Responses` | One entry per answered question: `Handle` (the question's handle), `Type` (the question type) and `Response` (the answer) |
| `Metadata`  | Every metadata item on the response, as `Name` and `Value`                                                                |

#### Zigpoll Survey Completed (with email capture)

Includes a **Customer** reference alongside the Survey object, so you can act on the customer record in your workflow. It only fires when the response is tied to a Shopify customer — see [below](#my-flow-isnt-running).

#### Zigpoll Survey Completed (with order capture)

Includes the **Customer** and **Order** references alongside the Survey object. It only fires when the response is tied to both a customer and an order, which in practice means post-purchase surveys.

{% hint style="warning" %}
Triggers whose names end in **\[Deprecated]** will expire. If your workflows use *Zigpoll Post Purchase/Order Status Survey Completed \[Deprecated]* or *Zigpoll Survey Completed (with email capture) \[Deprecated]*, rebuild them on the triggers above.
{% endhint %}

{% hint style="info" %}
Survey answers can also be written to customer metafields, which Flow can read. For the namespace and key Zigpoll uses, see [Metafield namespace and key](/polls/behavior-settings.md#metafield-namespace-and-key).
{% endhint %}

### Actions

#### Send Email Survey

Sends a Zigpoll email survey to a customer from within a Flow workflow. It takes:

* **Customer** (required) — the customer to email, usually from the workflow's trigger.
* **Order** (optional) — attaches the order to the response.
* **Survey Id** (required) — the survey to send. Find it by opening the survey and going to **Settings → General → Survey Id**.

This lets you send surveys based on any condition Flow can express — customer tags, order values, fulfillment events, and so on.

### My Flow isn't running

#### The trigger hasn't fired yet

Zigpoll fires its Flow triggers after a short wait, not the moment someone answers:

* **About a minute after the last question**, when the person completes the survey.
* **About 10 minutes after their last answer**, when they stop partway, or when the survey has **Allow Edits** turned on.

For post-purchase surveys, Zigpoll also waits for Shopify to finish processing the order. It retries for several minutes (see **Order Lookup Attempts** on the [Settings → Workflows → Shopify](/polls/behavior-settings.md#shopify) tab). Give a test response several minutes before checking the workflow's run history.

{% hint style="info" %}
Despite the names, the triggers also fire for partial responses once the person stops answering. If your workflow should act only on a particular answer, check the **Responses** list in it.
{% endhint %}

#### "with email capture" never fires

This trigger needs a Shopify customer. Zigpoll finds one from:

* the customer on the order, for post-purchase surveys;
* a `shopify_customer_id` passed to the survey as metadata;
* an email address given in the survey that matches a Shopify customer — or creates one, if **Create New Customers** is on under **Settings → Workflows → Shopify**.

A visitor who never gives an email has no customer. Neither does an email that doesn't match a customer while **Create New Customers** is off. In both cases, only **Zigpoll Survey Completed** fires.

#### "with order capture" never fires

This trigger needs an order as well as a customer. Post-purchase surveys on the Thank You and Order Status pages carry the order automatically. On-site, email and link surveys don't, unless the link passes it (for example `?shopify_order_id=`). Use **Zigpoll Survey Completed (with email capture)** for those.

#### The workflow uses a deprecated trigger

Deprecated triggers are being retired. Rebuild the workflow on one of the current triggers.

#### The workflow isn't turned on

Flow only runs workflows that are turned on. Open the workflow in Shopify Flow and check its status and run history.

#### Send Email Survey doesn't send

* The **Survey Id** must belong to the Zigpoll account connected to this store.
* The customer must exist in Shopify with an email address.
* Emails count toward your plan's monthly email limit. Once you reach it, Zigpoll skips the send.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.zigpoll.com/shopify-app/shopify-flow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
