Skip to main content

Dial decisions in a campaign

A pre-call function can answer “do not call this person” or “call back later” before the number is dialed. The phone never rings, no connection minute is spent, and the contact attempt is not burned. The decision is made by your system. An HTTP function returns it in the response, and you map the fields into the reserved variables. A code function writes the same variables itself — list them in its output variables. The card of a pre-call function that writes call_decision carries the ⤳ icon with the tooltip “This function decides what happens to the call”. The form of every pre-call function has a hint listing the variables and their values. A trial run of the function in the form shows the decision taken — for example, “Decision: cancel the dial” — and the reason. If the value is not recognized or the retry time is not readable, a warning appears next to it. What happens to the contact: If the function explicitly returns proceed, the call events show “Decision: dial”. Neither a cancellation nor a deferred contact counts toward frequency limits: no call was made. Where to see the result on the campaign page:
  • “Outcome breakdown”, “Contacts” tab — the row “Cancelled by function”. The “Calls” tab has no such row: a cancelled dial is not a call;
  • “Scheduler state”, the “Holds” row — the reason “Deferred by a pre-call function” with the number of such deferrals;
  • the contact list, “State” column — a deferred contact shows “Waiting”, the reason “Deferred by a pre-call function”, and the “Retry no earlier than” time; a cancelled one shows “Done”.
A deferred contact deliberately has no call history record: your system may answer “later” ten times for one person, and ten empty calls would be noise. Retry timing: your call_retry_after, otherwise the interval from the campaign retry policy. If the value is not readable, the events show “The retry time was not readable — the campaign retry policy applies”, and the time also comes from the policy. A value below 60 seconds is raised to 60 — otherwise dialing would turn into a loop of requests to you. The number of deferrals is not limited, but not beyond the campaign end: a retry after the campaign ends closes the contact as exhausted.
The decision only works in campaigns. On inbound calls, web calls, and calls placed from the cabinet or the public API it is ignored: the events show “the decision does not apply outside a campaign dial” and the call proceeds as usual. Refusing an inbound call is expressed in the flow: a condition and a transition to an end node.
An unknown value and a failure both mean “dial”. A typo in the field yields proceed with the warning “The decision value was not recognized — the dial goes on” in the event; a timeout or an error on your service does not cancel the dial either. The rule is deliberate: a missed call costs more than incomplete context. If your system breaks and starts cancelling everything, the campaign pauses itself — so a whole list is not “processed” without a single call. By default the guard fires when all of the last 20 decisions (proceed, cancel, or retry) were cancellations; the threshold is set by the platform administrator. The remaining contacts are not dialed, and the activity log gets a pause entry. Resuming is manual, once the cause is understood.