Hype Discounts

Turning campaigns on and off with Shopify Flow

Updated Sep 10, 20262 min read

On this page (5)

Hype Discounts ships a Shopify Flow action called Toggle Hype campaign. Add it to any Flow workflow to enable or disable a Hype campaign automatically — on a schedule, when inventory runs low, when an order comes in, or on any other Flow trigger.

Add the action to a workflow

  1. Open the Flow app in your Shopify admin and create or edit a workflow.
  2. Choose your trigger and any conditions.
  3. Click Action, search for Toggle Hype campaign, and select it.
  4. Fill in the two fields:
    • Campaign ID — required. See below for where to find it.
    • Enable/Disable campaign — a checkbox. Its description reads: If this is checked the discount campaign will be enabled, else disabled. Ticked enables the campaign; unticked disables it.
  5. Turn the workflow on.

When the workflow runs, Hype enables or disables that campaign's discount in Shopify — the same result as choosing Enable Campaign or Disable Campaign from the campaign's three-dot menu in Hype.

Where the Campaign ID comes from

The field's own description says: Copy this from the Hype discount summary page URL.

  1. In Hype Discounts, open the campaign.
  2. Look at the browser address bar. The URL contains the campaign ID between /campaigns/ and the page name, as in /app/campaigns/<campaign-id>/summary.
  3. Copy that ID and paste it into the Campaign ID field in Flow.

Copy the value exactly. Flow has no way to look up campaigns by name, so a wrong or stale ID means the action fails silently as far as your workflow is concerned — the campaign simply does not change.

Things to know

  • The action toggles the campaign's discount status. It does not create, edit or delete campaigns, and it does not change the campaign's schedule, targeting or discount values.
  • A campaign that has never been published to Shopify has no discount to toggle. Save and publish the campaign in Hype first.
  • If the same campaign is toggled by both a workflow and a person, the last change wins. Avoid pointing two workflows at the same campaign in opposite directions.
  • Campaign start and end dates set in Hype still apply. Enabling a campaign through Flow does not extend a campaign whose end date has passed.

Useful patterns

  • Scheduled sales. A Flow schedule trigger that enables the campaign on Friday morning and a second workflow that disables it on Monday.
  • Inventory-aware promotions. Disable a volume discount campaign when a product's inventory drops below a threshold, so you stop pushing volume on stock you cannot cover.
  • Reacting to demand. Enable a campaign when daily sales fall below your target, and disable it when they recover.

Related articles

Still stuck?

Ask a follow-up and we'll see it came from “Turning campaigns on and off with Shopify Flow”.

Opens chat with your question and a link to this article.