kadam_adv_create_autorule
Create automated rules for CPC campaigns: set bid changes, stop campaigns, increase day limits, or manage areas/creatives based on performance conditions.
Instructions
Create an autorule on a CPC campaign (autorules are CPC-only). Campaigns usually carry several rules (a strategy); call once per rule. bidChange rules require slices + bidRate + bidMax and a spend/clicks condition.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Rule type | |
| action | Yes | Action (must match type): areaBlPut/areaBlRemove (area), campaignStop/dayLimitIncrease (campaign), creoStop/creoActivate (creo), bidChange (bid) | |
| bidMax | No | bidChange: max bid cap (>=0.001). REQUIRED for bidChange. | |
| period | Yes | Evaluation period in days | |
| slices | No | bid rules: granularity dimension IDs, e.g. [180,190] = per source x site. REQUIRED for bidChange. | |
| statBy | No | ||
| bidRate | No | bidChange: coefficient on the slice EPC (earnings/click ~ eCPC); new bid = EPC x bidRate, capped at bidMax. REQUIRED for bidChange, range 0.1-2. bidRate=1 = set bid to the eCPC (valid, NOT a no-op). | |
| isActive | No | ||
| campaignId | Yes | CPC campaign ID | |
| conditions | Yes | Conditions ANDed together; each {metric, match, value}. Note: bidChange (bid) rules don't allow the ROI metric, and spend/clicks conditions can't use value 0. | |
| dayLimitType | No | dayLimitIncrease only | |
| dayLimitValue | No | dayLimitIncrease only |