How to Run a One-Time Product Rule with Tags
You can use Ablestar Bulk Product Editor to create a custom Product Rule, with two methods:
- Recurring: these run repeatedly on each product update.
- One Time: these will run only one time on creation or when modified.
However, some users need the ability to run the rule only once, not on every update and not during creation.
Tags can be used as a third strategy.
Tags help to avoid situations where you intend to replace the word "Ablestar" with "by Ablestar" in a title every time a product updates. If you use the default product rules you will end with "by by by by by Ablestar" after a couple runs of the rule, because the rule reapplied during each update.
Tags serve as indicators to determine if a product has been set up correctly or if it has undergone previous modifications. By employing tags strategically, users can ensure that a product rule is executed only once, either during creation or subsequent updates.
To prevent the loop and execute the product rule only once, follow the steps below:
Prep Existing Data:
Before you begin, filter out the set of products that you would like to leave untouched. Filter and tag only those products, manually through the bulk edit functionality. This will help us to identify products that we want to exlude from the new rule.
For example, add a tag called, "current" to all existing products that should not change. We will not modify this set of products.
1. Create a New Rule
From the dashboard, click Automations → Product rules → Create rule to start a new rule that targets all products without the designated "current" tag. You can use either option:
- When a product is created
- When a product is updated or created

2. Add Modifications
a. Specify the modification to be performed. For instance, define if you want to add text to the end of the product title. Again, we only want this rule to run once and only when they do not have "current" tags.

This will ensure the new modifications are only applied when the product is without the "current" tag, and has not been processed before.
b. Specify a second modification to add a tag called "current" to the product, after the first rule runs.
This helps to indicate that the product now has rules applied and matches the "current" state of the other previous products.

3. Save and Enable
Click the Save option from the black admin bar to create the rule and you will redirect back to the 'Product rules' page
You can run the new product rule immediately, or wait for the next update or products to be created. Click to edit the rule at any time.
At this point, whenever a product is updated, the app checks if the designated "current" tag exists:
- If the "current" tag is present, the product rule is ignored.
- If the "current" tag is absent (indicating it is the first time the rule encounters the product), the modifications are made, and the tag is added.
By utilizing the tag-based approach described above, the Bulk Product Editor avoids loops and ensures that product rules are executed only once per product.