Clone a rule
POST /api/v1/rules/:id/duplicate. Exact copy named 'Copia di <name>', status=paused, fresh execution_count=0. Edit scope or thresholds, preview, activate.
Written By Salvatore Sinigaglia
Last updated About 4 hours ago
POST /api/v1/rules/:id/duplicate. Exact copy named 'Copia di <name>', status=paused, fresh execution_count=0. Edit scope or thresholds, preview, activate.
Clone a rule
Per-rule action menu → Duplicate. Backed by
POST /api/v1/rules/:id/duplicate(verified). Creates an exact copy namedCopia di <name>,status: paused,execution_count: 0,last_evaluated_at: null. The cloned rule is independent — edits don't propagate back to the original.
Who is this for
Anyone managing more than one rule. Especially:
- Variant testing (clone + tweak threshold + compare execution histories)
- Per-account rules (clone an account-A rule for account B)
- Template-from-rule (clone a working rule + adjust for a new use case)
- Staging changes (clone, edit, preview, activate; keep original as fallback)
How to clone
From the rule list
/rules → row actions menu → Duplicate.
From rule detail
/rules/:id → top toolbar → Duplicate.
Via API
POST /api/v1/rules/:id/duplicate — no body needed. Returns the new rule with a fresh id.
What gets copied
Everything that defines the rule's behavior:
name(prefixed withCopia di)descriptionentity_levelad_account_ids[],entity_filtercondition_logic,conditions[]actions[]schedule_type,interval_minutes,schedule_configcooldown_minutes,max_executions_per_day,budget_change_limit_pct,budget_daily_capnotify_on_execution,notify_channelsplatforms[]template_id(if cloning a template-derived rule)
What gets reset
id— new UUIDstatus→paused(always, regardless of source rule's status)execution_count→ 0error_count→ 0last_evaluated_at→ nulllast_executed_at→ nulllast_error→ nullauto_paused_at→ nullcb_reset_after→ nullcreated_at,updated_at→ now
The clone is "born new" — no inherited history or circuit-breaker state.
Use cases
Variant testing (A/B thresholds)
Original: kill losers, CPA > 30.Clone: kill losers, CPA > 25 (stricter).Run both for 2 weeks → compare execution histories → keep the better-performing one, delete the other.
Scope must be disjoint (otherwise both rules act on the same entity → conflicts). Either:
- Different scopes (different ad accounts)
- Same scope but coordinated (deactivate original while testing clone)
Per-account rules
ClientA has a rule "Scale winners — ROAS > 3 / 3d / +20%".Clone it.Edit clone: scope = ClientB account.Done. Same logic, different scope.
Scales much better than rewriting per-client.
Template-from-rule
You've tuned a rule that works great. Want to reuse the pattern.
- Clone the working rule
- Edit name + description to be generic
- (Optionally) save as workspace template (if your admin enables this)
Staging changes
Existing rule fires daily; need to change a threshold. Instead of editing live:
- Clone the rule
- Edit the threshold on the clone
- Preview the clone
- When satisfied: activate the clone, pause the original
- After 1-2 weeks: delete the original
Zero-downtime tuning.
After cloning
Immediately:
- Rename — replace the
Copia diprefix with a meaningful name - Adjust scope if cloning for a different account/client
- Preview to verify scope + conditions work for new context
- Activate when ready
Conflict prevention
Two rules with overlapping scope and conflicting actions cause problems (e.g. one pauses, another activates). Always:
- Make scopes disjoint, OR
- Make actions complementary (notify_only on one, real action on the other), OR
- Coordinate (only one active at a time)
RBAC + audit
Mediabuyer+ can clone. Audit log entry: action: rule.duplicate (dot-notation) with metadata: {source_id, name} (the source rule id and the new rule's name).
Common mistakes
- Clone + forget to change scope: both rules act on the same entities → conflicts
- Clone + leave the
Copia diprefix: clutter; rename promptly - Cloning instead of editing: if you really want the change live now, just edit the original. Clone is for staging or variants.
- Cloning a rule the circuit breaker auto-paused: the clone starts fresh (no
auto_pause_reason/last_errorinherited), but the same upstream issue may trip it again. Fix the cause first.
FAQ
How do I clone a rule in Wevion?
Use the Duplicate action in Wevion: the /rules row actions menu, the /rules/:id toolbar, or the API call POST /api/v1/rules/:id/duplicate (no body needed). It creates an exact copy named Copia di <name> and returns the new rule with a fresh id.
What status does a cloned rule get?
A cloned rule in Wevion is always created with status: paused, regardless of the source rule's status. It also starts fresh: execution_count and error_count reset to 0, and last_evaluated_at, last_executed_at, last_error, and cb_reset_after are all null — so no history or circuit-breaker state is inherited.
Do edits to a clone affect the original rule?
No. The cloned rule in Wevion is fully independent — edits to it don't propagate back to the original. This makes cloning ideal for staging changes: clone, edit the threshold, preview, then activate the clone and pause the original for zero-downtime tuning.
Who can clone rules and is it logged?
Mediabuyer and above can clone rules in Wevion. Each clone writes an audit log entry with action: rule.duplicate (dot-notation) and metadata containing source_id (the original rule) and name (the new rule's name), so the relationship between original and copy stays traceable.