> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.omegatheme.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Integration with Shopify Flow

# Integration with Shopify Flow

Automate your store's workflows with Pareto's Shopify Flow integration. Track campaign performance, monitor discount usage, and get timely alerts—all without manual work.

## In this article
* [What is Shopify Flow?](#2-what-is-shopify-flow)
* [What you can automate with Pareto](#2-what-you-can-automate-with-pareto)
* [Before you begin](#2-before-you-begin)
* [Installing Shopify Flow](#2-installing-shopify-flow)
* [Accessing Shopify Flow](#2-accessing-shopify-flow)
* [Understanding Shopify Flow basics](#2-understanding-shopify-flow-basics)
* [Pareto triggers](#2-pareto-triggers)
* [Pre-built template: Upcoming Campaign Expiry Alert](#2-pre-built-template-upcoming-campaign-expiry-alert)
* [Common use cases](#2-common-use-cases)
* [Tips and best practices](#2-tips-and-best-practices)
* [Troubleshooting](#2-troubleshooting)
* [What's next?](#2-whats-next)

## What is Shopify Flow?
Shopify Flow is a free automation app that lets you build custom workflows for your store. It works like a recipe: when something happens (trigger), check conditions, then take actions automatically.
**Example workflow:** When a campaign expires → Check if it was successful → Send a summary email to your team
With Pareto's Flow integration, you can automate tasks based on your campaign and discount activity.

## What you can automate with Pareto
Pareto provides triggers and templates to automate common marketing tasks:
* **Get notified before campaigns expire** so you can extend or replace them
* **Track orders with Pareto discounts** to measure campaign ROI
* **Monitor campaign status changes** to keep your team aligned
* **Tag customers** who use specific discount tiers
* **Update inventory alerts** based on campaign performance

## Before you begin
### Requirements
* Shopify Flow app installed (free from Shopify App Store)
* Pareto app installed and active
* Shopify plan: Plus, Advanced, or higher (required for Shopify Flow)
### Permissions needed
You need **staff account access** with permissions to:
* Install and manage apps
* Create and edit workflows

## Installing Shopify Flow
If you haven't installed Shopify Flow yet:
1. Go to the [Shopify App Store](https://apps.shopify.com/flow)
2. Search for "Shopify Flow"
3. Click **Add app**
4. Click **Install app** to confirm
5. Wait for the installation to complete
**Note:** Shopify Flow is free and developed by Shopify.

## Accessing Shopify Flow
### From your Shopify admin
1. Log in to your Shopify admin
2. Click **Apps** in the left sidebar
3. Click **Shopify Flow**
The Flow dashboard opens, showing your active and draft workflows.
### Finding Pareto triggers
1. In Shopify Flow, click **Create workflow**
2. Click **Browse templates**
3. In the search bar, type "Pareto" or browse the Marketing category
4. Click on any Pareto template to preview it
**Tip:** You can also start with a blank workflow and add Pareto triggers manually.

## Understanding Shopify Flow basics
Workflows in Shopify Flow have three parts:
### 1. Trigger
The event that starts the workflow. Example: "Campaign status changed"
### 2. Condition (optional)
A check that decides whether to continue. Example: "If campaign status is 'active'"
### 3. Action
What happens when conditions are met. Example: "Send email to store owner"
You connect these blocks visually in the Flow editor.

## Pareto triggers
Pareto adds two triggers to Shopify Flow. Use these to start workflows based on your discount activity.



### Trigger 1: Campaign status changed
**When it fires:** This trigger fires whenever a campaign in Pareto changes status.
**Status changes that fire this trigger:**
* Created
* Scheduled
* Active
* Deactivated
* Deleted
**Available data variables:**
After this trigger fires, these variables are available for use in conditions and actions:
| Variable | Description | Example value |
| ---- |
| `campaign_id` | Unique ID of the campaign | `gid://pareto/Campaign/123` |
| `status` | Current campaign status | `active` |
| `campaign_name` | Display name of the campaign | `Spring Sale 2024` |
| `ends_at` | Campaign end date and time | `2024-04-30T23:59:59Z` |
**Use cases:**
* **Alert your team** when a campaign goes live
* **Track campaign lifecycle** by logging status changes to a spreadsheet
* **Pause related ads** when a campaign is deactivated
* **Archive campaign data** when status changes to deleted
**Example workflow:**
```
Trigger: Campaign status changed
Condition: If status = "active"
Action: Send Slack notification to #marketing channel
```

### Trigger 2: Order with Pareto discount placed
**When it fires:** This trigger fires when a customer places an order that includes a Pareto discount code.
**Available data variables:**
| Variable | Description | Example value |
| ---- |
| `campaign_id` | ID of the campaign that provided the discount | `gid://pareto/Campaign/456` |
| `line_item_applied` | Which products had the discount applied | `["Product A", "Product B"]` |
| `tier_applied` | Which discount tier was used | `tier_2` |
| `discount_value` | Total discount amount | `15.00` |
| `quantity_applied_discount` | Number of items that received the discount | `3` |
**Plus all standard Shopify order variables** (customer name, email, order total, etc.)
**Use cases:**
* **Tag customers** who use VIP discount tiers for segmentation
* **Track ROI** by logging discount value against order total
* **Alert your team** about high-value orders with discounts
* **Update loyalty points** based on discount tier used
* **Trigger fulfillment rules** for discounted orders
**Example workflow:**
```
Trigger: Order with Pareto discount placed
Condition: If tier_applied = "tier_3" (VIP tier)
Action: Add customer tag "VIP_Discount_User"
```

## Pre-built template: Upcoming Campaign Expiry Alert
This template automatically notifies you 24 hours before your campaigns expire, so you never miss an opportunity to extend or replace successful offers.
### What it does
Every day at 9:00 AM (in your store's timezone), this workflow:
1. Checks for active campaigns ending in the next 24 hours
2. Sends you an email with a summary if any are found
3. Skips the email if no campaigns are expiring soon
### How to find the template
1. In Shopify Flow, click **Create workflow**
2. Click **Browse templates**
3. Search for "Pareto Campaign Expiry" or scroll through Marketing templates
4. Click **Upcoming Campaign Expiry Alert**
5. Review the preview, then click **Create workflow**

### Setting up the template
#### Step 1: Install the template
1. After clicking **Create workflow**, the template opens in the editor
2. Review the workflow structure:
    * **Trigger:** Scheduled time (daily at 9:00 AM)
    * **Action 1:** Get campaigns expiring in 24 hours
    * **Condition:** Check if list is not empty
    * **Action 2:** Send email notification
#### Step 2: Configure the email recipient
1. Click on the **Send email** action block
2. In the **To** field, enter the email address that should receive alerts
3. **Default:** Uses your store owner email
4. **Tip:** You can add multiple emails separated by commas
#### Step 3: Customize the email (optional)
The default email includes:
* Discount title
* End date and time
* Current status
* Summary list of all expiring campaigns
To customize the email content:
1. Click the **Send email** action block
2. Edit the **Subject** field
3. Modify the **Body** field using the available variables
4. Click **Save** when done
**Available variables for the email:**
* `{{discount_title}}` - Name of the discount/campaign
* `{{ends_at}}` - When the campaign expires
* `{{status}}` - Current campaign status
* `{{campaign_list}}` - Summary of all expiring campaigns
#### Step 4: Adjust the timing (optional)
The workflow runs at 9:00 AM in your store's timezone by default.
To change the time:
1. Click the **Scheduled time** trigger block
2. Select your preferred time from the dropdown
3. The timezone is automatically set to match your store settings
**Note:** The 24-hour window is calculated from when the workflow runs. If you change the time to 6:00 PM, it will check for campaigns expiring in the next 24 hours from 6:00 PM.
#### Step 5: Turn on the workflow
1. Click **Turn on workflow** in the top-right corner
2. The status changes from "Draft" to "Active"
3. Your workflow will now run automatically every day
**Screenshot placeholder:** [Image showing the complete workflow in the editor]
### Testing your workflow
You can test the workflow without waiting for the scheduled time:
1. Open your workflow in the Flow editor
2. Click the **•••** menu in the top-right
3. Select **Run workflow now**
4. Check your email inbox for the notification
**Tip:** If you don't receive an email, make sure you have campaigns expiring in the next 24 hours.
### Customization ideas
**Change the alert window:**
* Check 3 days ahead instead of 1 day
* Modify the date calculation in Action 1
**Add additional actions:**
* Send a Slack notification to your team
* Create a task in your project management tool
* Update a Google Sheet with campaign data
**Filter by campaign type:**
* Add a condition to only alert for specific campaign types
* Use campaign name patterns (e.g., campaigns starting with "VIP")

## Common use cases
Here are popular workflows you can build with Pareto triggers:
### 1. Tag high-value discount users
**Goal:** Identify customers who use premium discount tiers
```
Trigger: Order with Pareto discount placed
Condition: If tier_applied = "tier_3"
Action: Add customer tag "Premium_Shopper"
```
**Why this helps:** Segment customers for future VIP campaigns

### 2. Track campaign performance in Google Sheets
**Goal:** Log every campaign status change for analysis
```
Trigger: Campaign status changed
Action: Add row to Google Sheet
  - Column A: Campaign name
  - Column B: Status
  - Column C: Timestamp
  - Column D: End date
```
**Why this helps:** Build historical data for reporting and insights

### 3. Alert team when big discount orders come in
**Goal:** Get notified about orders over $500 with discounts
```
Trigger: Order with Pareto discount placed
Condition: If order total > $500
Action: Send Slack message to #sales channel
```
**Why this helps:** Your team can provide VIP customer service immediately

### 4. Auto-pause Facebook ads when campaigns end
**Goal:** Stop wasting ad spend when offers expire
```
Trigger: Campaign status changed
Condition: If status = "deactivated" OR status = "deleted"
Action: Send HTTP request to Facebook API (pause ad set)
```
**Why this helps:** Ensure your ads don't promote expired offers

### 5. Send follow-up email to discount users
**Goal:** Re-engage customers who used a specific campaign
```
Trigger: Order with Pareto discount placed
Condition: If campaign_id = [specific campaign]
Action: Add customer to email list "Spring_Sale_2024_Buyers"
```
**Why this helps:** Build targeted audiences for future campaigns

## Tips and best practices
### Start simple
Build workflows one at a time. Test each thoroughly before creating the next.
### Use descriptive names
Name your workflows clearly: "Alert: VIP Campaign Expiring" is better than "Campaign Flow 1"
### Monitor your workflows
Check the Flow dashboard weekly to see which workflows are running and catch any errors.
### Test with real data
Use the "Run workflow now" feature to test with actual campaign and order data before going live.
### Set up error notifications
In each workflow, add a final action to email you if something fails. This prevents silent errors.
### Keep email lists updated
When using the email action, regularly review recipient lists to keep them current.
### Use timezone awareness
Remember that scheduled workflows run in your store's timezone. Adjust timing if your team is in different zones.
### Document your workflows
Add a note in each workflow describing what it does and why you built it. Future you will thank you.

## Troubleshooting
### Workflow isn't triggering
**Check these items:**
1. **Is the workflow turned on?**
    * Open the workflow and verify status is "Active" not "Draft"
2. **Is the trigger event actually happening?**
    * For campaign status changes: Make a test campaign and change its status
    * For order triggers: Place a test order with a Pareto discount
3. **Are your conditions too restrictive?**
    * Temporarily remove all conditions and see if the workflow fires
    * Add conditions back one at a time to find the issue
4. **Check the workflow run history:**
    * Open your workflow
    * Click the **Runs** tab
    * Look for error messages or failed runs

### Email notifications aren't arriving
**Try these solutions:**
1. **Check the email address**
    * Open the Send email action
    * Verify the recipient email is correct
    * Check for typos
2. **Look in spam/junk folders**
    * Flow emails might be filtered by your email provider
    * Add [noreply@shopify.com](mailto:noreply@shopify.com) to your contacts
3. **Verify the condition is met**
    * Check workflow runs to confirm the condition evaluated to "true"
    * If the condition is "false," the email won't send
4. **Test with a simple workflow**
    * Create a basic workflow: Trigger → Send email (no conditions)
    * If this works, your email settings are fine

### Data variables are empty or incorrect
**Troubleshooting steps:**
1. **Check variable spelling**
    * Variable names are case-sensitive
    * Use exactly: `campaign_id`, not `Campaign_ID`
2. **Verify the data exists**
    * Some variables are optional (like `ends_at`)
    * Check the trigger source to confirm data is available
3. **Use the correct format**
    * Dates: Use Flow's date formatting functions
    * Lists: Use "Get a property of each item" for arrays
4. **Review in workflow runs**
    * Open a workflow run from the Runs tab
    * Expand each step to see actual variable values

### Scheduled workflows run at wrong time
**Solution:**
1. **Check your store's timezone**
    * Go to Settings → General in Shopify admin
    * Scroll to "Store details" → "Timezone"
    * Scheduled workflows use this timezone
2. **Verify Daylight Saving Time**
    * Some regions observe DST, which shifts times by 1 hour
    * Adjust your workflow schedule seasonally if needed
3. **Allow time for processing**
    * Workflows may run a few minutes after the scheduled time
    * This is normal and doesn't affect functionality

### Need more help?
**Shopify Flow resources:**
* [Shopify Flow documentation](https://help.shopify.com/en/manual/shopify-flow)
* Shopify Community forums
**Pareto support:**
* Contact our support team through the Pareto app
* Email: [Your support email]
* Check our knowledge base at [Your docs URL]

## What's next?
Now that you've set up Shopify Flow with Pareto, explore these features:
* **Create custom workflows** using Pareto triggers
* **Combine multiple triggers** for complex automation
* **Connect other apps** to build powerful multi-step workflows
* **Review workflow analytics** to optimize your automation


## Related articles
* Create or update discount offers with Shopify Flow
* Pricing Plan
* Statistics
