Automatic rules: what they do and how to set them up
The jobs the panel does by itself when a condition is met: rule types, simulation, and running in shadow or live.
What is this screen for?
On the Kurallar → Otomatik kurallar (Rules → Automatic rules) tab you define jobs the panel does by itself when a condition is met: closing low stock on a channel, or sending a notification about an order or product that needs attention.
No rule starts live straight away. Every rule goes through three steps:
- Simulation: before saving, you see what the rule would have done had it run in the past.
- Shadow: the rule runs but touches nothing and sends no notifications. It records every case that triggers it as "yapardı" (would have done).
- Live: once you have reviewed the records and switched the rule to live, it is actually applied.
This tab opens only for the account owner with the Admin role. It is the same shadow approach Bulutegra uses when handing over a channel; see Shadow mode and channel handover.
Rule types
| Rule type | Settings | What happens when live |
|---|---|---|
| Stok eşiği: az kalan varyantı kanalda kapat (Stock threshold: close low-stock variants on the channel) | Stok bu sayı ve altındaysa (Stock at or below, 1–20), Kapsam (Scope), Kanallar (Channels) | 0 is sent for that variant to the selected channels. When stock rises above the threshold, the product reopens by itself. |
| Büyük sipariş bildirimi (Large order notification) | Tutar (₺) ve üstü (Amount and above) or adet ve üstü (quantity and above) | A notification for every new order that meets the condition. |
| Aynı müşteriden tekrar sipariş bildirimi (Repeat orders from the same customer) | Aynı müşteriden sipariş sayısı (Orders from the same customer, 2–10), Saat içinde (Within hours, 1–168) | A notification if the same customer places this many orders within the window. Meant to catch duplicate or suspicious orders. |
| Katkı oranı eşiğin altına düşen ürün bildirimi (Product falling below contribution threshold) | Katkı oranı (%) altında (Contribution rate below, −50 to 80), Kanallar (Channels) | A notification for products that newly fall below the threshold. |
Cancelled and returned orders are not counted in the order rules.
Kapsam (Scope), stock threshold only:
- Tüm ürünler (All products): applies to every variant in your master stock record.
- Yalnız XML tedarikçi ürünleri (Only XML supplier products): applies only to products coming from a supplier XML feed; your own products are left alone.
The contribution rule uses the calculation on the Raporlar → Kârlılık (Reports → Profitability) screen. Contribution can't be calculated for products without a cost; see Profitability and settlements.
Setting up a new rule
- Open the Yeni kural (New rule) section. If you have no rules yet, it is already open.
- Choose the Kural türü (Rule type). The setting boxes below change with the type.
- Optionally type an Ad (isteğe bağlı) (Name, optional); if you leave it empty, the rule type's name is used.
- Enter the settings and, where needed, tick channels in the Kanallar (Channels) list.
- Press Simüle et (Simulate). After "geçmiş veride deneniyor…" (testing on past data) the simulation card opens.
- If the result looks right, press Gölgede başlat (Start in shadow). The rule is added to the Kurallar (Rules) list with the Gölgede (In shadow) badge.
What does the simulation show?
- Order rules are replayed on the real orders of the last 30 days: Son 30 günde tetiklenirdi (Would have triggered in the last 30 days), Günde en çok (Most in a day) and the weekly Ortalama (Average) number of notifications. A rule that fires too often causes notification fatigue; set the threshold accordingly.
- Stock threshold is calculated with today's stock and the last 7 days of sales: the number of variants that would be closed if the rule were switched on today, their sales on the selected channels over the last 7 days, and the number of seller-caused cancellations in the last 30 days. Only some channels report a cancellation reason; cancellations without a reason are not counted.
- With supplier scope, products the existing supplier threshold already closes are shown separately; the rule counts only the ones it would close in addition.
- Contribution rate: the number of products below the threshold today, their sales over the last 7 days and the number of loss-making products.
Open the Örnekler (Examples) section to see sample cases the rule would catch.
From shadow to live
Each rule appears as a card in the list: its name, status badge (Gölgede (In shadow), Canlı (Live) or Kapalı (Off)), rule type and a plain-language summary. Below that you see since when the rule has been in that state, how many times it would have triggered in shadow, how many times it triggered live, and the last check time. In Son kayıtlar (Recent records) each record is listed with a "yapardı" (would have) or "canlı" (live) badge.
- Canlıya al (Go live): until the rule has completed the minimum shadow period stated in the description at the top of the page, this button stays inactive and shows the hours left. When the period is over, press it and confirm.
- Gölgeye al (Back to shadow): turns a live rule back into record-only.
- Kapat (Turn off): the rule stops running. Bring it back with Gölgede yeniden başlat (Restart in shadow); the shadow period starts over.
- Sil (Delete): removes the rule and its records from the list.
Notifications from a live rule
Live notification rules write to the Bildirimler (Notifications) page with the title "Kural: <rule name>", and to your phone if you have turned on phone notifications. If there are more than three new cases at once, they are combined into one notification. When a contribution rule goes live, its first run sends the current list as a single summary; after that it reports only newly falling products. The stock threshold rule sends no notifications; its job is to send 0 to the channel.
If something goes wrong
- "Stok eşiği 1 ile 20 arasında olmalı" (stock threshold must be 1–20), "En az bir kanal seçin" (select at least one channel), "Tutar ya da adet girin" (enter an amount or quantity), "Sipariş sayısı 2–10, pencere 1–168 saat olmalı" (order count 2–10, window 1–168 hours), "Katkı eşiği −50 ile 80 (yüzde) arasında olmalı" (contribution threshold −50 to 80 percent): bring the setting into range and simulate again.
- "En çok 30 kural tanımlanabilir" (at most 30 rules can be defined): delete rules you no longer use with Sil (Delete).
- "Kural en az … saat gölgede çalışmalı" (the rule must run in shadow for at least … hours): a rule can't go live before its shadow period is over; the message shows the time left.
- "yetkisiz" (unauthorised): the tab works only for the account owner with the Admin role.
- "Henüz kural yok." (No rules yet.): pick a rule in the Yeni kural (New rule) section and simulate it.
Related articles: How do price rules work?, Notifications and alerts, Profitability and settlements, Shadow mode and channel handover.