kadam_adv_create_autorule
Create a CPC campaign autorule to automate bid changes, stops, or area blocks when performance conditions are met. Call once per rule.
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. A client token holds at most 5 rules per campaign and 300 per account — going over either is refused, so delete a rule before adding one. A token issued to Kadam staff for this account is not bound by those two limits.
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 |