Prime MOQ

The Toggle Rule Action

Turn an existing rule active or deactivated from a workflow, the same state change you would make by hand, started by something else.

Prime MOQ Team

Prime MOQ Team

Updated ยท 2 min read

Short answer

Toggle rule" sets an existing rule to Active or Deactivated, exactly as though you had clicked the button in the rule editor yourself. Same effect and same immediacy, started by a Flow workflow instead of a click. It takes a Rule ID and an on or off value, and it does not schedule anything to flip back.

  • It targets a rule by ID, never by name.
  • There is no built-in reverse. Build the second workflow yourself.
  • A deactivated rule stops enforcing at once, with no grace period.
  • Deactivating from Flow also unlocks a rule's fields for editing, exactly as deactivating by hand does.

Before you start

  • The Rule ID of the rule to toggle, copied from its edit page.

What you configure

FieldWhat it is
Rule IDThe exact ID of the rule to toggle, from its edit page rather than its name
EnabledOn or off

See Finding a rule's ID for Shopify Flow.

Before you build one

If the signal is a date and time you already know, use the rule's own scheduling instead. Schedule a rule covers start and end dates without a workflow to maintain, and a scheduled rule shows its state honestly in the Rules list.

This action is for the cases scheduling cannot express: a stock level, a collection being unpublished, an approval in another system.

Four workflows worth building

Auto-activate a drop-day rule. Build the rule in advance and leave it deactivated, then use Flow's schedule trigger to activate it exactly when the drop goes live, without being at a keyboard for the moment it happens.

Auto-deactivate when a collection is unpublished. If a rule is scoped to a promotional collection, trigger on that collection being unpublished or archived and deactivate the rule at the same time, so it stops enforcing against something that is no longer live.

Relax limits during a sale, restore them after. Two scheduled workflows, one deactivating a minimum-order rule as a sale opens and one reactivating it when the sale closes.

Activate when stock hits zero. Combine with Shopify's inventory trigger to activate a blocking rule when stock reaches zero, then deactivate it again on restock.

Common mistakes

  • Using the rule's name. The field takes an ID.
  • Expecting a built-in reverse. The action sets the state you gave it, once. The other direction is a second workflow.
  • Underestimating how immediate it is. A deactivated rule stops enforcing straight away, exactly as if you had clicked Deactivate. Make sure a workflow that deactivates something is meant to stop enforcement now.
  • Losing track of why a rule is off. A rule switched off by a workflow looks identical in the Rules list to one somebody switched off by hand. See Rule statuses.

Frequently asked questions

Does toggling a rule off delete it?

No. It stops enforcing and stays in your Rules list with every setting intact, exactly like deactivating it by hand. Turning it back on restores it as it was.

Can I toggle a rule that is locked for editing because it is active?

Yes, and doing so is how it becomes editable again. Toggling it off through this action has the same effect as clicking Deactivate in the app.

What if the workflow activates a rule that matches no products?

The toggle succeeds, but the rule still enforces against nothing until its scope matches at least one product. That is the same behaviour as activating it manually, so check the scope rather than the toggle if nothing happens.

Does it interact with a rule's own schedule?

They are separate mechanisms. A rule with a schedule still respects its own start and end dates, so driving the same rule from both a schedule and a workflow is a good way to confuse yourself. Pick one.

Can one action toggle several rules at once?

No. Each step targets one Rule ID. Chain a step per rule when a single trigger should switch several of them.

Best for: Scheduled drops, promotional windows, and any rule that should switch itself on or off from a signal Flow can see.

Applies to: Pro plan

Did this answer your question?

Related articles

Still stuck?

Tell us what you are trying to set up and we will reply within 24 hours.

Contact support

We use one cookie to remember this choice, and Google Analytics only if you say yes. Nothing analytics related loads until you do. Read the cookie policy.