The cap mechanism lets you count traffic volume by offer, geo, company and user. Based on this, you can manage how traffic is distributed among companies. Working with caps is done in the “Caps” subsection of the “Management” section and is available to administrators.

Examples of how caps can be used in practice:

  1. The company “Horns and Hooves” gives good commissions, but can only send a hundred dick creams a day. If the cap is filled, we send orders for dick creams to another company with smaller commissions but a larger warehouse.
  2. Affiliate John Doe has just started working with a new offer, so we need to check his traffic. We make a small cap of a hundred leads specifically for John and keep an eye on it. As soon as the cap is filled, we tell him “game over” and check the traffic.
  3. The “Noble Dons” affiliate team should give at least a thousand approvals a week to get a bonus. We make the cap on this team across all offers and, on Sunday, we simply check whether it’s filled or not. Based on that, we decide there’s no reason not to give the Noble Dons a bonus.

Adding and configuring caps

To add a new cap, specify its name and click the Add button. You will go to the Parameter Settings page.

General settings

These settings only affect the display and search of caps in the list.

  • Name is used only for convenience, it can be anything.
  • Tags allow you to group caps and show statistics by groups. The tag must consist of letters and numbers and cannot contain spaces. It is entered without the hash symbol.
  • Show fill level in the list lets you observe the number of leads in the specified cap in near real time. We recommend enabling it only if the cap requires “live” monitoring by an employee.

Basic settings

The basic cap setup consists of specifying its size and the conditions for counting leads.

  • Amount determines the size of the cap — the number of leads it can be filled up to. Once that number is reached, the cap will be considered full and unavailable.
  • Status determines which leads are counted toward the cap’s fill level. We use the affiliate-visible lead status, which reflects the offer’s operating model.
    • Any leads. All leads are counted regardless of their statuses and phases.
    • Valid leads only. Leads in the phases “Wait”, “Hold”, “Approve” and “Cancel” are counted.
    • Awaiting leads. Leads in the “Wait” phase are counted.
    • Approved leads. Leads in the “Hold” and “Approve” phases are counted.
    • Any except cancelled. Leads in the “Cancel” and “Trash” phases are not counted.
    • Any except new and deleted. Leads with the statuses New and Deleted are not counted.
  • Period determines the time for which leads are counted. The “Starting from midnight” option counts leads received during the current calendar day; the other options — 24 hours/week/month/year/any time — count back from the current moment.

Important! The 24 hours/week/month/year periods are not fixed ranges. They take each specific “now” (which changes over time) and look back over the specified number of days.

The classic approach is to count the number of valid leads since the start of the day. The exact configuration always depends on the specifics of the task.

If necessary, you can set more flexible time settings.

  • Time shift allows you to manually shift the time window for which leads are counted. It is measured in hours and can be positive or negative.
  • Working hours let you set a schedule for receiving leads. It is specified in the format from-to@day, where time is hh:mm and day is the ordinal number from 1 (Monday) to 7 (Sunday). For example: 10:00-18:00@1-5. Outside working hours, the cap becomes unavailable.
  • Timezone allows assigning a specific time zone to the schedule, instead of adjusting it manually when the advertiser's time does not match the system time.
  • Leads from and Leads to let you set a fixed date range for counting leads. It is recommended to use this together with the “Any time” period.
  • Time of which action will be used for the range. By default this is the system setting from the “Leads and orders” block in “Control — Settings — Advanced”. It can be either “Time the lead was received by the system” or “Time the lead was sent to CRM or taken into processing”. You can override this setting at the cap level by choosing a counting time different from the system default. There are also two additional options:
    • Time the lead was confirmed or cancelled. Considers the moment the lead transitions to one of the following statuses: Cancel, Packing, Sending, Transfer, Arrived.
    • Time the lead was paid or returned. Considers the moment the lead transitions to the status Completed or Return.

Filter settings

You can also set additional lead selection criteria. All selected conditions are taken into account simultaneously. For example, when you specify two users and five offers, the number of leads of each of the users for each of the offers is summed.

  • Companies, offers and countries are simply selected from the list. You can specify several at once. The button on the right lets you enter identifiers and codes separated by commas.
  • Users are specified as a comma-separated list of identifiers. If you need to add a whole affiliate team, indicate its ID with a minus sign. If you need to count leads for a specific affiliate on the agency side, use the identifier format Agency-Affiliate with a hyphen, for example 12-A3B4C. Important: use the agency’s identifier, not the system affiliate linked to it.

Tracking the number of leads

On the caps management page you can see the number of leads, the available amount and the size of the cap. In order to improve performance, the total number is shown only for those caps that are available on the open page.

Counting the number of leads in a cap is a heavy task. Therefore, the number of leads on the cap isn't displayed in real time. It is cached for one minute.

You can count the cap amounts by tags. To do this, click on the tag in the list, or specify it in the search field with the hash symbol.

Traffic distribution

You can use caps when distributing traffic across offers. To check the cap, add the cap(123) code to the distribution script, specifying the cap ID instead of 123. The script line will be active only while the cap is available.

You can check several caps at the same time. In this case, the script line will be active if all the caps are available.

Example of a distribution script using caps:

geo:ru 80% cap(1) cap(4) #3
geo:ru cap(2) cap(4) #4

Important! When you remove a cap, all script lines that reference it will stop working, since the cap is then considered unavailable.

Even more important! An unavailable cap does not block traffic! You cannot use caps to block traffic, since losing traffic is contrary to the fundamental principles of AlterCPA. Just route the traffic to a separate overflow company so you don’t lose the leads.