Skip to main content

Why does my rule say it creates a loop?

How to fix logic rules that keep undoing each other

A loop happens when your logic rules keep changing each other's answers and never settle on a final choice.

When this happens, a red exclamation mark appears next to each rule involved. Hover over it to see the message This rule creates a loop.

What your customers see

When rules loop, your customizer can't settle on an answer. Customers may see answers change on their own, or click an answer and see it switch right back.

Why it happens

Most loops come from rules that want opposite things.

For example, your t-shirt has a Shirt color question and a Logo color question, each with a White and a Black answer, and you add these 4 rules:

  1. When Shirt color is White then Logo color should be Black.

  2. When Logo color is Black then Shirt color should be Black.

  3. When Shirt color is Black then Logo color should be White.

  4. When Logo color is White then Shirt color should be White.

Rules 1 and 3 want the shirt and logo in different colors. Rules 2 and 4 want them in the same color. Both can't be true at once, so each rule changes an answer that triggers the next one, and the last rule brings you back to the first:

Fixing a loop

  1. Log in to Kickflip and open your product.

  2. Click Logic in the top right of the screen.

  3. Look for the rules with a red exclamation mark. These are the rules in the loop.

  4. Choose which result you want to keep, and delete or edit the rules that go against it.

  5. Click Publish to save your changes.

In our example, if you want the logo to stand out, delete rules 2 and 4. Customers can then pick any shirt color, and the logo always switches to the opposite color. The red exclamation marks disappear from your rules

IMPORTANT
Deleting a single rule can stop the loop but still leave your customizer broken. In our example, deleting only rule 4 stops the loop, but customers can no longer pick a White shirt. After your fix, check that customers can still pick every answer you want to offer.

TIP
Not sure which rules belong to the same loop? Pick one red rule and look at the question it changes. Then find the red rule that starts with When that question. Keep going until you come back to the first rule.

Can I still publish my product?

Yes. When you click Publish, you'll see the message There are logic errors in your product. You can still publish, but your customers will run into the problem above, so we recommend fixing the loop first.

Did this answer your question?